diff options
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 42158bd84a4..acd77b6892e 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) |