summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-02-05 07:21:56 +0300
committerTom Rini <trini@konsulko.com>2021-03-03 22:51:06 +0300
commit9648789e2634e30fc58ad7180a7c7815e6227061 (patch)
tree1533178802a6fa29f12ce021b903d26477adee81 /drivers/pinctrl
parent13979fc44667cbc577f3c4d07b6692de104a3174 (diff)
downloadu-boot-9648789e2634e30fc58ad7180a7c7815e6227061.tar.xz
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/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-stmfx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index 6147e867dc..6ba56a16a3 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -199,8 +199,8 @@ static int stmfx_gpio_set_flags(struct udevice *dev, unsigned int offset,
return ret;
}
-static int stmfx_gpio_get_dir_flags(struct udevice *dev, unsigned int offset,
- ulong *flags)
+static int stmfx_gpio_get_flags(struct udevice *dev, unsigned int offset,
+ ulong *flagsp)
{
ulong dir_flags = 0;
int ret;
@@ -233,7 +233,7 @@ static int stmfx_gpio_get_dir_flags(struct udevice *dev, unsigned int offset,
dir_flags |= GPIOD_PULL_DOWN;
}
}
- *flags = dir_flags;
+ *flagsp = dir_flags;
return 0;
}
@@ -267,7 +267,7 @@ static const struct dm_gpio_ops stmfx_gpio_ops = {
.direction_input = stmfx_gpio_direction_input,
.direction_output = stmfx_gpio_direction_output,
.set_flags = stmfx_gpio_set_flags,
- .get_dir_flags = stmfx_gpio_get_dir_flags,
+ .get_flags = stmfx_gpio_get_flags,
};
U_BOOT_DRIVER(stmfx_gpio) = {