• Thierry Reding's avatar
    gpio: of: Restrict enable-gpio quirk to regulator-gpio · 3e033b1b
    Thierry Reding authored
    [ Upstream commit 692ef26e ]
    
    Commit 0e7d6f94 ("gpio: of: Apply regulator-gpio quirk only to
    enable-gpios") breaks the device tree ABI specified in the device tree
    bindings for fixed regulators (compatible "regulator-fixed"). According
    to these bindings the polarity of the GPIO is exclusively controlled by
    the presence or absence of the enable-active-high property. As such the
    polarity quirk implemented in of_gpio_flags_quirks() must be applied to
    the GPIO specified for fixed regulators.
    
    However, commit 0e7d6f94 ("gpio: of: Apply regulator-gpio quirk only
    to enable-gpios") restricted the quirk to the enable-gpios property for
    fixed regulators as well, whereas according to the commit message itself
    it should only apply to "regulator-gpio" compatible device tree nodes.
    
    Fix this by actually implementing what the offending commit intended,
    which is to ensure that the quirk is applied to the GPIO specified by
    the "enable-gpio" property for the "regulator-gpio" bindings only.
    
    This fixes a regression on Jetson TX1 where the fixed regulator for the
    HDMI +5V pin relies on the flags quirk for the proper polarity.
    
    Fixes: 0e7d6f94 ("gpio: of: Apply regulator-gpio quirk only to enable-gpios")
    Signed-off-by: 's avatarThierry Reding <treding@nvidia.com>
    Tested-by: 's avatarMarek Vasut <marek.vasut@gmail.com>
    Signed-off-by: 's avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: 's avatarSasha Levin <sashal@kernel.org>
    3e033b1b
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...