]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: max77620: Fix interrupt handling
authorTimo Alho <talho@nvidia.com>
Wed, 2 Oct 2019 12:28:25 +0000 (14:28 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 4 Oct 2019 22:01:54 +0000 (00:01 +0200)
commitab3dd9cc24d4d49739cec0c7763e473ddd22f9c1
tree667fb76dd26e757f4d6bc0ae28dca76a35de3e45
parent704355db127e4bcc96c40fa3eeff5450f1a14d13
gpio: max77620: Fix interrupt handling

The interrupt-related register fields on the MAX77620 GPIO controller
share registers with GPIO related fields. If the IRQ chip is implemented
with regmap-irq, this causes the IRQ controller code to overwrite fields
previously configured by the GPIO controller code.

Two examples where this causes problems are the NVIDIA Jetson TX1 and
Jetson TX2 boards, where some of the GPIOs are used to enable vital
power regulators. The MAX77620 GPIO controller also provides the USB OTG
ID pin. If configured as an interrupt, this causes some of the
regulators to be powered off.

Signed-off-by: Timo Alho <talho@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20191002122825.3948322-3-thierry.reding@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-max77620.c