LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch 2.6.25-rc4] gpio/pca953x bugfix: mark as can_sleep
@ 2008-03-09 20:56 David Brownell
2008-03-10 5:14 ` eric miao
0 siblings, 1 reply; 2+ messages in thread
From: David Brownell @ 2008-03-09 20:56 UTC (permalink / raw)
To: Andrew Morton; +Cc: Arnaud Patard, eric miao, lkml
The pca953x driver is an I2C driver so gpio_chip->can_sleep should be set.
This lets upper layers know they should use the gpio_*_cansleep() calls
to access values, and may not access them from nonsleeping contexts.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
Merge before 2.6.25-final, please. This will for example prevent
leds-gpio from issuing blocking I2C calls from timer/irq contexts.
drivers/gpio/pca953x.c | 1 +
1 file changed, 1 insertion(+)
--- g26.orig/drivers/gpio/pca953x.c 2008-03-08 11:17:22.000000000 -0800
+++ g26/drivers/gpio/pca953x.c 2008-03-09 13:51:13.000000000 -0700
@@ -184,6 +184,7 @@ static void pca953x_setup_gpio(struct pc
gc->direction_output = pca953x_gpio_direction_output;
gc->get = pca953x_gpio_get_value;
gc->set = pca953x_gpio_set_value;
+ gc->can_sleep = 1;
gc->base = chip->gpio_start;
gc->ngpio = gpios;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 2.6.25-rc4] gpio/pca953x bugfix: mark as can_sleep
2008-03-09 20:56 [patch 2.6.25-rc4] gpio/pca953x bugfix: mark as can_sleep David Brownell
@ 2008-03-10 5:14 ` eric miao
0 siblings, 0 replies; 2+ messages in thread
From: eric miao @ 2008-03-10 5:14 UTC (permalink / raw)
To: David Brownell; +Cc: Andrew Morton, Rtp Arnaud Patard, lkml
OK
On Mon, Mar 10, 2008 at 4:56 AM, David Brownell <david-b@pacbell.net> wrote:
> The pca953x driver is an I2C driver so gpio_chip->can_sleep should be set.
> This lets upper layers know they should use the gpio_*_cansleep() calls
> to access values, and may not access them from nonsleeping contexts.
>
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> ---
> Merge before 2.6.25-final, please. This will for example prevent
> leds-gpio from issuing blocking I2C calls from timer/irq contexts.
>
> drivers/gpio/pca953x.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- g26.orig/drivers/gpio/pca953x.c 2008-03-08 11:17:22.000000000 -0800
> +++ g26/drivers/gpio/pca953x.c 2008-03-09 13:51:13.000000000 -0700
> @@ -184,6 +184,7 @@ static void pca953x_setup_gpio(struct pc
> gc->direction_output = pca953x_gpio_direction_output;
> gc->get = pca953x_gpio_get_value;
> gc->set = pca953x_gpio_set_value;
> + gc->can_sleep = 1;
>
> gc->base = chip->gpio_start;
> gc->ngpio = gpios;
>
--
Cheers
- eric
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-10 5:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-09 20:56 [patch 2.6.25-rc4] gpio/pca953x bugfix: mark as can_sleep David Brownell
2008-03-10 5:14 ` eric miao
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).