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/sandbox.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/sandbox.c')
-rw-r--r-- | drivers/gpio/sandbox.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c index 05f17928f0..38dc34ee91 100644 --- a/drivers/gpio/sandbox.c +++ b/drivers/gpio/sandbox.c @@ -199,11 +199,11 @@ static int sb_gpio_set_flags(struct udevice *dev, unsigned int offset, return 0; } -static int sb_gpio_get_dir_flags(struct udevice *dev, unsigned int offset, - ulong *flags) +static int sb_gpio_get_flags(struct udevice *dev, unsigned int offset, + ulong *flagsp) { debug("%s: offset:%u\n", __func__, offset); - *flags = *get_gpio_dir_flags(dev, offset); + *flagsp = *get_gpio_dir_flags(dev, offset); return 0; } @@ -273,7 +273,7 @@ static const struct dm_gpio_ops gpio_sandbox_ops = { .get_function = sb_gpio_get_function, .xlate = sb_gpio_xlate, .set_flags = sb_gpio_set_flags, - .get_dir_flags = sb_gpio_get_dir_flags, + .get_flags = sb_gpio_get_flags, #if CONFIG_IS_ENABLED(ACPIGEN) .get_acpi = sb_gpio_get_acpi, #endif |