Skip to content
Commit 370232d0 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

gpiolib: provide gpiod_to_gpio_device()



Accessing struct gpio_chip backing a GPIO device is only allowed for the
actual providers of that chip.

Similarly to how we introduced gpio_device_find() in order to replace
the abused gpiochip_find(), let's introduce a counterpart to
gpiod_to_chip() that returns a reference to the GPIO device owning the
descriptor. This is done in order to later remove gpiod_to_chip()
entirely.

Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarPeter Rosin <peda@axentia.se>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1559d149
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment