Messages in this thread | | | Date | Fri, 18 Jun 2010 07:27:09 +0200 | From | Uwe Kleine-König <> | Subject | Re: gpiolib and sleeping gpios |
| |
Hi Ryan,
On Fri, Jun 18, 2010 at 09:47:59AM +1200, Ryan Mallon wrote: > Then all drivers can just call gpio_(set/get)_value and any attempts to > use sleeping gpios from an non-sleeping context will be caught by the > might_sleep_if check. Is there something I am missing about this? The downside is that you change the semantic of gpio_get_value (and gpio_set_value I assume?). But as calling gpio_get_value with a gpio that gpio_cansleep() is an error anyhow, so I think that's OK. The big pro is that the API is simplified.
> I can prepare a patch which combines the non-sleeping and sleeping > variants, but I wanted to check that I'm not missing something > fundamental first. I will happily look at such a patch and give my comments.
Best regards Uwe
-- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |