diff options
Diffstat (limited to 'drivers/i2c/lpc32xx_i2c.c')
-rw-r--r-- | drivers/i2c/lpc32xx_i2c.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c index 6af2e975cf..ad11e978cc 100644 --- a/drivers/i2c/lpc32xx_i2c.c +++ b/drivers/i2c/lpc32xx_i2c.c @@ -281,8 +281,12 @@ U_BOOT_I2C_ADAP_COMPLETE(lpc32xx_2, lpc32xx_i2c_init, NULL, #else /* CONFIG_DM_I2C */ static int lpc32xx_i2c_probe(struct udevice *bus) { - struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus); - bus->seq = dev->index; + struct lpc32xx_i2c_dev *dev = dev_get_plat(bus); + + /* + * FIXME: This is not permitted + * dev_seq(bus) = dev->index; + */ __i2c_init(dev->base, dev->speed, 0, dev->index); return 0; @@ -291,14 +295,14 @@ static int lpc32xx_i2c_probe(struct udevice *bus) static int lpc32xx_i2c_probe_chip(struct udevice *bus, u32 chip_addr, u32 chip_flags) { - struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus); + struct lpc32xx_i2c_dev *dev = dev_get_plat(bus); return __i2c_probe_chip(dev->base, chip_addr); } static int lpc32xx_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, int nmsgs) { - struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus); + struct lpc32xx_i2c_dev *dev = dev_get_plat(bus); struct i2c_msg *dmsg, *omsg, dummy; uint i = 0, address = 0; @@ -330,13 +334,13 @@ static int lpc32xx_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, static int lpc32xx_i2c_set_bus_speed(struct udevice *bus, unsigned int speed) { - struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus); + struct lpc32xx_i2c_dev *dev = dev_get_plat(bus); return __i2c_set_bus_speed(dev->base, speed, dev->index); } static int lpc32xx_i2c_reset(struct udevice *bus) { - struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus); + struct lpc32xx_i2c_dev *dev = dev_get_plat(bus); __i2c_init(dev->base, dev->speed, 0, dev->index); return 0; |