mbox series

[U-Boot,v1,0/3] gpio: Add a managed API

Message ID 20191001115130.18886-1-jjhiblot@ti.com
Headers show
Series gpio: Add a managed API | expand

Message

Jean-Jacques Hiblot Oct. 1, 2019, 11:51 a.m. UTC
This is the 4th of a few series, the goal of which is to facilitate
porting drivers from the linux kernel. Most of the series will be about
adding managed API to existing infrastructure (GPIO, reset, phy,...)

This particular series is about GPIOs. It adds a managed API using the
API as Linux. To make it 100% compatible with linux, there is a small
deviation from u-boot's way of naming the gpio lists: the managed
equivalent of gpio_request_by_name(..,"blabla-gpios", ...) is
devm_gpiod_get_index(..., "blabla", ...)


Jean-Jacques Hiblot (3):
  drivers: gpio: Handle gracefully NULL pointers
  drivers: gpio: Add a managed API to get a GPIO from the device-tree
  test: gpio: Add tests for the managed API

 arch/sandbox/dts/test.dts  |  10 +++
 drivers/gpio/gpio-uclass.c | 134 ++++++++++++++++++++++++++++++++++---
 include/asm-generic/gpio.h |  49 +++++++++++++-
 test/dm/gpio.c             | 102 ++++++++++++++++++++++++++++
 4 files changed, 284 insertions(+), 11 deletions(-)