/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 153 i2c_clk_rate = clk_get_rate(&i2c_bus->per_clk); in i2c_imx_get_clk() 174 static int bus_i2c_set_bus_speed(struct mxc_i2c_bus *i2c_bus, int speed) in bus_i2c_set_bus_speed() argument 176 ulong base = i2c_bus->base; in bus_i2c_set_bus_speed() 177 bool quirk = i2c_bus->driver_data & I2C_QUIRK_FLAG ? true : false; in bus_i2c_set_bus_speed() 178 u8 clk_idx = i2c_imx_get_clk(i2c_bus, speed); in bus_i2c_set_bus_speed() 198 static int wait_for_sr_state(struct mxc_i2c_bus *i2c_bus, unsigned state) in wait_for_sr_state() argument 202 bool quirk = i2c_bus->driver_data & I2C_QUIRK_FLAG ? true : false; in wait_for_sr_state() 204 ulong base = i2c_bus->base; in wait_for_sr_state() 232 static int tx_byte(struct mxc_i2c_bus *i2c_bus, u8 byte) in tx_byte() argument [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 | 244 static int cdns_i2c_write_data(struct i2c_cdns_bus *i2c_bus, u32 addr, u8 *data, in cdns_i2c_write_data() argument 248 struct cdns_i2c_regs *regs = i2c_bus->regs; in cdns_i2c_write_data() 286 if (!i2c_bus->hold_flag) in cdns_i2c_write_data() 306 static int cdns_i2c_read_data(struct i2c_cdns_bus *i2c_bus, u32 addr, u8 *data, in cdns_i2c_read_data() argument 310 struct cdns_i2c_regs *regs = i2c_bus->regs; in cdns_i2c_read_data() 336 hold_quirk = (i2c_bus->quirks & CDNS_I2C_BROKEN_HOLD_BIT) && updatetx; in cdns_i2c_read_data() 341 !i2c_bus->hold_flag) { in cdns_i2c_read_data() 401 struct i2c_cdns_bus *i2c_bus = dev_get_priv(dev); in cdns_i2c_xfer() local 408 hold_quirk = !!(i2c_bus->quirks & CDNS_I2C_BROKEN_HOLD_BIT); in cdns_i2c_xfer() 425 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 | imx_lpi2c.c | 271 struct imx_lpi2c_bus *i2c_bus = dev_get_priv(bus); in bus_i2c_set_bus_speed() local 284 clock_rate = clk_get_rate(&i2c_bus->per_clk); in bus_i2c_set_bus_speed() 442 struct imx_lpi2c_bus *i2c_bus = dev_get_priv(bus); in imx_lpi2c_probe() local 446 i2c_bus->driver_data = dev_get_driver_data(bus); in imx_lpi2c_probe() 452 i2c_bus->base = addr; in imx_lpi2c_probe() 453 i2c_bus->index = bus->seq; in imx_lpi2c_probe() 454 i2c_bus->bus = bus; in imx_lpi2c_probe() 464 ret = clk_get_by_name(bus, "per", &i2c_bus->per_clk); in imx_lpi2c_probe() 469 ret = clk_enable(&i2c_bus->per_clk); in imx_lpi2c_probe() 475 ret = clk_get_by_name(bus, "ipg", &i2c_bus->ipg_clk); in imx_lpi2c_probe() [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 | 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 | 22 struct udevice *i2c_bus; member 110 priv->i2c_bus = dev_get_parent(mux); in i2c_mux_post_probe() 111 debug("%s: bus=%p/%s\n", __func__, priv->i2c_bus, in i2c_mux_post_probe() 112 priv->i2c_bus->name); in i2c_mux_post_probe() 117 &priv->i2c_bus); in i2c_mux_post_probe() 120 debug("%s: bus=%p/%s\n", __func__, priv->i2c_bus, priv->i2c_bus->name); in i2c_mux_post_probe() 158 ret = dm_i2c_set_bus_speed(priv->i2c_bus, speed); in i2c_mux_bus_set_bus_speed() 169 struct dm_i2c_ops *ops = i2c_get_ops(priv->i2c_bus); in i2c_mux_bus_probe() 172 debug("%s: %s, bus %s\n", __func__, dev->name, priv->i2c_bus->name); in i2c_mux_bus_probe() 178 ret = ops->probe_chip(priv->i2c_bus, chip_addr, chip_flags); in i2c_mux_bus_probe() [all …]
|
/external/u-boot/cmd/ |
D | eeprom.c | 239 static int parse_i2c_bus_addr(int *i2c_bus, ulong *i2c_addr, int argc, in parse_i2c_bus_addr() argument 247 *i2c_bus = -1; in parse_i2c_bus_addr() 254 *i2c_bus = -1; in parse_i2c_bus_addr() 261 *i2c_bus = parse_numeric_param(argv[0]); in parse_i2c_bus_addr() 305 static int eeprom_execute_command(enum eeprom_action action, int i2c_bus, in eeprom_execute_command() argument 319 eeprom_init(i2c_bus); in eeprom_execute_command() 362 int i2c_bus = -1, index = 0; in do_eeprom() local 392 ret = parse_i2c_bus_addr(&i2c_bus, &i2c_addr, argc, in do_eeprom() 396 ret = parse_i2c_bus_addr(&i2c_bus, &i2c_addr, argc, in do_eeprom() 400 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/board/ |
D | gazerbeam.c | 61 struct udevice *i2c_bus; in _read_board_variant_data() local 68 res = uclass_get_device_by_seq(UCLASS_I2C, I2C_BUS_SEQ_NO, &i2c_bus); in _read_board_variant_data() 75 if (!i2c_bus) { in _read_board_variant_data() 81 mc2_sc = !dm_i2c_probe(i2c_bus, MC2_EXPANDER_ADDR, 0, &dummy); in _read_board_variant_data() 82 mc4 = !dm_i2c_probe(i2c_bus, MC4_EXPANDER_ADDR, 0, &dummy); in _read_board_variant_data()
|
/external/u-boot/drivers/net/ |
D | mdio_mux_i2creg.c | 50 struct udevice *i2c_bus; in mdio_mux_i2creg_probe() local 66 err = uclass_get_device_by_ofnode(UCLASS_I2C, bus_node, &i2c_bus); in mdio_mux_i2creg_probe() 80 err = i2c_get_chip(i2c_bus, (uint)chip_addr, 1, &priv->chip); in mdio_mux_i2creg_probe()
|
/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/include/ |
D | sound.h | 18 int i2c_bus; member
|
D | i2c.h | 579 extern struct i2c_bus_hose i2c_bus[]; 581 #define I2C_ADAPTER(bus) i2c_bus[bus].adapter
|
/external/u-boot/board/freescale/ls1021atwr/ |
D | ls1021atwr.c | 448 unsigned int i2c_bus; in ls1twr_program_regulator() local 456 i2c_bus = i2c_get_bus_num(); in ls1twr_program_regulator() 471 i2c_set_bus_num(i2c_bus); in ls1twr_program_regulator()
|
/external/u-boot/arch/arm/include/asm/mach-imx/ |
D | mxc_i2c.h | 104 int i2c_idle_bus(struct mxc_i2c_bus *i2c_bus);
|
/external/u-boot/board/ti/common/ |
D | board_detect.c | 28 static int __maybe_unused ti_i2c_eeprom_init(int i2c_bus, int dev_addr) in ti_i2c_eeprom_init() argument 32 if (i2c_bus >= 0) { in ti_i2c_eeprom_init() 33 rc = i2c_set_bus_num(i2c_bus); in ti_i2c_eeprom_init()
|
/external/u-boot/doc/driver-model/ |
D | livetree.rst | 97 i2c_bus->regs = (struct i2c_ctlr *)devfdt_get_addr(dev); 106 i2c_bus->regs = (struct i2c_ctlr *)dev_read_addr(dev);
|