]> git.baikalelectronics.ru Git - kernel.git/commit
gpiolib: add gpiod_get_array and gpiod_put_array functions
authorRojhalat Ibrahim <imr@rtschenk.de>
Wed, 11 Feb 2015 16:27:58 +0000 (17:27 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 5 Mar 2015 08:52:28 +0000 (09:52 +0100)
commit1a3852b95d51568e0f2402fe7f2fc39961ad0b3b
treec6e3186d6aab7d08e0f50b5030be4bef4a8b17df
parent5c00a946d5944eb3a300b1609abef14f5d11c62d
gpiolib: add gpiod_get_array and gpiod_put_array functions

Introduce new functions for conveniently obtaining and disposing of
an entire array of GPIOs with one function call.

ACPI parts tested by Mika Westerberg, DT parts tested by Rojhalat
Ibrahim.

Change log:
v5: move the ACPI functions to gpiolib-acpi.c
v4: - use shorter names for members of struct gpio_descs
    - rename lut_gpio_count to platform_gpio_count for clarity
    - add check for successful memory allocation
    - use ERR_CAST()
v3: - rebase on current linux-gpio devel branch
    - fix ACPI GPIO counting
    - allow for zero-sized arrays
    - make the flags argument mandatory for the new functions
    - clarify documentation
v2: change interface

Suggested-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Rojhalat Ibrahim <imr@rtschenk.de>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Rojhalat Ibrahim <imr@rtschenk.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/gpio/consumer.txt
drivers/gpio/gpiolib-acpi.c
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h
include/linux/gpio/consumer.h