OSDN Git Service

gpiolib: Implement fast processing path in get/set array
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Wed, 5 Sep 2018 21:50:08 +0000 (23:50 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 13 Sep 2018 09:17:23 +0000 (11:17 +0200)
commitb17566a6b08be18ded5472a2e4bbc066593b3662
tree855c1933616c99b7b7998be6e5e5a88dc490d5a4
parent77588c14ac868caece82fddbfae7de03b2cec941
gpiolib: Implement fast processing path in get/set array

Certain GPIO descriptor arrays returned by gpio_get_array() may contain
information on direct mapping of array members to pins of a single GPIO
chip in hardware order.  In such cases, bitmaps of values can be passed
directly from/to the chip's .get/set_multiple() callbacks without
wasting time on iterations.

Add respective code to gpiod_get/set_array_bitmap_complex() functions.
Pins not applicable for fast path are processed as before, skipping
over the 'fast' ones.

Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/driver-api/gpio/board.rst
Documentation/driver-api/gpio/consumer.rst
drivers/gpio/gpiolib.c