diff options
Diffstat (limited to 'drivers/gpio/nx_gpio.c')
-rw-r--r-- | drivers/gpio/nx_gpio.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpio/nx_gpio.c b/drivers/gpio/nx_gpio.c index f0bbb9e710..d69a22aff7 100644 --- a/drivers/gpio/nx_gpio.c +++ b/drivers/gpio/nx_gpio.c @@ -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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_platdata(dev); + struct nx_gpio_platdata *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_ofdata_to_platdata(struct udevice *dev) { - struct nx_gpio_platdata *plat = dev_get_platdata(dev); + struct nx_gpio_platdata *plat = dev_get_plat(dev); plat->regs = map_physmem(devfdt_get_addr(dev), sizeof(struct nx_gpio_regs), |