Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 66858527 authored by Rojhalat Ibrahim's avatar Rojhalat Ibrahim Committed by Linus Walleij
Browse files

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: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarRojhalat Ibrahim <imr@rtschenk.de>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: default avatarRojhalat Ibrahim <imr@rtschenk.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 7f2e553a
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment