From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Ben Dooks <ben@fluff.org>
Cc: Jean Delvare <khali@linux-fr.org>,
spi-devel-general@lists.sourceforge.net,
Jonathan Cameron <Jonathan.Cameron@gmail.com>,
linux-kernel@vger.kernel.org,
LM Sensors <lm-sensors@lm-sensors.org>
Subject: Re: [spi-devel-general] Accelerometer, Gyros and ADC's etc within the kernel.
Date: Tue, 27 May 2008 15:01:07 -0400 [thread overview]
Message-ID: <20080527140348.ZZRA012@mailhub.coreip.homeip.net> (raw)
In-Reply-To: <20080527171656.GA870@trinity.fluff.org>
Hi Ben,
On Tue, May 27, 2008 at 06:16:56PM +0100, Ben Dooks wrote:
> >
> > I don't think that input subsystem woudl be the best choice. While we
> > do support the event-driven mechanism for delivering information to
> > userspace input is mostly oriented for human interface devices, not
> > general data acquisition. If anything input_dev is too fat. Another
> > thing is that input layer anonymizes input devices, makes them
> > capability-oriented. I.e. we dont really care what model of joystick
> > we have, we want something that reports ABS_X, ABS_Y, BTN_FIRE and
> > userpsace can use it whether it a simple analog joystick or something
> > fancy and USB connected. For your purposes you probably do want to know
> > what the device is and what exactly being sampled/measured.
>
> Can you explain to me how the input system anonymizes things? I thought
> it was quite easy to read the name of the device? You could easily add
> a symlink from the driver's device binding in sysfs to the relevant
> input device as well.
>
Yes, it is possible to read the name of the device, but I could see
with names like "Thermal probe blah" it may not be unique enough. Of
course input core also exports phys, sysfs and uniq attributes so
there are certainly possibilities for using it.
OTOH input_dev is quite fat and oriented for human interface. It could
made work if you create one device per sensor but devices with X
sensorts per one device (that provide related readings, like a generic
state) would be cludgy... Accelerometers could use ABS_X, ABS_Y.. but
what about other devices? ABS_RAW1, ABS_RAW2? And here we run into the
conceptual problem, as I see it - in input we try to keep meaning of
the event independent from the device it generated. We dont care what
generated ABS_X, ABS_Y, BTN_FIRE - it could be a joystick, gamepad,
something similar. A program can use it if it knows how handle the
above events. The ABS_RAWx would mean different things for every
sensor... That's what I meant by anonymizing - the application
does not really care about the particular device and where and how it
is connected, but only about its capabilities.
Another thing is that (at least now) input supresses duplicate events,
which may be undesirable for generic data acquisition device.
I suppose it could be made work. I guess the size of input_dev is my
main concern. If you hyave something with hundreds of sensors
input_dev might be too expensive.
> Also, why would you not want all your accelerometers grouped into a set
> of accelerometers? If your application software just searches all input
> devices for anything reporting itself as an accelerometer, then it would
> get the right result...
I never said I would not want them to be grouped together.
--
Dmitry
next prev parent reply other threads:[~2008-05-27 19:01 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 10:04 Jonathan Cameron
2008-05-20 11:28 ` Jean Delvare
2008-05-20 21:40 ` Hans J. Koch
2008-05-21 10:04 ` Jonathan Cameron
2008-05-21 13:20 ` Jean Delvare
2008-05-21 13:49 ` Dmitry Torokhov
2008-05-21 14:09 ` Henrique de Moraes Holschuh
2008-05-27 17:16 ` [spi-devel-general] " Ben Dooks
2008-05-27 19:01 ` Dmitry Torokhov [this message]
2008-05-22 0:52 ` David Brownell
2008-05-22 9:35 ` [spi-devel-general] " Jonathan Cameron
2008-05-26 16:23 ` Jonathan Cameron
2008-06-26 18:01 ` Accelerometer etc subsystem (Update on progress) Jonathan Cameron
2008-06-26 18:26 ` Jonathan Cameron
2008-06-27 2:39 ` Randy Dunlap
2008-06-27 3:29 ` Ben Nizette
2008-06-27 9:45 ` [lm-sensors] " Jonathan Cameron
2008-06-28 8:34 ` Ben Nizette
2008-06-28 15:34 ` Jonathan Cameron
2008-05-20 17:50 ` Accelerometer, Gyros and ADC's etc within the kernel mark gross
2008-05-21 9:40 ` [spi-devel-general] " Jonathan Cameron
2008-05-27 15:43 ` mark gross
2008-05-29 11:57 ` Jonathan Cameron
2008-05-22 0:53 ` David Brownell
2008-05-27 15:56 ` mark gross
2008-05-27 23:42 ` David Brownell
2008-05-27 16:44 ` [spi-devel-general] " Anton Vorontsov
2008-05-27 16:50 ` Ben Dooks
2008-05-27 17:01 ` Anton Vorontsov
2008-05-27 18:00 ` Jonathan Cameron
2008-05-27 18:12 ` Ben Dooks
2008-05-27 17:59 ` Jonathan Cameron
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=20080527140348.ZZRA012@mailhub.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=Jonathan.Cameron@gmail.com \
--cc=ben@fluff.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=spi-devel-general@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®