diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2018-12-12 04:39:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-05 11:20:15 +0300 |
commit | fc3df7cb3e1f5e220a84cae3b184921d5fdbbd6f (patch) | |
tree | 546e62f88370f6849a2f81769ea2d00cf0782b2f /drivers/gpio | |
parent | 116301fff70a37760959b100bb1228fa29147150 (diff) | |
download | linux-fc3df7cb3e1f5e220a84cae3b184921d5fdbbd6f.tar.xz |
gpio: pca953x: Fix AI overflow on PCAL6524
[ Upstream commit 92f45ebe68181c2d7f76633ffae55bc9447d62cd ]
The PCAL_PINCTRL_MASK is too large. The extended register block on
PCAL6524, which is the largest chip with this block, has the block
limited to address range 0x40..0x7f. This is because the bit 7 in
the command register is used for the Address Increment functionality.
Trim the mask to 0x60 to match the datasheet and to prevent accidental
overwrite of the AI bit.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-pca953x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index e0657fc72d31..0232c25a1586 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -58,7 +58,7 @@ #define PCA_GPIO_MASK 0x00FF #define PCAL_GPIO_MASK 0x1f -#define PCAL_PINCTRL_MASK 0xe0 +#define PCAL_PINCTRL_MASK 0x60 #define PCA_INT 0x0100 #define PCA_PCAL 0x0200 |