Messages in this thread | | | Date | Mon, 28 Nov 2011 09:19:41 +0900 | From | Greg KH <> | Subject | Re: [RFC PATCH 0/3] introduce: Multistate Switch Class |
| |
On Sun, Nov 27, 2011 at 04:09:19PM -0800, Dmitry Torokhov wrote: > >> So for the userspace part it seems to me that we need to make > >> up our mind about this stuff: is it going to be through input or > >> uevent like in this patch? Or ?both?? > > > >Input please, uevent is not for things like switches that are "common", > >but for things that are "uncommon" and don't happen often. > > Actually, please do not. I never liked audio-related switches added to > input; ALSA guys just wore me down. These are usually not switches > that user can flip, they are connections between components. Should we > switch betide_carrier_*(), power supply state, etc, etc over to input? > I think not.
Yes, I think so :)
Well, not all of them, but when there is a hardware change of state, that a user can make happen (plug in headphone, plug in usb port, etc.) they should be input events, as there are a zillion different ways to have these types of devices.
And as HID has already documented almost all of these already, odds are, there's already a HID mapping for what is needed to be exported, and if not, it's easy to get a new HID code added, right?
> I haven't looked at the patch yet, but a class that has an attribute > that could be queried and emitting uneventful on state change seems > like a good diluting for me.
For this one case, maybe. But what about the next one, and the next one, and so on. I would think those would all map better to input than one-off class devices with custom uevent messages.
Unless we want to start piping input events through uevents? :)
Ok, if you really don't want this, then I suggest we create something that encompasses all of these into something unified, much like IIO is trying to be for those types of devices.
thanks,
greg k-h
| |