]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
commit668585273246f67b0cdafa30dd2da2047a2e1290
treec6e3186d6aab7d08e0f50b5030be4bef4a8b17df
parent7f2e553a7173b485db41a52060f91fb8e5ab1c69
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