• Simon Glass's avatar
    dm: pinctrl: Add a way for a GPIO driver to obtain a pin function · 77eaa19e
    Simon Glass authored
    GPIO drivers want to be able to show if a pin is enabled for input, output,
    or is being used by another function. Some drivers can easily find this
    and the code is included in the driver. For some SoCs this is more complex.
    Conceptually this should be handled by pinctrl rather than GPIO. Most
    pinctrl drivers will have this feature anyway.
    Add a method by which a GPIO driver can obtain the pin mux value given a
    GPIO reference. This avoids repeating the code in two places.
    Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
pinctrl-uclass.c 6.56 KB