Home
last modified time | relevance | path

Searched refs:adap (Results 1 – 13 of 13) sorted by relevance

/u-boot/drivers/i2c/
A Dlpc32xx_i2c.c228 static void lpc32xx_i2c_init(struct i2c_adapter *adap, in lpc32xx_i2c_init() argument
231 __i2c_init(lpc32xx_i2c[adap->hwadapnr], requested_speed, slaveadd, in lpc32xx_i2c_init()
232 adap->hwadapnr); in lpc32xx_i2c_init()
235 static int lpc32xx_i2c_probe_chip(struct i2c_adapter *adap, u8 dev) in lpc32xx_i2c_probe_chip() argument
237 return __i2c_probe_chip(lpc32xx_i2c[adap->hwadapnr], dev); in lpc32xx_i2c_probe_chip()
240 static int lpc32xx_i2c_read(struct i2c_adapter *adap, u8 dev, uint addr, in lpc32xx_i2c_read() argument
243 return __i2c_read(lpc32xx_i2c[adap->hwadapnr], dev, addr, in lpc32xx_i2c_read()
250 return __i2c_write(lpc32xx_i2c[adap->hwadapnr], dev, addr, in lpc32xx_i2c_write()
254 static unsigned int lpc32xx_i2c_set_bus_speed(struct i2c_adapter *adap, in lpc32xx_i2c_set_bus_speed() argument
257 return __i2c_set_bus_speed(lpc32xx_i2c[adap->hwadapnr], speed, in lpc32xx_i2c_set_bus_speed()
[all …]
A Dkona_i2c.c617 struct bcm_kona_i2c_dev *kona_get_dev(struct i2c_adapter *adap) in kona_get_dev() argument
619 return &g_i2c_devs[adap->hwadapnr]; in kona_get_dev()
624 struct bcm_kona_i2c_dev *dev = kona_get_dev(adap); in kona_i2c_init()
638 struct bcm_kona_i2c_dev *dev = kona_get_dev(adap); in kona_i2c_read()
654 kona_i2c_init(adap, adap->speed, adap->slaveaddr); in kona_i2c_read()
667 struct bcm_kona_i2c_dev *dev = kona_get_dev(adap); in kona_i2c_write()
678 kona_i2c_init(adap, adap->speed, adap->slaveaddr); in kona_i2c_write()
686 static int kona_i2c_probe(struct i2c_adapter *adap, uchar chip) in kona_i2c_probe() argument
693 return kona_i2c_read(adap, chip, 0x0, 1, &tmp, 1); in kona_i2c_probe()
696 static uint kona_i2c_set_bus_speed(struct i2c_adapter *adap, uint speed) in kona_i2c_set_bus_speed() argument
[all …]
A Ddavinci_i2c.c344 static struct i2c_regs *davinci_get_base(struct i2c_adapter *adap) in davinci_get_base() argument
346 switch (adap->hwadapnr) { in davinci_get_base()
359 printf("wrong hwadapnr: %d\n", adap->hwadapnr); in davinci_get_base()
367 struct i2c_regs *i2c_base = davinci_get_base(adap); in davinci_i2c_setspeed()
370 adap->speed = speed; in davinci_i2c_setspeed()
376 static void davinci_i2c_init(struct i2c_adapter *adap, int speed, in davinci_i2c_init() argument
379 struct i2c_regs *i2c_base = davinci_get_base(adap); in davinci_i2c_init()
381 adap->speed = speed; in davinci_i2c_init()
390 struct i2c_regs *i2c_base = davinci_get_base(adap); in davinci_i2c_read()
397 struct i2c_regs *i2c_base = davinci_get_base(adap); in davinci_i2c_write()
[all …]
A Dsh_i2c.c208 sh_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd) in sh_i2c_init() argument
242 static int sh_i2c_read(struct i2c_adapter *adap, uint8_t chip, in sh_i2c_read() argument
246 struct sh_i2c *dev = (struct sh_i2c *)i2c_dev[adap->hwadapnr]; in sh_i2c_read()
260 static int sh_i2c_write(struct i2c_adapter *adap, uint8_t chip, uint addr, in sh_i2c_write() argument
263 struct sh_i2c *dev = (struct sh_i2c *)i2c_dev[adap->hwadapnr]; in sh_i2c_write()
275 sh_i2c_probe(struct i2c_adapter *adap, u8 dev) in sh_i2c_probe() argument
279 return sh_i2c_read(adap, dev, 0, 0, dummy, sizeof dummy); in sh_i2c_probe()
282 static unsigned int sh_i2c_set_bus_speed(struct i2c_adapter *adap, in sh_i2c_set_bus_speed() argument
285 struct sh_i2c *dev = (struct sh_i2c *)i2c_dev[adap->hwadapnr]; in sh_i2c_set_bus_speed()
288 sh_i2c_init(adap, speed, 0); in sh_i2c_set_bus_speed()
A Ddesignware_i2c.c619 static struct i2c_regs *i2c_get_base(struct i2c_adapter *adap) in i2c_get_base() argument
621 switch (adap->hwadapnr) { in i2c_get_base()
637 printf("Wrong I2C-adapter number %d\n", adap->hwadapnr); in i2c_get_base()
643 static unsigned int dw_i2c_set_bus_speed(struct i2c_adapter *adap, in dw_i2c_set_bus_speed() argument
646 adap->speed = speed; in dw_i2c_set_bus_speed()
652 __dw_i2c_init(i2c_get_base(adap), speed, slaveaddr); in dw_i2c_init()
655 static int dw_i2c_read(struct i2c_adapter *adap, u8 dev, uint addr, in dw_i2c_read() argument
661 static int dw_i2c_write(struct i2c_adapter *adap, u8 dev, uint addr, in dw_i2c_write() argument
668 static int dw_i2c_probe(struct i2c_adapter *adap, u8 dev) in dw_i2c_probe() argument
670 struct i2c_regs *i2c_base = i2c_get_base(adap); in dw_i2c_probe()
[all …]
A Dfsl_i2c.c501 static void fsl_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd) in fsl_i2c_init() argument
503 __i2c_init(i2c_base[adap->hwadapnr], speed, slaveadd, in fsl_i2c_init()
504 get_i2c_clock(adap->hwadapnr), adap->hwadapnr); in fsl_i2c_init()
507 static int fsl_i2c_probe_chip(struct i2c_adapter *adap, uchar chip) in fsl_i2c_probe_chip() argument
509 return __i2c_probe_chip(i2c_base[adap->hwadapnr], chip); in fsl_i2c_probe_chip()
512 static int fsl_i2c_read(struct i2c_adapter *adap, u8 chip_addr, uint offset, in fsl_i2c_read() argument
517 return __i2c_read(i2c_base[adap->hwadapnr], chip_addr, &o[4 - olen], in fsl_i2c_read()
526 return __i2c_write(i2c_base[adap->hwadapnr], chip_addr, &o[4 - olen], in fsl_i2c_write()
530 static uint fsl_i2c_set_bus_speed(struct i2c_adapter *adap, uint speed) in fsl_i2c_set_bus_speed() argument
532 return __i2c_set_bus_speed(i2c_base[adap->hwadapnr], speed, in fsl_i2c_set_bus_speed()
[all …]
A Domap24xx_i2c.c844 static void __iomem *omap24_get_base(struct i2c_adapter *adap) in omap24_get_base() argument
846 switch (adap->hwadapnr) { in omap24_get_base()
869 printf("wrong hwadapnr: %d\n", adap->hwadapnr); in omap24_get_base()
888 void __iomem *i2c_base = omap24_get_base(adap); in omap24_i2c_read()
898 void __iomem *i2c_base = omap24_get_base(adap); in omap24_i2c_write()
907 void __iomem *i2c_base = omap24_get_base(adap); in omap24_i2c_setspeed()
917 adap->speed = speed; in omap24_i2c_setspeed()
924 void __iomem *i2c_base = omap24_get_base(adap); in omap24_i2c_init()
928 &adap->waitdelay); in omap24_i2c_init()
931 static int omap24_i2c_probe(struct i2c_adapter *adap, uchar chip) in omap24_i2c_probe() argument
[all …]
A Dmvtwsi.c195 static struct mvtwsi_registers *twsi_get_base(struct i2c_adapter *adap) in twsi_get_base() argument
197 switch (adap->hwadapnr) { in twsi_get_base()
223 printf("Missing mvtwsi controller %d base\n", adap->hwadapnr); in twsi_get_base()
687 static void twsi_i2c_init(struct i2c_adapter *adap, int speed, in twsi_i2c_init() argument
690 struct mvtwsi_registers *twsi = twsi_get_base(adap); in twsi_i2c_init()
694 static uint twsi_i2c_set_bus_speed(struct i2c_adapter *adap, in twsi_i2c_set_bus_speed() argument
697 struct mvtwsi_registers *twsi = twsi_get_base(adap); in twsi_i2c_set_bus_speed()
702 static int twsi_i2c_probe(struct i2c_adapter *adap, uchar chip) in twsi_i2c_probe() argument
704 struct mvtwsi_registers *twsi = twsi_get_base(adap); in twsi_i2c_probe()
711 struct mvtwsi_registers *twsi = twsi_get_base(adap); in twsi_i2c_read()
[all …]
A Dihs_i2c.c254 static int ihs_i2c_access(struct i2c_adapter *adap, uchar chip, u8 *addr, in ihs_i2c_access()
364 static void ihs_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr) in ihs_i2c_init() argument
376 static int ihs_i2c_probe(struct i2c_adapter *adap, uchar chip) in ihs_i2c_probe() argument
388 static int ihs_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr, in ihs_i2c_read() argument
395 return ihs_i2c_access(adap, chip, addr_bytes, alen, buffer, len, in ihs_i2c_read()
399 static int ihs_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr, in ihs_i2c_write() argument
406 return ihs_i2c_access(adap, chip, addr_bytes, alen, buffer, len, in ihs_i2c_write()
410 static unsigned int ihs_i2c_set_bus_speed(struct i2c_adapter *adap, in ihs_i2c_set_bus_speed() argument
413 if (speed != adap->speed) in ihs_i2c_set_bus_speed()
A Di2c_core.c60 static int i2c_mux_set(struct i2c_adapter *adap, int mux_id, int chip, in i2c_mux_set() argument
69 ret = adap->write(adap, chip, 0, 0, &buf, 1); in i2c_mux_set()
102 ret = adap->write(adap, chip, 0, 0, &buf, 1); in i2c_mux_set()
A Dmxc_i2c.c736 struct mxc_i2c_bus *i2c_get_base(struct i2c_adapter *adap) in i2c_get_base() argument
738 return &mxc_i2c_buses[adap->hwadapnr]; in i2c_get_base()
741 static int mxc_i2c_read(struct i2c_adapter *adap, uint8_t chip, in mxc_i2c_read() argument
745 return bus_i2c_read(i2c_get_base(adap), chip, addr, alen, buffer, len); in mxc_i2c_read()
748 static int mxc_i2c_write(struct i2c_adapter *adap, uint8_t chip, in mxc_i2c_write() argument
752 return bus_i2c_write(i2c_get_base(adap), chip, addr, alen, buffer, len); in mxc_i2c_write()
758 static int mxc_i2c_probe(struct i2c_adapter *adap, uint8_t chip) in mxc_i2c_probe() argument
760 return bus_i2c_write(i2c_get_base(adap), chip, 0, 0, NULL, 0); in mxc_i2c_probe()
808 bus_i2c_init(adap->hwadapnr, speed, slaveaddr, NULL, NULL); in mxc_i2c_init()
814 static u32 mxc_i2c_set_bus_speed(struct i2c_adapter *adap, uint speed) in mxc_i2c_set_bus_speed() argument
[all …]
A Dsoft_i2c.c286 static void soft_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr) in soft_i2c_init() argument
309 static int soft_i2c_probe(struct i2c_adapter *adap, uint8_t addr) in soft_i2c_probe() argument
327 static int soft_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr, in soft_i2c_read() argument
402 static int soft_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr, in soft_i2c_write() argument
/u-boot/include/
A Di2c.h622 void (*init)(struct i2c_adapter *adap, int speed,
624 int (*probe)(struct i2c_adapter *adap, uint8_t chip);
625 int (*read)(struct i2c_adapter *adap, uint8_t chip,
628 int (*write)(struct i2c_adapter *adap, uint8_t chip,
631 uint (*set_bus_speed)(struct i2c_adapter *adap,

Completed in 22 milliseconds