linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO
@ 2014-08-27 11:00 Linus Walleij
  2014-08-27 11:00 ` [PATCH 2/4] mmc: slot-gpio: add gpiod variant to get wp GPIO Linus Walleij
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Linus Walleij @ 2014-08-27 11:00 UTC (permalink / raw)
  To: linux-mmc, Chris Ball, Ulf Hansson; +Cc: linux-gpio, Linus Walleij

When the slot GPIO driver gets the GPIO to be used for card
detect, it is now possible to specify a flag to have the line
set up as input. Get rid of the explicit setup call for input
and use the flag.

The extra argument works as there are transition varargs
macros in place in the <linux/gpio/consumer.h> header, in
the future we will make the flags argument compulsory.

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mmc/core/slot-gpio.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index 5f89cb83d5f0..908c2b29e79f 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -308,14 +308,10 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
 	if (!con_id)
 		con_id = ctx->cd_label;
 
-	desc = devm_gpiod_get_index(host->parent, con_id, idx);
+	desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN);
 	if (IS_ERR(desc))
 		return PTR_ERR(desc);
 
-	ret = gpiod_direction_input(desc);
-	if (ret < 0)
-		return ret;
-
 	if (debounce) {
 		ret = gpiod_set_debounce(desc, debounce);
 		if (ret < 0)
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 18+ messages in thread
* [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO
@ 2014-08-12 17:25 Linus Walleij
  2014-08-14 14:28 ` Alexandre Courbot
  2014-08-18 11:25 ` Ulf Hansson
  0 siblings, 2 replies; 18+ messages in thread
From: Linus Walleij @ 2014-08-12 17:25 UTC (permalink / raw)
  To: linux-mmc, Chris Ball, Ulf Hansson
  Cc: linux-gpio, Linus Walleij, Alexandre Courbot

When the slot GPIO driver gets the GPIO to be used for card
detect, it is now possible to specify a flag to have the line
set up as input. Get rid of the explicit setup call for input
and use the flag.

The extra argument works as there are transition varargs
macros in place in the <linux/gpio/consumer.h> header, in
the future we will make the flags argument compulsory.

Cc: Alexandre Courbot <gnurou@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mmc/core/slot-gpio.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index 5f89cb83d5f0..908c2b29e79f 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -308,14 +308,10 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
 	if (!con_id)
 		con_id = ctx->cd_label;
 
-	desc = devm_gpiod_get_index(host->parent, con_id, idx);
+	desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN);
 	if (IS_ERR(desc))
 		return PTR_ERR(desc);
 
-	ret = gpiod_direction_input(desc);
-	if (ret < 0)
-		return ret;
-
 	if (debounce) {
 		ret = gpiod_set_debounce(desc, debounce);
 		if (ret < 0)
-- 
1.9.3


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

end of thread, other threads:[~2014-09-30 14:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27 11:00 [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO Linus Walleij
2014-08-27 11:00 ` [PATCH 2/4] mmc: slot-gpio: add gpiod variant to get wp GPIO Linus Walleij
2014-08-29 12:16   ` Ulf Hansson
2014-08-27 11:00 ` [PATCH 3/4 v2] mmc: host: switch OF parser to use gpio descriptors Linus Walleij
2014-08-29 12:16   ` Ulf Hansson
2014-09-09  7:05   ` Linus Walleij
2014-09-09 12:29     ` Ulf Hansson
2014-09-30 11:30   ` Javier Martinez Canillas
2014-09-30 14:01     ` Linus Walleij
2014-08-27 11:00 ` [PATCH 4/4] mmc: mmci: augment driver to handle " Linus Walleij
2014-08-27 11:34   ` Ulf Hansson
2014-08-29 12:16 ` [PATCH 1/4] mmc: slot-gpio: switch to use flags when getting GPIO Ulf Hansson
2014-09-22  8:20   ` Adrian Hunter
2014-09-22 12:37     ` Linus Walleij
2014-09-24  7:38       ` Alexandre Courbot
  -- strict thread matches above, loose matches on Subject: below --
2014-08-12 17:25 Linus Walleij
2014-08-14 14:28 ` Alexandre Courbot
2014-08-18 11:25 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).