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/nx_gpio.c | |
parent | b012ff1f1b0d662587dcf8707fe7cbf1c1f35d2f (diff) | |
download | u-boot-8a8d24bdf174851ebb8607f359d54b72e3283b97.zip u-boot-8a8d24bdf174851ebb8607f359d54b72e3283b97.tar.gz u-boot-8a8d24bdf174851ebb8607f359d54b72e3283b97.tar.bz2 |
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/nx_gpio.c')
-rw-r--r-- | drivers/gpio/nx_gpio.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpio/nx_gpio.c b/drivers/gpio/nx_gpio.c index 8c5fd67..52851e5 100644 --- a/drivers/gpio/nx_gpio.c +++ b/drivers/gpio/nx_gpio.c @@ -36,7 +36,7 @@ struct nx_alive_gpio_regs { u32 pad; /* Alive GPIO Input Value Register */ }; -struct nx_gpio_platdata { +struct nx_gpio_plat { void *regs; int gpio_count; const char *bank_name; @@ -44,7 +44,7 @@ struct nx_gpio_platdata { static int nx_alive_gpio_is_check(struct udevice *dev) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); const char *bank_name = plat->bank_name; if (!strcmp(bank_name, "gpio_alv")) @@ -55,7 +55,7 @@ static int nx_alive_gpio_is_check(struct udevice *dev) static int nx_alive_gpio_direction_input(struct udevice *dev, unsigned int pin) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_alive_gpio_regs *const regs = plat->regs; setbits_le32(®s->outputenb_reset, 1 << pin); @@ -66,7 +66,7 @@ static int nx_alive_gpio_direction_input(struct udevice *dev, unsigned int pin) static int nx_alive_gpio_direction_output(struct udevice *dev, unsigned int pin, int val) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_alive_gpio_regs *const regs = plat->regs; if (val) @@ -81,7 +81,7 @@ static int nx_alive_gpio_direction_output(struct udevice *dev, unsigned int pin, static int nx_alive_gpio_get_value(struct udevice *dev, unsigned int pin) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_alive_gpio_regs *const regs = plat->regs; unsigned int mask = 1UL << pin; unsigned int value; @@ -94,7 +94,7 @@ static int nx_alive_gpio_get_value(struct udevice *dev, unsigned int pin) static int nx_alive_gpio_set_value(struct udevice *dev, unsigned int pin, int val) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_alive_gpio_regs *const regs = plat->regs; if (val) @@ -107,7 +107,7 @@ static int nx_alive_gpio_set_value(struct udevice *dev, unsigned int pin, static int nx_alive_gpio_get_function(struct udevice *dev, unsigned int pin) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_alive_gpio_regs *const regs = plat->regs; unsigned int mask = (1UL << pin); unsigned int output; @@ -122,7 +122,7 @@ static int nx_alive_gpio_get_function(struct udevice *dev, unsigned int pin) static int nx_gpio_direction_input(struct udevice *dev, unsigned int pin) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_gpio_regs *const regs = plat->regs; if (nx_alive_gpio_is_check(dev)) @@ -136,7 +136,7 @@ static int nx_gpio_direction_input(struct udevice *dev, unsigned int pin) static int nx_gpio_direction_output(struct udevice *dev, unsigned int pin, int val) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_gpio_regs *const regs = plat->regs; if (nx_alive_gpio_is_check(dev)) @@ -154,7 +154,7 @@ static int nx_gpio_direction_output(struct udevice *dev, unsigned int pin, static int nx_gpio_get_value(struct udevice *dev, unsigned int pin) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_gpio_regs *const regs = plat->regs; unsigned int mask = 1UL << pin; unsigned int value; @@ -169,7 +169,7 @@ static int nx_gpio_get_value(struct udevice *dev, unsigned int pin) static int nx_gpio_set_value(struct udevice *dev, unsigned int pin, int val) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_gpio_regs *const regs = plat->regs; if (nx_alive_gpio_is_check(dev)) @@ -185,7 +185,7 @@ static int nx_gpio_set_value(struct udevice *dev, unsigned int pin, int val) static int nx_gpio_get_function(struct udevice *dev, unsigned int pin) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); struct nx_gpio_regs *const regs = plat->regs; unsigned int mask = (1UL << pin); unsigned int output; @@ -204,7 +204,7 @@ static int nx_gpio_get_function(struct udevice *dev, unsigned int pin) static int nx_gpio_probe(struct udevice *dev) { struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); uc_priv->gpio_count = plat->gpio_count; uc_priv->bank_name = plat->bank_name; @@ -214,7 +214,7 @@ static int nx_gpio_probe(struct udevice *dev) static int nx_gpio_of_to_plat(struct udevice *dev) { - struct nx_gpio_platdata *plat = dev_get_plat(dev); + struct nx_gpio_plat *plat = dev_get_plat(dev); plat->regs = map_physmem(devfdt_get_addr(dev), sizeof(struct nx_gpio_regs), @@ -245,6 +245,6 @@ U_BOOT_DRIVER(nx_gpio) = { .of_match = nx_gpio_ids, .ops = &nx_gpio_ops, .of_to_plat = nx_gpio_of_to_plat, - .plat_auto = sizeof(struct nx_gpio_platdata), + .plat_auto = sizeof(struct nx_gpio_plat), .probe = nx_gpio_probe, }; |