public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>, Hemanth V <hemanthv@ti.com>,
	<linux-input@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-omap@vger.kernel.org>, <igor.stoppa@nokia.com>,
	<kai.svahn@nokia.com>, <matthias.nyman@nokia.com>
Subject: Re: Sensors and the input layer (was Re: [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver)
Date: Tue, 31 Aug 2010 00:15:11 -0500	[thread overview]
Message-ID: <43fd040585e2eca4416f7619eba86515@secure211.sgcpanel.com> (raw)
In-Reply-To: <20100830224352.GF28865@core.coreip.homeip.net>

Hi,

On Mon, 30 Aug 2010 15:43:52 -0700, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Mon, Aug 30, 2010 at 03:05:32PM -0700, Linus Torvalds wrote:
>> On Monday, August 30, 2010, Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> wrote:
>> >
>> > That is why I started taking accelerometers in. But I am concerned
that
>> > taking accelerometers (which indeed are most often input devices)
will
>> > lead people to try and use the same for temperature, ALS and other
>> > sensors that are more often used in industrial process controls.
>> 
>> You're just being silly.
>> 
>> Nobody writes a driver for a "temperature sensor" or "ambient light
>> sensor". They write a driver for a specific *chip* that is used in
>> cellphones etc, and that happens to have an ambient light and
>> temperature sensor on it.
> 
> And? Yes, they have a ALS and temperature sensors. They also have
> voltage regulators, pwm, ADC and a bunch of other stuff wired on. You
> are not arguing that all of those should be input devices just because
> they happen to reside on the same chip?
> 
>> 
>> And in that context, it really does make sense to see it as an input
>> driver. And the fact that there are industrial uses for ALS sensors
>> that aren't necessarily at all interested on the input layer should
>> not matter at all.
> 
> I think it does matter; we should have standard interface for certain
> functionality that makes sense for everyone. So far cellphone guys
> wanted to plumb such devices through input not necessarily because these
> are HID events but because:
> 
> 1. Input transport via evdev is very convenient
> 2. There is no other standard alternative
> 
> Once there is standard interface for such sensors they will happily use
> it and will not look back.

I disagree. If the device is used as input and currently
app developers have to find other ways to use such input
data, having a standard interface other than input layer
will just make the mess standardized, but it will still
be a mess.

>> So don't bring up "ALS isn't always input" because within the context
>> of a driver for some highly integrated cellphone model, it really IS
>> input, and there is no ambiguity at all.
>> 
>> So your "sometimes it is, and sometimes it isn't" argument is bogus.
>> The ambiguity simply doesn't exist when seen in context.
> 
> Sure, for a particular cell phone there is no ambiguity, the sensor has
> certain functionality assigned that is well known. But does this mean
> that we should not expect parts being reused at all anymore?

Why are we trying to overengineer on such simple devices ? Wasn't
it so that we will design and implement solutions when the problem
arrives ? Why are we trying to think of all cases such a simple
device might be used just for the sake of not being input device ?

>> >> (or GPS device, for that matter) really be?
>> >
>> > But why GPS should be input device? It has nothing to do with user
>> > input.
>> 
>> What? OF COURSE it is an input driver. It's the user moving the device
>> around. It's EXACTLY the same thing as an accelerometer in that
>> respect. Sure, it's a bit less precise and measures movement wrt some
>> external frame, but technically they are almost exactly the same.
>> 
>> If you se doing a navigation app, the accelerometer, the compass and
>> the GPS are all equally (but differently) important.
>> 
>> Again - it's not a user touching buttons. But it IS a user moving
around.
> 
> Right, but do you expect that movement to cause an immediate action?
> When you press a key - something happens; when you swing a Wii
> controller - the device reacts. And really you can swap joysticks,
> motion controllers, Sony's 6-axis and so forth and the application would
> be hard pressed to tell the difference. I am unsure how you would play a
> game with GPS as an input device.

it might not be used on a game, but on a map application, that IS input.
You're failing to see input devices are used in cases other than gaming.

-- 
balbi

  reply	other threads:[~2010-08-31  5:15 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-21  6:52 [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver Hemanth V
2010-05-21 11:57 ` Jonathan Cameron
2010-05-21 14:13   ` Hemanth V
2010-08-13 12:47   ` Hemanth V
2010-08-13 13:34     ` Murphy, Dan
2010-08-16  9:45       ` Hemanth V
2010-08-29 18:24       ` Dmitry Torokhov
2010-08-29 18:49 ` Dmitry Torokhov
2010-08-30 16:04   ` Sensors and the input layer (was Re: [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver) Felipe Balbi
2010-08-30 16:28     ` Dmitry Torokhov
2010-08-30 17:10       ` Felipe Balbi
2010-08-30 17:21         ` Dmitry Torokhov
2010-08-30 18:52           ` Felipe Balbi
2010-08-30 20:50             ` Dmitry Torokhov
2010-08-31  9:53               ` Alan Cox
2010-08-30 17:41         ` Jonathan Cameron
2010-08-30 20:40     ` Alan Cox
2010-08-30 20:44       ` Dmitry Torokhov
2010-08-30 21:28         ` Linus Torvalds
2010-08-30 21:43           ` Dmitry Torokhov
2010-08-30 22:05             ` Linus Torvalds
2010-08-30 22:43               ` Dmitry Torokhov
2010-08-31  5:15                 ` Felipe Balbi [this message]
2010-08-31  9:44                 ` Alan Cox
2010-08-31 12:35                   ` Jonathan Cameron
2010-08-31 16:17                   ` Dmitry Torokhov
2010-08-31 16:59                     ` Alan Cox
2010-08-31 17:09                       ` Dmitry Torokhov
2010-08-31 17:24                         ` Mohamed Ikbel Boulabiar
2010-08-31 18:14                           ` Jonathan Cameron
2010-08-31 22:21                         ` Chris Hudson
2010-09-24 13:02                         ` Pavel Machek
2010-09-24 13:26                           ` Jonathan Cameron
2010-08-31 18:03                       ` Jonathan Cameron
2010-08-31 18:20                         ` Jonathan Cameron
2010-09-14  7:12                 ` Pavel Machek
2010-08-31  9:46             ` Alan Cox
2010-08-31 12:51               ` Jonathan Cameron
2010-08-31 18:18           ` Daniel Barkalow
2010-09-03 10:32   ` [RFC] [PATCH V2 1/2] input: CMA3000 Accelerometer driver Hemanth V
2010-09-03 16:34     ` Dmitry Torokhov
2010-09-06  9:03       ` Hemanth V

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=43fd040585e2eca4416f7619eba86515@secure211.sgcpanel.com \
    --to=me@felipebalbi.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hemanthv@ti.com \
    --cc=igor.stoppa@nokia.com \
    --cc=kai.svahn@nokia.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=matthias.nyman@nokia.com \
    --cc=torvalds@linux-foundation.org \
    /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