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: NAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: NRojhalat Ibrahim <imr@rtschenk.de>
Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com>
Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: NRojhalat Ibrahim <imr@rtschenk.de>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Showing
想要评论请 注册 或 登录