/external/u-boot/drivers/i2c/ |
D | tegra_i2c.c | 29 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 …]
|
D | mxc_i2c.c | 136 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 …]
|
D | exynos_hs_i2c.c | 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() [all …]
|
D | s3c24x0_i2c.c | 86 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 …]
|
D | i2c-cdns.c | 226 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 …]
|
D | davinci_i2c.c | 24 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 …]
|
D | cros_ec_tunnel.c | 27 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()
|
D | imx_lpi2c.c | 405 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()
|
D | i2c_core.c | 35 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/ |
D | i2c-mux-uclass.c | 24 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/ |
D | eeprom.c | 227 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 …]
|
D | i2c.c | 1742 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/ |
D | anx9804.h | 19 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
|
D | anx9804.c | 28 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/ |
D | max98095.c | 547 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()
|
D | wm8994.c | 838 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/ |
D | board_detect.c | 60 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/ |
D | sound.h | 26 int i2c_bus; member
|
D | i2c.h | 636 extern struct i2c_bus_hose i2c_bus[]; 638 #define I2C_ADAPTER(bus) i2c_bus[bus].adapter
|
/external/u-boot/board/freescale/ls1021atwr/ |
D | ls1021atwr.c | 497 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/ |
D | mxc_i2c.h | 98 int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus);
|
/external/u-boot/doc/driver-model/ |
D | livetree.txt | 92 i2c_bus->regs = (struct i2c_ctlr *)devfdt_get_addr(dev); 99 i2c_bus->regs = (struct i2c_ctlr *)dev_read_addr(dev);
|