leds: gpio: Try to lookup gpiod from device
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 6 Sep 2018 22:09:40 +0000 (00:09 +0200)
committerJacek Anaszewski <jacek.anaszewski@gmail.com>
Mon, 10 Sep 2018 19:14:17 +0000 (21:14 +0200)
commit45d4c6de4e497e5b0026c77044ae5fcddf8fecd8
tree4e60aff78bd51b5673b406f729a48725e5508427
parent9aec30371fb095a0c9415f3f0146ae269c3713d8
leds: gpio: Try to lookup gpiod from device

This augments the GPIO lookup code in the GPIO LEDs to
attempt to look up a GPIO descriptor from the device with
index.

This makes it possible to use GPIO machine look-up tables
and stop passing global GPIO numbers through platform data.

Using this we can stepwise convert existing board files
to use machine descriptor tables and then eventually drop
the legacy GPIO support and only include
<linux/gpio/consumer.h> and use descriptors exclusively.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
drivers/leds/leds-gpio.c