mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
gpio: add parameter to allow the use named gpios
The gpio binding document says that new code should always use named
gpios. Patch 40b73183 added support to parse a list of gpios from child
nodes, but does not make it possible to use named gpios. This patch adds
the con_id property and implements it is done in gpiolib.c, where the
old-style of using unnamed gpios still works.
Signed-off-by: Olliver Schinagl <[email protected]>
Acked-by: Bryan Wu <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Reviewed-by: Alexandre Courbot <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
b80eef95be
commit
1feb57a245
4 changed files with 20 additions and 3 deletions
|
|
@ -184,7 +184,7 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
|
|||
struct gpio_led led = {};
|
||||
const char *state = NULL;
|
||||
|
||||
led.gpiod = devm_get_gpiod_from_child(dev, child);
|
||||
led.gpiod = devm_get_gpiod_from_child(dev, NULL, child);
|
||||
if (IS_ERR(led.gpiod)) {
|
||||
fwnode_handle_put(child);
|
||||
ret = PTR_ERR(led.gpiod);
|
||||
|
|
|
|||
Loading…
Reference in a new issue