• Vladimir Zapolskiy's avatar
    gpio: rcar: select General Output Register to set output states · 3ae4f3aa
    Vladimir Zapolskiy authored
    R-Car GPIO controller provides two interfaces to set GPIO line output
    signal state, and for a particular GPIO line the selected interface is
    determined by OUTDTSEL bit value.
    
    At the moment the driver supports only one of two interfaces, namely
    OUTDT General Output Register is used to control the output signal.
    
    While this selection is the default one on reset, it is not explicitly
    configured on probe, thus it might be possible that kernel and userspace
    consumers of a GPIO won't be able to set the wanted GPIO output signal.
    
    Below is a simple test case to reproduce the described problem and
    verify this fix in the kernel on H3 ULCB by setting non-default OUTDTSEL
    configuration from a bootloader:
    
      u-boot    > mw.l 0xe6055440 0x3000 1
      ...
      userspace > echo default-on > /sys/devices/platform/leds/leds/led5/trigger
      userspace > echo default-on > /sys/devices/platform/leds/leds/led6/trigger
    Signed-off-by: default avatarVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    3ae4f3aa
gpio-rcar.c 15.5 KB