diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2018-10-24 14:10:14 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-11-16 16:51:55 -0500 |
commit | 8bbb5b20852aa81024eb7b2dcc3eb58275e83bb0 (patch) | |
tree | abb664eb3cff6672d0496f0304866e33d362f98d /include/dm | |
parent | f55a0c0a20cad56440ebe9a9b2999f21ae00f61a (diff) |
dm: pinctrl: Add pinctrl_get_pin_name and pinctrl_get_pins_count
Add pinctrl_get_pin_name() and pinctrl_get_pins_count() methods
to obtain pin's name and pin's muxing given a pin reference.
This will be used by the new pinmux command.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/pinctrl.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index e88438d6a5..5a7c5f102e 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -382,4 +382,26 @@ int pinctrl_get_gpio_mux(struct udevice *dev, int banknum, int index); int pinctrl_get_pin_muxing(struct udevice *dev, int selector, char *buf, int size); +/** + * pinctrl_get_pins_count() - display pin-controller pins number + * + * This allows to know the number of pins owned by a given pin-controller + * + * @dev: Pinctrl device to use + * @return pins number if OK, -ve on error + */ +int pinctrl_get_pins_count(struct udevice *dev); + +/** + * pinctrl_get_pin_name() - Returns the pin's name + * + * This allows to display the pin's name for debug purpose + * + * @dev: Pinctrl device to use + * @selector Pin index within pin-controller + * @buf Pin's name + * @return 0 if OK, -ve on error + */ +int pinctrl_get_pin_name(struct udevice *dev, int selector, char *buf, + int size); #endif /* __PINCTRL_H */ |