aboutsummaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-02-04 21:21:56 -0700
committerTom Rini <trini@konsulko.com>2021-03-03 14:51:06 -0500
commit9648789e2634e30fc58ad7180a7c7815e6227061 (patch)
tree1533178802a6fa29f12ce021b903d26477adee81 /include/asm-generic
parent13979fc44667cbc577f3c4d07b6692de104a3174 (diff)
downloadu-boot-9648789e2634e30fc58ad7180a7c7815e6227061.zip
u-boot-9648789e2634e30fc58ad7180a7c7815e6227061.tar.gz
u-boot-9648789e2634e30fc58ad7180a7c7815e6227061.tar.bz2
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 'include/asm-generic')
-rw-r--r--include/asm-generic/gpio.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index de16cab..153312d 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -333,19 +333,20 @@ struct dm_gpio_ops {
int (*set_flags)(struct udevice *dev, unsigned int offset, ulong flags);
/**
- * get_dir_flags() - Get GPIO dir flags
+ * get_flags() - Get GPIO flags
*
- * This function return the GPIO direction flags used.
+ * This function return the GPIO flags used. It should read this from
+ * the hardware directly.
*
* This method is optional.
*
* @dev: GPIO device
* @offset: GPIO offset within that device
- * @flags: place to put the used direction flags by GPIO
+ * @flagsp: place to put the current flags value
* @return 0 if OK, -ve on error
*/
- int (*get_dir_flags)(struct udevice *dev, unsigned int offset,
- ulong *flags);
+ int (*get_flags)(struct udevice *dev, unsigned int offset,
+ ulong *flagsp);
#if CONFIG_IS_ENABLED(ACPIGEN)
/**