]> git.baikalelectronics.ru Git - kernel.git/commit
gpio-mmio: Use the new .get_multiple() callback
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 19 Oct 2017 21:30:12 +0000 (23:30 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 30 Oct 2017 07:35:32 +0000 (08:35 +0100)
commit72b2f7d1a2766c5a1cdca6b6e2c5c01196555a65
treec5ae79da5d85538259909061496c21a8527b2497
parent34c4430a191f0ed5e49574a2c1b3dab883a268f5
gpio-mmio: Use the new .get_multiple() callback

It is possible to read all lines of a generic MMIO GPIO chip
with a single register read so support this if we are in
native endianness.

Add an especially quirky callback to read multiple lines for
the variants that require you to read values from the
output registers if and only if the line is set as output.
We managed to do that with a maximum of two register reads,
and just one read if the requested lines are all input or all
output.

Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mmio.c