Skip to content
  • Marek Vasut's avatar
    gpio: Use separate bitfield array to indicate GPIO is claimed · aaf5b592
    Marek Vasut authored and Tom Rini's avatar Tom Rini committed
    The current gpio-uclass design uses name field in struct gpio_dev_priv as
    an indicator that GPIO is claimed by consumer. This overloads the function
    of name field and does not work well for named pins not configured as GPIO
    pins.
    
    Introduce separate bitfield array as the claim indicator.
    
    This unbreaks dual-purpose AF and GPIO operation on STM32MP since commit
    2c38f7c3
    
     ("pinctrl: pinctrl_stm32: Populate uc_priv->name[] with pinmux node's name")
    where any pin which has already been configured as AF could no longer be
    claimed as dual-purpose GPIO. This is important for pins like STM32 MMCI
    st,cmd-gpios .
    
    Signed-off-by: default avatarMarek Vasut <marex@denx.de>
    Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
    aaf5b592