summaryrefslogtreecommitdiff
path: root/drivers/gpio/pcf8575_gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/pcf8575_gpio.c')
-rw-r--r--drivers/gpio/pcf8575_gpio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpio/pcf8575_gpio.c b/drivers/gpio/pcf8575_gpio.c
index 1b9a18fe5d..6d38646ef6 100644
--- a/drivers/gpio/pcf8575_gpio.c
+++ b/drivers/gpio/pcf8575_gpio.c
@@ -55,7 +55,7 @@ struct pcf8575_chip {
static int pcf8575_i2c_write_le16(struct udevice *dev, unsigned int word)
{
- struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
+ struct dm_i2c_chip *chip = dev_get_parent_plat(dev);
u8 buf[2] = { word & 0xff, word >> 8, };
int ret;
@@ -69,7 +69,7 @@ static int pcf8575_i2c_write_le16(struct udevice *dev, unsigned int word)
static int pcf8575_i2c_read_le16(struct udevice *dev)
{
- struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
+ struct dm_i2c_chip *chip = dev_get_parent_plat(dev);
u8 buf[2];
int ret;
@@ -85,7 +85,7 @@ static int pcf8575_i2c_read_le16(struct udevice *dev)
static int pcf8575_direction_input(struct udevice *dev, unsigned offset)
{
- struct pcf8575_chip *plat = dev_get_platdata(dev);
+ struct pcf8575_chip *plat = dev_get_plat(dev);
int status;
plat->out |= BIT(offset);
@@ -97,7 +97,7 @@ static int pcf8575_direction_input(struct udevice *dev, unsigned offset)
static int pcf8575_direction_output(struct udevice *dev,
unsigned int offset, int value)
{
- struct pcf8575_chip *plat = dev_get_platdata(dev);
+ struct pcf8575_chip *plat = dev_get_plat(dev);
int ret;
if (value)
@@ -125,9 +125,9 @@ static int pcf8575_set_value(struct udevice *dev, unsigned int offset,
return pcf8575_direction_output(dev, offset, value);
}
-static int pcf8575_ofdata_platdata(struct udevice *dev)
+static int pcf8575_ofdata_plat(struct udevice *dev)
{
- struct pcf8575_chip *plat = dev_get_platdata(dev);
+ struct pcf8575_chip *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
int n_latch;
@@ -175,7 +175,7 @@ U_BOOT_DRIVER(gpio_pcf8575) = {
.id = UCLASS_GPIO,
.ops = &pcf8575_gpio_ops,
.of_match = pcf8575_gpio_ids,
- .ofdata_to_platdata = pcf8575_ofdata_platdata,
+ .of_to_plat = pcf8575_ofdata_plat,
.probe = pcf8575_gpio_probe,
- .platdata_auto_alloc_size = sizeof(struct pcf8575_chip),
+ .plat_auto = sizeof(struct pcf8575_chip),
};