• Home
  • Raw
  • Download

Lines Matching refs:i2c_bus

139 static int hsi2c_get_clk_details(struct s3c24x0_i2c_bus *i2c_bus)  in hsi2c_get_clk_details()  argument
141 struct exynos5_hsi2c *hsregs = i2c_bus->hsregs; in hsi2c_get_clk_details()
143 unsigned int op_clk = i2c_bus->clock_frequency; in hsi2c_get_clk_details()
165 i2c_bus->clk_cycle = utemp1 - 2; in hsi2c_get_clk_details()
166 i2c_bus->clk_div = i; in hsi2c_get_clk_details()
173 static void hsi2c_ch_init(struct s3c24x0_i2c_bus *i2c_bus) in hsi2c_ch_init() argument
175 struct exynos5_hsi2c *hsregs = i2c_bus->hsregs; in hsi2c_ch_init()
187 n_clkdiv = i2c_bus->clk_div; in hsi2c_ch_init()
188 t_scl_l = i2c_bus->clk_cycle / 2; in hsi2c_ch_init()
189 t_scl_h = i2c_bus->clk_cycle / 2; in hsi2c_ch_init()
195 t_sr_release = i2c_bus->clk_cycle; in hsi2c_ch_init()
224 static void exynos5_i2c_reset(struct s3c24x0_i2c_bus *i2c_bus) in exynos5_i2c_reset() argument
226 struct exynos5_hsi2c *i2c = i2c_bus->hsregs; in exynos5_i2c_reset()
239 hsi2c_ch_init(i2c_bus); in exynos5_i2c_reset()
466 struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev); in exynos_hs_i2c_xfer() local
467 struct exynos5_hsi2c *hsregs = i2c_bus->hsregs; in exynos_hs_i2c_xfer()
479 exynos5_i2c_reset(i2c_bus); in exynos_hs_i2c_xfer()
489 struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev); in s3c24x0_i2c_set_bus_speed() local
491 i2c_bus->clock_frequency = speed; in s3c24x0_i2c_set_bus_speed()
493 if (hsi2c_get_clk_details(i2c_bus)) in s3c24x0_i2c_set_bus_speed()
495 hsi2c_ch_init(i2c_bus); in s3c24x0_i2c_set_bus_speed()
502 struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev); in s3c24x0_i2c_probe() local
513 ret = hsi2c_read(i2c_bus->hsregs, chip, 0, 0, buf, 1); in s3c24x0_i2c_probe()
521 struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev); in s3c_i2c_ofdata_to_platdata() local
526 i2c_bus->hsregs = (struct exynos5_hsi2c *)devfdt_get_addr(dev); in s3c_i2c_ofdata_to_platdata()
528 i2c_bus->id = pinmux_decode_periph_id(blob, node); in s3c_i2c_ofdata_to_platdata()
530 i2c_bus->clock_frequency = fdtdec_get_int(blob, node, in s3c_i2c_ofdata_to_platdata()
532 i2c_bus->node = node; in s3c_i2c_ofdata_to_platdata()
533 i2c_bus->bus_num = dev->seq; in s3c_i2c_ofdata_to_platdata()
535 exynos_pinmux_config(i2c_bus->id, PINMUX_FLAG_HS_MODE); in s3c_i2c_ofdata_to_platdata()
537 i2c_bus->active = true; in s3c_i2c_ofdata_to_platdata()