diff options
author | Tom Rini <trini@konsulko.com> | 2021-01-11 13:55:03 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-11 13:55:03 -0500 |
commit | d71be1990218957b9f05dbf13a72859a2abe06d7 (patch) | |
tree | 99858dc9988f7f7b4c0ab1d8d45738e3abdf38c8 /drivers/gpio/pca953x_gpio.c | |
parent | c4fddedc48f336eabc4ce3f74940e6aa372de18c (diff) | |
parent | bc0b99bd8b19599f670f42401de655fa9b44cd94 (diff) |
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/gpio/pca953x_gpio.c')
-rw-r--r-- | drivers/gpio/pca953x_gpio.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c index fd17d1a5910..dc8911a8eb9 100644 --- a/drivers/gpio/pca953x_gpio.c +++ b/drivers/gpio/pca953x_gpio.c @@ -76,7 +76,7 @@ struct pca953x_info { static int pca953x_write_single(struct udevice *dev, int reg, u8 val, int offset) { - struct pca953x_info *info = dev_get_platdata(dev); + struct pca953x_info *info = dev_get_plat(dev); int bank_shift = fls((info->gpio_count - 1) / BANK_SZ); int off = offset / BANK_SZ; int ret = 0; @@ -93,7 +93,7 @@ static int pca953x_write_single(struct udevice *dev, int reg, u8 val, static int pca953x_read_single(struct udevice *dev, int reg, u8 *val, int offset) { - struct pca953x_info *info = dev_get_platdata(dev); + struct pca953x_info *info = dev_get_plat(dev); int bank_shift = fls((info->gpio_count - 1) / BANK_SZ); int off = offset / BANK_SZ; int ret; @@ -112,7 +112,7 @@ static int pca953x_read_single(struct udevice *dev, int reg, u8 *val, static int pca953x_read_regs(struct udevice *dev, int reg, u8 *val) { - struct pca953x_info *info = dev_get_platdata(dev); + struct pca953x_info *info = dev_get_plat(dev); int ret = 0; if (info->gpio_count <= 8) { @@ -137,7 +137,7 @@ static int pca953x_read_regs(struct udevice *dev, int reg, u8 *val) static int pca953x_write_regs(struct udevice *dev, int reg, u8 *val) { - struct pca953x_info *info = dev_get_platdata(dev); + struct pca953x_info *info = dev_get_plat(dev); int ret = 0; if (info->gpio_count <= 8) { @@ -160,7 +160,7 @@ static int pca953x_write_regs(struct udevice *dev, int reg, u8 *val) static int pca953x_is_output(struct udevice *dev, int offset) { - struct pca953x_info *info = dev_get_platdata(dev); + struct pca953x_info *info = dev_get_plat(dev); int bank = offset / BANK_SZ; int off = offset % BANK_SZ; @@ -185,7 +185,7 @@ static int pca953x_get_value(struct udevice *dev, uint offset) static int pca953x_set_value(struct udevice *dev, uint offset, int value) { - struct pca953x_info *info = dev_get_platdata(dev); + struct pca953x_info *info = dev_get_plat(dev); int bank = offset / BANK_SZ; int off = offset % BANK_SZ; u8 val; @@ -207,7 +207,7 @@ static int pca953x_set_value(struct udevice *dev, uint offset, int value) static int pca953x_set_direction(struct udevice *dev, uint offset, int dir) { - struct pca953x_info *info = dev_get_platdata(dev); + struct pca953x_info *info = dev_get_plat(dev); int bank = offset / BANK_SZ; int off = offset % BANK_SZ; u8 val; @@ -271,7 +271,7 @@ static const struct dm_gpio_ops pca953x_ops = { static int pca953x_probe(struct udevice *dev) { - struct pca953x_info *info = dev_get_platdata(dev); + struct pca953x_info *info = dev_get_plat(dev); struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); char name[32], label[8], *str; int addr; @@ -385,6 +385,6 @@ U_BOOT_DRIVER(pca953x) = { .id = UCLASS_GPIO, .ops = &pca953x_ops, .probe = pca953x_probe, - .platdata_auto_alloc_size = sizeof(struct pca953x_info), + .plat_auto = sizeof(struct pca953x_info), .of_match = pca953x_ids, }; |