From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Greg KH <gregkh@suse.de>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
"Arnd Bergmann" <arnd@arndb.de>,
myungjoo.ham@gmail.com, linux-kernel@vger.kernel.org,
"Mike Lockwood" <lockwood@android.com>,
"Arve Hjønnevåg" <arve@android.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Donggeun Kim" <dg77.kim@samsung.com>,
"Grant Likely" <grant.likely@secretlab.ca>,
"Kalle Komierowski" <karl.komierowski@stericsson.com>,
"Johan PALSSON" <johan.palsson@stericsson.com>,
"Daniel WILLERUD" <daniel.willerud@stericsson.com>
Subject: Re: [RFC PATCH 0/3] introduce: Multistate Switch Class
Date: Mon, 28 Nov 2011 01:03:28 -0800 [thread overview]
Message-ID: <20111128090328.GA18919@core.coreip.homeip.net> (raw)
In-Reply-To: <20111128001941.GA2913@suse.de>
On Mon, Nov 28, 2011 at 09:19:41AM +0900, Greg KH wrote:
> 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 :)
Then we disagree here.
>
> 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.
I do not agree. Basically everything that happens in the system is
caused by user action somehow, somewhere.
>
> 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?
Adding a new HID code is easy but not necessarily right solution. For
example, HID has reports describing battery level, but it does not mean
they should be delivered through input subsystem.
Additionally, do you really want to have full input device for
something like this? The character device; whole sysfs shebang, all the
handlers installed, etc, etc? Way too heavy IMO.
>
> > 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.
I did not say I was advocating an one-off device. I was advocating a new
"connection" or "link" class that could describe relationship between 2
objects in the system.
>
> 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.
Yes, exactly. Something lightweight, even lighter than IIO since we do
not expect rapid rate of events here, so single multiplexed delivery
channel (uevents) would work well as notifiers.
--
Dmitry
next prev parent reply other threads:[~2011-11-28 9:03 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 2:03 [RFC PATCH 0/3] introduce: Multistate Switch Class MyungJoo Ham
2011-11-25 14:02 ` Arnd Bergmann
2011-11-26 5:46 ` MyungJoo Ham
2011-11-26 13:23 ` Kyungmin Park
2011-11-27 22:43 ` Linus Walleij
2011-11-27 23:08 ` Greg KH
2011-11-28 0:09 ` Dmitry Torokhov
2011-11-28 0:19 ` Greg KH
2011-11-28 9:03 ` Dmitry Torokhov [this message]
2011-11-28 1:31 ` NeilBrown
2011-11-28 7:27 ` Greg KH
2011-11-28 9:04 ` Dmitry Torokhov
2011-11-30 6:35 ` Greg KH
2011-11-30 6:58 ` MyungJoo Ham
2011-11-30 9:46 ` Mark Brown
2011-11-30 13:28 ` Linus Walleij
2011-11-30 23:04 ` NeilBrown
2011-12-01 13:38 ` Linus Walleij
2011-11-28 13:04 ` Linus Walleij
2011-11-28 15:09 ` Morten CHRISTIANSEN
2011-11-30 6:34 ` Greg KH
2011-11-28 17:53 ` Arnd Bergmann
2011-11-29 9:11 ` MyungJoo Ham
2011-11-29 9:45 ` Linus Walleij
2011-11-29 13:59 ` Arnd Bergmann
2011-11-29 17:05 ` Dmitry Torokhov
2011-11-30 2:58 ` NeilBrown
2011-11-30 6:40 ` MyungJoo Ham
2011-11-30 22:56 ` NeilBrown
2011-11-30 23:17 ` Mark Brown
2011-11-30 23:25 ` Dmitry Torokhov
2011-12-01 4:51 ` MyungJoo Ham
2011-12-01 5:21 ` NeilBrown
2011-12-01 11:34 ` Mark Brown
2011-12-05 3:04 ` NeilBrown
2011-12-05 12:06 ` Mark Brown
2011-12-05 19:38 ` NeilBrown
2011-12-05 19:45 ` Mark Brown
2011-12-01 4:46 ` MyungJoo Ham
2011-12-07 9:31 ` Linus Walleij
2011-12-08 4:42 ` Kyungmin Park
2011-11-26 15:32 ` Greg KH
2011-11-29 8:18 ` MyungJoo Ham
2011-11-28 18:23 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111128090328.GA18919@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=arnd@arndb.de \
--cc=arve@android.com \
--cc=daniel.willerud@stericsson.com \
--cc=dg77.kim@samsung.com \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@suse.de \
--cc=johan.palsson@stericsson.com \
--cc=karl.komierowski@stericsson.com \
--cc=kyungmin.park@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lockwood@android.com \
--cc=myungjoo.ham@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.