diff options
author | Simon Glass <sjg@chromium.org> | 2021-02-04 21:21:56 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-03 14:51:06 -0500 |
commit | 9648789e2634e30fc58ad7180a7c7815e6227061 (patch) | |
tree | 1533178802a6fa29f12ce021b903d26477adee81 /drivers/gpio/stm32_gpio.c | |
parent | 13979fc44667cbc577f3c4d07b6692de104a3174 (diff) |
dm: gpio: Rename get_dir_flags() method to get_flags()
It is more useful to be able to read all the flags, not just the direction
ones. In fact this is what the STM32 driver does. Update the method name
to reflect this.
Tweak the docs a little and use 'flagsp' as the return argument, as is
common in driver model, to indicate it returns a value.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Diffstat (limited to 'drivers/gpio/stm32_gpio.c')
-rw-r--r-- | drivers/gpio/stm32_gpio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/stm32_gpio.c b/drivers/gpio/stm32_gpio.c index 6d1bef63c36..c2d7046c0dd 100644 --- a/drivers/gpio/stm32_gpio.c +++ b/drivers/gpio/stm32_gpio.c @@ -223,8 +223,8 @@ static int stm32_gpio_set_flags(struct udevice *dev, unsigned int offset, return 0; } -static int stm32_gpio_get_dir_flags(struct udevice *dev, unsigned int offset, - ulong *flags) +static int stm32_gpio_get_flags(struct udevice *dev, unsigned int offset, + ulong *flagsp) { struct stm32_gpio_priv *priv = dev_get_priv(dev); struct stm32_gpio_regs *regs = priv->regs; @@ -259,7 +259,7 @@ static int stm32_gpio_get_dir_flags(struct udevice *dev, unsigned int offset, default: break; } - *flags = dir_flags; + *flagsp = dir_flags; return 0; } @@ -271,7 +271,7 @@ static const struct dm_gpio_ops gpio_stm32_ops = { .set_value = stm32_gpio_set_value, .get_function = stm32_gpio_get_function, .set_flags = stm32_gpio_set_flags, - .get_dir_flags = stm32_gpio_get_dir_flags, + .get_flags = stm32_gpio_get_flags, }; static int gpio_stm32_probe(struct udevice *dev) |