diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2018-10-24 14:10:13 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-11-16 16:51:55 -0500 |
commit | f55a0c0a20cad56440ebe9a9b2999f21ae00f61a (patch) | |
tree | e5553e7659fb952f9ffabc140b007e215b58ab8e /drivers/pinctrl/pinctrl-uclass.c | |
parent | f9c87adc47a84fbe44f580ffa5fd2540ce7793b2 (diff) |
dm: pinctrl: Add get_pin_muxing() ops
Add get_pin_muxing() which allows to display the muxing
of a given pin belonging to a pin-controller.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-uclass.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-uclass.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index c38bb212ed..3833dd2324 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -249,6 +249,17 @@ int pinctrl_get_gpio_mux(struct udevice *dev, int banknum, int index) return ops->get_gpio_mux(dev, banknum, index); } +int pinctrl_get_pin_muxing(struct udevice *dev, int selector, char *buf, + int size) +{ + struct pinctrl_ops *ops = pinctrl_get_ops(dev); + + if (!ops->get_pin_muxing) + return -ENOSYS; + + return ops->get_pin_muxing(dev, selector, buf, size); +} + /** * pinconfig_post_bind() - post binding for PINCTRL uclass * Recursively bind child nodes as pinconfig devices in case of full pinctrl. |