Message ID | 1407864355-21545-1-git-send-email-linus.walleij@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Aug 12, 2014 at 10:25 AM, Linus Walleij <linus.walleij@linaro.org> wrote: > 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> Thanks - I actually have a bunch of patches that update some other drivers, will try to send them shortly... -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12 August 2014 19:25, Linus Walleij <linus.walleij@linaro.org> wrote: > 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> Thanks! Applied for next. Kind regards Uffe > --- > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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)
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(-)