Lines Matching refs:adap
619 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()
647 return _dw_i2c_set_bus_speed(NULL, i2c_get_base(adap), speed, IC_CLK); in dw_i2c_set_bus_speed()
650 static void dw_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr) in dw_i2c_init() argument
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
658 return __dw_i2c_read(i2c_get_base(adap), dev, addr, alen, buffer, len); in dw_i2c_read()
661 static int dw_i2c_write(struct i2c_adapter *adap, u8 dev, uint addr, in dw_i2c_write() argument
664 return __dw_i2c_write(i2c_get_base(adap), dev, addr, alen, buffer, len); in dw_i2c_write()
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()
679 dw_i2c_init(adap, adap->speed, adap->slaveaddr); in dw_i2c_probe()