Skip to content

Commit

Permalink
gpio: pca953x: make the register access by GPIO bank
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gregory CLEMENT authored and Linus Walleij committed Jan 25, 2013
1 parent 5985d76 commit f5f0b7a
Showing 1 changed file with 175 additions and 106 deletions.
Loading

0 comments on commit f5f0b7a

Please sign in to comment.