gpio: pca953x: fix gpio input on gpio offsets >= 8
authorAndrew Ruder <andy@aeruder.net>
Wed, 7 Aug 2013 21:52:40 +0000 (16:52 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 16 Aug 2013 15:19:16 +0000 (17:19 +0200)
commit40a625daa88653d7942dc85483f6f289cd687cb7
tree0ed75d57c2afc2b2c5168f5c4f9cfa95cffacb79
parent08a67a58af3c361ae3e8d6fcf23a1489213309a9
gpio: pca953x: fix gpio input on gpio offsets >= 8

This change fixes a regression introduced by commit
f5f0b7aa8 (gpio: pca953x: make the register access by GPIO bank)

When the pca953x driver was converted to using 8-bit reads/writes
the bitmask in pca953x_gpio_get_value wasn't adjusted with a
modulus BANK_SZ and consequently looks at the wrong bits in the
input register.

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c
This page took 0.025729 seconds and 5 git commands to generate.