Home
last modified time | relevance | path

Searched refs:i2c_bus (Results 1 – 22 of 22) sorted by relevance

/external/u-boot/drivers/i2c/
Dtegra_i2c.c29 struct i2c_bus { struct
41 static void set_packet_mode(struct i2c_bus *i2c_bus) in set_packet_mode() argument
47 if (i2c_bus->type == TYPE_DVC) { in set_packet_mode()
48 struct dvc_ctlr *dvc = (struct dvc_ctlr *)i2c_bus->regs; in set_packet_mode()
52 writel(config, &i2c_bus->regs->cnfg); in set_packet_mode()
57 setbits_le32(&i2c_bus->regs->sl_cnfg, I2C_SL_CNFG_NEWSL_MASK); in set_packet_mode()
61 static void i2c_reset_controller(struct i2c_bus *i2c_bus) in i2c_reset_controller() argument
64 reset_assert(&i2c_bus->reset_ctl); in i2c_reset_controller()
66 reset_deassert(&i2c_bus->reset_ctl); in i2c_reset_controller()
70 set_packet_mode(i2c_bus); in i2c_reset_controller()
[all …]
Dmxc_i2c.c136 static uint8_t i2c_imx_get_clk(struct mxc_i2c_bus *i2c_bus, unsigned int rate) in i2c_imx_get_clk() argument
169 static int bus_i2c_set_bus_speed(struct mxc_i2c_bus *i2c_bus, int speed) in bus_i2c_set_bus_speed() argument
171 ulong base = i2c_bus->base; in bus_i2c_set_bus_speed()
172 bool quirk = i2c_bus->driver_data & I2C_QUIRK_FLAG ? true : false; in bus_i2c_set_bus_speed()
173 u8 clk_idx = i2c_imx_get_clk(i2c_bus, speed); in bus_i2c_set_bus_speed()
193 static int wait_for_sr_state(struct mxc_i2c_bus *i2c_bus, unsigned state) in wait_for_sr_state() argument
197 bool quirk = i2c_bus->driver_data & I2C_QUIRK_FLAG ? true : false; in wait_for_sr_state()
199 ulong base = i2c_bus->base; in wait_for_sr_state()
227 static int tx_byte(struct mxc_i2c_bus *i2c_bus, u8 byte) in tx_byte() argument
230 int reg_shift = i2c_bus->driver_data & I2C_QUIRK_FLAG ? in tx_byte()
[all …]
Dexynos_hs_i2c.c139 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()
[all …]
Ds3c24x0_i2c.c86 struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev); in s3c24x0_i2c_set_bus_speed() local
88 i2c_bus->clock_frequency = speed; in s3c24x0_i2c_set_bus_speed()
90 i2c_ch_init(i2c_bus->regs, i2c_bus->clock_frequency, in s3c24x0_i2c_set_bus_speed()
210 struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev); in s3c24x0_i2c_probe() local
221 ret = i2c_transfer(i2c_bus->regs, I2C_READ, chip << 1, 0, 0, buf, 1); in s3c24x0_i2c_probe()
226 static int s3c24x0_do_msg(struct s3c24x0_i2c_bus *i2c_bus, struct i2c_msg *msg, in s3c24x0_do_msg() argument
229 struct s3c24x0_i2c *i2c = i2c_bus->regs; in s3c24x0_do_msg()
281 struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev); in s3c24x0_i2c_xfer() local
282 struct s3c24x0_i2c *i2c = i2c_bus->regs; in s3c24x0_i2c_xfer()
295 ret = s3c24x0_do_msg(i2c_bus, &msg[i], i); in s3c24x0_i2c_xfer()
[all …]
Di2c-cdns.c226 static int cdns_i2c_write_data(struct i2c_cdns_bus *i2c_bus, u32 addr, u8 *data, in cdns_i2c_write_data() argument
230 struct cdns_i2c_regs *regs = i2c_bus->regs; in cdns_i2c_write_data()
260 if (!i2c_bus->hold_flag) in cdns_i2c_write_data()
274 static int cdns_i2c_read_data(struct i2c_cdns_bus *i2c_bus, u32 addr, u8 *data, in cdns_i2c_read_data() argument
278 struct cdns_i2c_regs *regs = i2c_bus->regs; in cdns_i2c_read_data()
307 hold_quirk = (i2c_bus->quirks & CDNS_I2C_BROKEN_HOLD_BIT) && updatetx; in cdns_i2c_read_data()
312 !i2c_bus->hold_flag) { in cdns_i2c_read_data()
367 struct i2c_cdns_bus *i2c_bus = dev_get_priv(dev); in cdns_i2c_xfer() local
371 hold_quirk = !!(i2c_bus->quirks & CDNS_I2C_BROKEN_HOLD_BIT); in cdns_i2c_xfer()
388 i2c_bus->hold_flag = 1; in cdns_i2c_xfer()
[all …]
Ddavinci_i2c.c24 struct i2c_bus { struct
437 struct i2c_bus *i2c_bus = dev_get_priv(bus);
444 ret = _davinci_i2c_read(i2c_bus->regs, msg->addr,
447 ret = _davinci_i2c_write(i2c_bus->regs, msg->addr,
461 struct i2c_bus *i2c_bus = dev_get_priv(dev);
463 i2c_bus->speed = speed;
464 return _davinci_i2c_setspeed(i2c_bus->regs, speed);
469 struct i2c_bus *i2c_bus = dev_get_priv(dev);
471 i2c_bus->id = dev->seq;
472 i2c_bus->regs = (struct i2c_regs *)devfdt_get_addr(dev);
[all …]
Dcros_ec_tunnel.c27 struct cros_ec_i2c_bus *i2c_bus = dev_get_priv(dev); in cros_ec_i2c_xfer() local
29 return cros_ec_i2c_tunnel(dev->parent, i2c_bus->remote_bus, msg, nmsgs); in cros_ec_i2c_xfer()
34 struct cros_ec_i2c_bus *i2c_bus = dev_get_priv(dev); in cros_ec_i2c_ofdata_to_platdata() local
38 i2c_bus->remote_bus = fdtdec_get_uint(blob, node, "google,remote-bus", in cros_ec_i2c_ofdata_to_platdata()
Dimx_lpi2c.c405 struct imx_lpi2c_bus *i2c_bus = dev_get_priv(bus); in imx_lpi2c_probe() local
409 i2c_bus->driver_data = dev_get_driver_data(bus); in imx_lpi2c_probe()
415 i2c_bus->base = addr; in imx_lpi2c_probe()
416 i2c_bus->index = bus->seq; in imx_lpi2c_probe()
417 i2c_bus->bus = bus; in imx_lpi2c_probe()
436 bus->seq, i2c_bus->base, in imx_lpi2c_probe()
437 i2c_bus->speed); in imx_lpi2c_probe()
Di2c_core.c35 struct i2c_bus_hose i2c_bus[CONFIG_SYS_NUM_I2C_BUSES] = variable
109 struct i2c_bus_hose *i2c_bus_tmp = &i2c_bus[I2C_BUS]; in i2c_mux_set_all()
134 struct i2c_bus_hose *i2c_bus_tmp = &i2c_bus[I2C_BUS]; in i2c_mux_disconnect_all()
/external/u-boot/drivers/i2c/muxes/
Di2c-mux-uclass.c24 struct udevice *i2c_bus; member
89 priv->i2c_bus = dev_get_parent(mux); in i2c_mux_post_probe()
90 debug("%s: bus=%p/%s\n", __func__, priv->i2c_bus, in i2c_mux_post_probe()
91 priv->i2c_bus->name); in i2c_mux_post_probe()
96 &priv->i2c_bus); in i2c_mux_post_probe()
99 debug("%s: bus=%p/%s\n", __func__, priv->i2c_bus, priv->i2c_bus->name); in i2c_mux_post_probe()
137 ret = dm_i2c_set_bus_speed(priv->i2c_bus, speed); in i2c_mux_bus_set_bus_speed()
148 struct dm_i2c_ops *ops = i2c_get_ops(priv->i2c_bus); in i2c_mux_bus_probe()
151 debug("%s: %s, bus %s\n", __func__, dev->name, priv->i2c_bus->name); in i2c_mux_bus_probe()
157 ret = ops->probe_chip(priv->i2c_bus, chip_addr, chip_flags); in i2c_mux_bus_probe()
[all …]
/external/u-boot/cmd/
Deeprom.c227 static int parse_i2c_bus_addr(int *i2c_bus, ulong *i2c_addr, int argc, in parse_i2c_bus_addr() argument
235 *i2c_bus = -1; in parse_i2c_bus_addr()
242 *i2c_bus = -1; in parse_i2c_bus_addr()
249 *i2c_bus = parse_numeric_param(argv[0]); in parse_i2c_bus_addr()
293 static int eeprom_execute_command(enum eeprom_action action, int i2c_bus, in eeprom_execute_command() argument
307 eeprom_init(i2c_bus); in eeprom_execute_command()
350 int i2c_bus = -1, index = 0; in do_eeprom() local
380 ret = parse_i2c_bus_addr(&i2c_bus, &i2c_addr, argc, in do_eeprom()
384 ret = parse_i2c_bus_addr(&i2c_bus, &i2c_addr, argc, in do_eeprom()
388 ret = parse_i2c_bus_addr(&i2c_bus, &i2c_addr, argc, in do_eeprom()
[all …]
Di2c.c1742 if (i2c_bus[i].next_hop[j].chip == 0) in do_i2c_show_bus()
1745 i2c_bus[i].next_hop[j].mux.name, in do_i2c_show_bus()
1746 i2c_bus[i].next_hop[j].chip, in do_i2c_show_bus()
1747 i2c_bus[i].next_hop[j].channel); in do_i2c_show_bus()
1777 if (i2c_bus[i].next_hop[j].chip == 0) in do_i2c_show_bus()
1780 i2c_bus[i].next_hop[j].mux.name, in do_i2c_show_bus()
1781 i2c_bus[i].next_hop[j].chip, in do_i2c_show_bus()
1782 i2c_bus[i].next_hop[j].channel); in do_i2c_show_bus()
/external/u-boot/drivers/video/
Danx9804.h19 void anx9804_init(unsigned int i2c_bus, u8 lanes, u8 data_rate, int bpp);
21 static inline void anx9804_init(unsigned int i2c_bus, u8 lanes, u8 data_rate, in anx9804_init() argument
Danx9804.c28 void anx9804_init(unsigned int i2c_bus, u8 lanes, u8 data_rate, int bpp) in anx9804_init() argument
34 i2c_set_bus_num(i2c_bus); in anx9804_init()
/external/u-boot/drivers/sound/
Dmax98095.c547 pcodec_info->i2c_bus = i2c_get_bus_num_fdt(parent); in get_max98095_codec_values()
548 error |= pcodec_info->i2c_bus; in get_max98095_codec_values()
549 debug("i2c bus = %d\n", pcodec_info->i2c_bus); in get_max98095_codec_values()
560 pcodec_info->i2c_bus = AUDIO_I2C_BUS; in get_max98095_codec_values()
587 i2c_set_bus_num(pcodec_info->i2c_bus); in max98095_init()
Dwm8994.c838 pcodec_info->i2c_bus = i2c_get_bus_num_fdt(parent); in get_codec_values()
839 error |= pcodec_info->i2c_bus; in get_codec_values()
840 debug("i2c bus = %d\n", pcodec_info->i2c_bus); in get_codec_values()
851 pcodec_info->i2c_bus = AUDIO_I2C_BUS; in get_codec_values()
882 wm8994_i2c_init(pcodec_info->i2c_bus); in wm8994_init()
/external/u-boot/board/ti/common/
Dboard_detect.c60 static int __maybe_unused ti_i2c_eeprom_init(int i2c_bus, int dev_addr) in ti_i2c_eeprom_init() argument
64 if (i2c_bus >= 0) { in ti_i2c_eeprom_init()
65 rc = i2c_set_bus_num(i2c_bus); in ti_i2c_eeprom_init()
/external/u-boot/include/
Dsound.h26 int i2c_bus; member
Di2c.h636 extern struct i2c_bus_hose i2c_bus[];
638 #define I2C_ADAPTER(bus) i2c_bus[bus].adapter
/external/u-boot/board/freescale/ls1021atwr/
Dls1021atwr.c497 unsigned int i2c_bus; in ls1twr_program_regulator() local
505 i2c_bus = i2c_get_bus_num(); in ls1twr_program_regulator()
520 i2c_set_bus_num(i2c_bus); in ls1twr_program_regulator()
/external/u-boot/arch/arm/include/asm/mach-imx/
Dmxc_i2c.h98 int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus);
/external/u-boot/doc/driver-model/
Dlivetree.txt92 i2c_bus->regs = (struct i2c_ctlr *)devfdt_get_addr(dev);
99 i2c_bus->regs = (struct i2c_ctlr *)dev_read_addr(dev);