Hi Jani, On Thu, Dec 18, 2008 at 5:12 PM, Jani Nikula <ext-jani.1.nikula@xxxxxxxxx> wrote: > On Tue, 2008-12-16 at 11:35 +0530, ext Trilok Soni wrote: > >> OK, I found other guys (android ??) using such home brew frameworks. >> Time to write a switch framework. > > To start a discussion on what such a GPIO switch framework should be > like if someone were to write it, here's a list of the kind of things > I'd like to see in it (mostly from gpio-switch.c): Why limit to GPIO based switches only? GPIOs should be client of switch framework I think, and how h/w implements that switch should be hidden by client specific driver. > > * Based on or integrated in the gpiolib. gpio-switch-client would do that. Main framework just provides the generic operations hooks. > > * Dynamically changeable notification callbacks in kernel. > > * Sysfs notifications to userspace. > Yes, possible to through uevents, android-switch framework does that. > * Debouncing for the notifications to filter spurious events. > > * Dynamically adjustable debounce timeouts. > > * Arbitrary names for the GPIOs in sysfs instead of (or in addition to) > the gpiolib style "gpioN". It is left to gpio-switch-client to provide good names to switch framework which can be exposed by main framework through sysfs. So, users of this files in userspace doesn't care if it is gpio or something else. -- ---Trilok Soni http://triloksoni.wordpress.com http://www.linkedin.com/in/triloksoni -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html