All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: aat1290: pass flags parameter to devm_gpiod_get
@ 2015-06-12  7:35 Uwe Kleine-König
  2015-06-12 11:36 ` Jacek Anaszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2015-06-12  7:35 UTC (permalink / raw)
  To: Bryan Wu, Richard Purdie, Jacek Anaszewski
  Cc: linux-leds, kernel, Alexandre Courbot, Linus Walleij,
	Kyungmin Park, Sakari Ailus

Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for output.

In this case the driver cannot easily be simplified but as the flags
parameter will become mandatory soon this change is necessary
beforehand.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

this patch applies to next and is only necessary on top of 49c34b8e0f43
(leds: Add driver for AAT1290 flash LED controller) which currently sits
in next.

Note I plan to make the flags parameter mandatory for 4.3. So unless
this change gets into 4.2, would it be ok to let it go in via the gpio
tree?

Best regards
Uwe

 drivers/leds/leds-aat1290.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/leds-aat1290.c b/drivers/leds/leds-aat1290.c
index 6ea1d5465309..8635404d7883 100644
--- a/drivers/leds/leds-aat1290.c
+++ b/drivers/leds/leds-aat1290.c
@@ -237,14 +237,14 @@ static int aat1290_led_parse_dt(struct aat1290_led *led,
 	struct device_node *child_node;
 	int ret = 0;
 
-	led->gpio_fl_en = devm_gpiod_get(dev, "flen");
+	led->gpio_fl_en = devm_gpiod_get(dev, "flen", GPIOD_ASIS);
 	if (IS_ERR(led->gpio_fl_en)) {
 		ret = PTR_ERR(led->gpio_fl_en);
 		dev_err(dev, "Unable to claim gpio \"flen\".\n");
 		return ret;
 	}
 
-	led->gpio_en_set = devm_gpiod_get(dev, "enset");
+	led->gpio_en_set = devm_gpiod_get(dev, "enset", GPIOD_ASIS);
 	if (IS_ERR(led->gpio_en_set)) {
 		ret = PTR_ERR(led->gpio_en_set);
 		dev_err(dev, "Unable to claim gpio \"enset\".\n");
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-16 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12  7:35 [PATCH] leds: aat1290: pass flags parameter to devm_gpiod_get Uwe Kleine-König
2015-06-12 11:36 ` Jacek Anaszewski
2015-06-16 19:17   ` Bryan Wu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.