diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-09-02 13:59:22 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2025-09-08 14:22:58 +0200 |
commit | 11aa02d6a9c222260490f952d041dec6d7f16a92 (patch) | |
tree | c7d4dec9bab2ae6951c548660899e816ea1d29ff /rust/helpers/bitmap.c | |
parent | 6f6835beab99c770f1cc6de99b3e3b73c333dec7 (diff) |
pinctrl: allow to mark pin functions as requestable GPIOs
The name of the pin function has no real meaning to pinctrl core and is
there only for human readability of device properties. Some pins are
muxed as GPIOs but for "strict" pinmuxers it's impossible to request
them as GPIOs if they're bound to a devide - even if their function name
explicitly says "gpio". Add a new field to struct pinfunction that
allows to pass additional flags to pinctrl core. While we could go with
a boolean "is_gpio" field, a flags field is more future-proof.
If the PINFUNCTION_FLAG_GPIO is set for a given function, the pin muxed
to it can be requested as GPIO even on strict pin controllers. Add a new
callback to struct pinmux_ops - function_is_gpio() - that allows pinmux
core to inspect a function and see if it's a GPIO one. Provide a generic
implementation of this callback.
Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'rust/helpers/bitmap.c')
0 files changed, 0 insertions, 0 deletions