diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-04 02:55:23 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-14 02:51:09 +0300 |
commit | 8a8d24bdf174851ebb8607f359d54b72e3283b97 (patch) | |
tree | 89fe2b9fd0c33209ce154170f9bda61f624dd9cd /drivers/gpio/dwapb_gpio.c | |
parent | b012ff1f1b0d662587dcf8707fe7cbf1c1f35d2f (diff) | |
download | u-boot-8a8d24bdf174851ebb8607f359d54b72e3283b97.tar.xz |
dm: treewide: Rename ..._platdata variables to just ..._plat
Try to maintain some consistency between these variables by using _plat as
a suffix for them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/gpio/dwapb_gpio.c')
-rw-r--r-- | drivers/gpio/dwapb_gpio.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c index 42158bd84a..acd77b6892 100644 --- a/drivers/gpio/dwapb_gpio.c +++ b/drivers/gpio/dwapb_gpio.c @@ -36,7 +36,7 @@ struct gpio_dwapb_priv { struct reset_ctl_bulk resets; }; -struct gpio_dwapb_platdata { +struct gpio_dwapb_plat { const char *name; int bank; int pins; @@ -45,7 +45,7 @@ struct gpio_dwapb_platdata { static int dwapb_gpio_direction_input(struct udevice *dev, unsigned pin) { - struct gpio_dwapb_platdata *plat = dev_get_plat(dev); + struct gpio_dwapb_plat *plat = dev_get_plat(dev); clrbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin); return 0; @@ -54,7 +54,7 @@ static int dwapb_gpio_direction_input(struct udevice *dev, unsigned pin) static int dwapb_gpio_direction_output(struct udevice *dev, unsigned pin, int val) { - struct gpio_dwapb_platdata *plat = dev_get_plat(dev); + struct gpio_dwapb_plat *plat = dev_get_plat(dev); setbits_le32(plat->base + GPIO_SWPORT_DDR(plat->bank), 1 << pin); @@ -68,7 +68,7 @@ static int dwapb_gpio_direction_output(struct udevice *dev, unsigned pin, static int dwapb_gpio_set_value(struct udevice *dev, unsigned pin, int val) { - struct gpio_dwapb_platdata *plat = dev_get_plat(dev); + struct gpio_dwapb_plat *plat = dev_get_plat(dev); if (val) setbits_le32(plat->base + GPIO_SWPORT_DR(plat->bank), 1 << pin); @@ -80,7 +80,7 @@ static int dwapb_gpio_set_value(struct udevice *dev, unsigned pin, int val) static int dwapb_gpio_get_function(struct udevice *dev, unsigned offset) { - struct gpio_dwapb_platdata *plat = dev_get_plat(dev); + struct gpio_dwapb_plat *plat = dev_get_plat(dev); u32 gpio; gpio = readl(plat->base + GPIO_SWPORT_DDR(plat->bank)); @@ -93,7 +93,7 @@ static int dwapb_gpio_get_function(struct udevice *dev, unsigned offset) static int dwapb_gpio_get_value(struct udevice *dev, unsigned pin) { - struct gpio_dwapb_platdata *plat = dev_get_plat(dev); + struct gpio_dwapb_plat *plat = dev_get_plat(dev); u32 value; if (dwapb_gpio_get_function(dev, pin) == GPIOF_OUTPUT) @@ -141,7 +141,7 @@ static int gpio_dwapb_reset(struct udevice *dev) static int gpio_dwapb_probe(struct udevice *dev) { struct gpio_dev_priv *priv = dev_get_uclass_priv(dev); - struct gpio_dwapb_platdata *plat = dev->plat; + struct gpio_dwapb_plat *plat = dev->plat; if (!plat) { /* Reset on parent device only */ @@ -156,7 +156,7 @@ static int gpio_dwapb_probe(struct udevice *dev) static int gpio_dwapb_bind(struct udevice *dev) { - struct gpio_dwapb_platdata *plat = dev_get_plat(dev); + struct gpio_dwapb_plat *plat = dev_get_plat(dev); struct udevice *subdev; fdt_addr_t base; int ret, bank = 0; @@ -215,7 +215,7 @@ static int gpio_dwapb_bind(struct udevice *dev) static int gpio_dwapb_remove(struct udevice *dev) { - struct gpio_dwapb_platdata *plat = dev_get_plat(dev); + struct gpio_dwapb_plat *plat = dev_get_plat(dev); struct gpio_dwapb_priv *priv = dev_get_priv(dev); if (!plat && priv) |