diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-03 16:55:23 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 16:51:09 -0700 |
commit | 8a8d24bdf174851ebb8607f359d54b72e3283b97 (patch) | |
tree | 89fe2b9fd0c33209ce154170f9bda61f624dd9cd /drivers/gpio/sunxi_gpio.c | |
parent | b012ff1f1b0d662587dcf8707fe7cbf1c1f35d2f (diff) |
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/sunxi_gpio.c')
-rw-r--r-- | drivers/gpio/sunxi_gpio.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c index 567bd647ff..75494c7828 100644 --- a/drivers/gpio/sunxi_gpio.c +++ b/drivers/gpio/sunxi_gpio.c @@ -22,7 +22,7 @@ #define SUNXI_GPIOS_PER_BANK SUNXI_GPIO_A_NR -struct sunxi_gpio_platdata { +struct sunxi_gpio_plat { struct sunxi_gpio *regs; const char *bank_name; /* Name of bank, e.g. "B" */ int gpio_count; @@ -158,7 +158,7 @@ int sunxi_name_to_gpio(const char *name) static int sunxi_gpio_direction_input(struct udevice *dev, unsigned offset) { - struct sunxi_gpio_platdata *plat = dev_get_plat(dev); + struct sunxi_gpio_plat *plat = dev_get_plat(dev); sunxi_gpio_set_cfgbank(plat->regs, offset, SUNXI_GPIO_INPUT); @@ -168,7 +168,7 @@ static int sunxi_gpio_direction_input(struct udevice *dev, unsigned offset) static int sunxi_gpio_direction_output(struct udevice *dev, unsigned offset, int value) { - struct sunxi_gpio_platdata *plat = dev_get_plat(dev); + struct sunxi_gpio_plat *plat = dev_get_plat(dev); u32 num = GPIO_NUM(offset); sunxi_gpio_set_cfgbank(plat->regs, offset, SUNXI_GPIO_OUTPUT); @@ -179,7 +179,7 @@ static int sunxi_gpio_direction_output(struct udevice *dev, unsigned offset, static int sunxi_gpio_get_value(struct udevice *dev, unsigned offset) { - struct sunxi_gpio_platdata *plat = dev_get_plat(dev); + struct sunxi_gpio_plat *plat = dev_get_plat(dev); u32 num = GPIO_NUM(offset); unsigned dat; @@ -192,7 +192,7 @@ static int sunxi_gpio_get_value(struct udevice *dev, unsigned offset) static int sunxi_gpio_set_value(struct udevice *dev, unsigned offset, int value) { - struct sunxi_gpio_platdata *plat = dev_get_plat(dev); + struct sunxi_gpio_plat *plat = dev_get_plat(dev); u32 num = GPIO_NUM(offset); clrsetbits_le32(&plat->regs->dat, 1 << num, value ? (1 << num) : 0); @@ -201,7 +201,7 @@ static int sunxi_gpio_set_value(struct udevice *dev, unsigned offset, static int sunxi_gpio_get_function(struct udevice *dev, unsigned offset) { - struct sunxi_gpio_platdata *plat = dev_get_plat(dev); + struct sunxi_gpio_plat *plat = dev_get_plat(dev); int func; func = sunxi_gpio_get_cfgbank(plat->regs, offset); @@ -260,7 +260,7 @@ static char *gpio_bank_name(int bank) static int gpio_sunxi_probe(struct udevice *dev) { - struct sunxi_gpio_platdata *plat = dev_get_plat(dev); + struct sunxi_gpio_plat *plat = dev_get_plat(dev); struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); /* Tell the uclass how many GPIOs we have */ @@ -285,7 +285,7 @@ static int gpio_sunxi_bind(struct udevice *parent) { struct sunxi_gpio_soc_data *soc_data = (struct sunxi_gpio_soc_data *)dev_get_driver_data(parent); - struct sunxi_gpio_platdata *plat = parent->plat; + struct sunxi_gpio_plat *plat = parent->plat; struct sunxi_gpio_reg *ctlr; int bank, ret; @@ -295,7 +295,7 @@ static int gpio_sunxi_bind(struct udevice *parent) ctlr = dev_read_addr_ptr(parent); for (bank = 0; bank < soc_data->no_banks; bank++) { - struct sunxi_gpio_platdata *plat; + struct sunxi_gpio_plat *plat; struct udevice *dev; plat = calloc(1, sizeof(*plat)); |