summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-04 02:55:20 +0300
committerSimon Glass <sjg@chromium.org>2020-12-14 02:51:09 +0300
commitc69cda25c9b59e53a6bc8969ada58942549f5b5d (patch)
tree8c84d1773465eb8e06cbbaeb710daa6217f5618d /drivers/i2c
parent4f50086ad6d69c355a07389fb436c64c92ec614a (diff)
downloadu-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.xz
dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/lpc32xx_i2c.c10
-rw-r--r--drivers/i2c/omap24xx_i2c.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index 6af2e975cf..e321d4b70d 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -281,7 +281,7 @@ 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);
+ struct lpc32xx_i2c_dev *dev = dev_get_plat(bus);
bus->seq = dev->index;
__i2c_init(dev->base, dev->speed, 0, dev->index);
@@ -291,14 +291,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 +330,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;
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index ea9e93327d..9d05a1f702 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -1049,7 +1049,7 @@ static int omap_i2c_probe_chip(struct udevice *bus, uint chip_addr,
static int omap_i2c_probe(struct udevice *bus)
{
struct omap_i2c *priv = dev_get_priv(bus);
- struct omap_i2c_platdata *plat = dev_get_platdata(bus);
+ struct omap_i2c_platdata *plat = dev_get_plat(bus);
priv->speed = plat->speed;
priv->regs = map_physmem(plat->base, sizeof(void *),
@@ -1065,7 +1065,7 @@ static int omap_i2c_probe(struct udevice *bus)
#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
static int omap_i2c_ofdata_to_platdata(struct udevice *bus)
{
- struct omap_i2c_platdata *plat = dev_get_platdata(bus);
+ struct omap_i2c_platdata *plat = dev_get_plat(bus);
plat->base = dev_read_addr(bus);
plat->speed = dev_read_u32_default(bus, "clock-frequency",