* [PATCH] gpio-charger: use cansleep version of gpio_set_value
@ 2012-05-22 8:50 Pritesh Raithatha
2012-05-22 10:30 ` Lars-Peter Clausen
0 siblings, 1 reply; 3+ messages in thread
From: Pritesh Raithatha @ 2012-05-22 8:50 UTC (permalink / raw)
To: cbouatmailru, axel.lin, lars, cabarnes; +Cc: linux-kernel, praithatha
Context of gpio_charger_get_property is sleepable so we should
use gpio_set_value_cansleep instead of gpio_set_value.
It will remove WARN_ON incase of using gpio from i2c-to-gpio
expander like pca953x.
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
---
drivers/power/gpio-charger.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
index 8672c91..cb2aa31 100644
--- a/drivers/power/gpio-charger.c
+++ b/drivers/power/gpio-charger.c
@@ -54,7 +54,7 @@ static int gpio_charger_get_property(struct power_supply *psy,
switch (psp) {
case POWER_SUPPLY_PROP_ONLINE:
- val->intval = gpio_get_value(pdata->gpio);
+ val->intval = gpio_get_value_cansleep(pdata->gpio);
val->intval ^= pdata->gpio_active_low;
break;
default:
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] gpio-charger: use cansleep version of gpio_set_value
2012-05-22 8:50 [PATCH] gpio-charger: use cansleep version of gpio_set_value Pritesh Raithatha
@ 2012-05-22 10:30 ` Lars-Peter Clausen
2012-06-20 3:49 ` Anton Vorontsov
0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2012-05-22 10:30 UTC (permalink / raw)
To: Pritesh Raithatha; +Cc: cbouatmailru, axel.lin, cabarnes, linux-kernel
On 05/22/2012 10:50 AM, Pritesh Raithatha wrote:
> Context of gpio_charger_get_property is sleepable so we should
> use gpio_set_value_cansleep instead of gpio_set_value.
>
> It will remove WARN_ON incase of using gpio from i2c-to-gpio
> expander like pca953x.
>
> Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Looks good,
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> drivers/power/gpio-charger.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
> index 8672c91..cb2aa31 100644
> --- a/drivers/power/gpio-charger.c
> +++ b/drivers/power/gpio-charger.c
> @@ -54,7 +54,7 @@ static int gpio_charger_get_property(struct power_supply *psy,
>
> switch (psp) {
> case POWER_SUPPLY_PROP_ONLINE:
> - val->intval = gpio_get_value(pdata->gpio);
> + val->intval = gpio_get_value_cansleep(pdata->gpio);
> val->intval ^= pdata->gpio_active_low;
> break;
> default:
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] gpio-charger: use cansleep version of gpio_set_value
2012-05-22 10:30 ` Lars-Peter Clausen
@ 2012-06-20 3:49 ` Anton Vorontsov
0 siblings, 0 replies; 3+ messages in thread
From: Anton Vorontsov @ 2012-06-20 3:49 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Pritesh Raithatha, axel.lin, cabarnes, linux-kernel
On Tue, May 22, 2012 at 12:30:31PM +0200, Lars-Peter Clausen wrote:
> On 05/22/2012 10:50 AM, Pritesh Raithatha wrote:
> > Context of gpio_charger_get_property is sleepable so we should
> > use gpio_set_value_cansleep instead of gpio_set_value.
> >
> > It will remove WARN_ON incase of using gpio from i2c-to-gpio
> > expander like pca953x.
> >
> > Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
>
> Looks good,
>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Applied, thanks!
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-20 3:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22 8:50 [PATCH] gpio-charger: use cansleep version of gpio_set_value Pritesh Raithatha
2012-05-22 10:30 ` Lars-Peter Clausen
2012-06-20 3:49 ` Anton Vorontsov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox