[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111128001941.GA2913@suse.de>
Date: Mon, 28 Nov 2011 09:19:41 +0900
From: Greg KH <gregkh@...e.de>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Arnd Bergmann <arnd@...db.de>, myungjoo.ham@...il.com,
linux-kernel@...r.kernel.org, Mike Lockwood <lockwood@...roid.com>,
Arve Hjønnevåg <arve@...roid.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Donggeun Kim <dg77.kim@...sung.com>,
Grant Likely <grant.likely@...retlab.ca>,
Kalle Komierowski <karl.komierowski@...ricsson.com>,
Johan PALSSON <johan.palsson@...ricsson.com>,
Daniel WILLERUD <daniel.willerud@...ricsson.com>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists