]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
gpio: pca953x: make the register access by GPIO bank
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Tue, 22 Jan 2013 21:10:23 +0000 (22:10 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 25 Jan 2013 08:02:10 +0000 (09:02 +0100)
commitf5f0b7aa897ebf6b0d077356a787526212460dd7
treefb3eaa1341c6e1f61cfb2cb437c1706c22b66471
parent5985d76cc1b62125301754c9b636a18c346bfc52
gpio: pca953x: make the register access by GPIO bank

Until now the pca953x driver accessed all the bank of a given register
in a single command using only a 32 bits variable. New expanders from
the pca53x family come with 40 GPIOs which no more fit in a 32
variable. This patch make access to the registers more generic by
relying on an array of u8 variables. This fits exactly the way the
registers are represented in the hardware.

It also adds helpers to access to a single register of a bank instead
of reading or writing all the banks for a given register.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Tested-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c