gpio: pca953x: Unify pca953x_{read,write}_regs_{16,24}()
authorMarek Vasut <marek.vasut@gmail.com>
Wed, 12 Dec 2018 01:39:53 +0000 (02:39 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 14 Dec 2018 14:18:57 +0000 (15:18 +0100)
commit49e713738f9ebfe659d16bff3ff1fb0a054aa9f7
treeaa00779250a0fd380cb2b48c408ec307a82be070
parent028a219ae5b4661ccc400d7f182766853275f0eb
gpio: pca953x: Unify pca953x_{read,write}_regs_{16,24}()

At this point, these two functions only differ in whether they do or do not
set the address increment bit. The 16 GPIO case does not need to set the AI
bit, except for PCA9575 on write, while the 24 GPIO and more case does set
the AI bit always. Merge these two functions together to simplify the code
a bit.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c