All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manu Abraham <abraham.manu@gmail.com>
To: Jonathan Cameron <kernel@jic23.retrosnub.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Dima Zavin <dmitriyz@google.com>,
	Jonathan Cameron <jic23@cam.ac.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Amit Kucheria <amit.kucheria@verdurent.com>,
	Jean Delvare <khali@linux-fr.org>, Greg KH <greg@kroah.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [GIT PULL] Ambient Light Sensors subsystem
Date: Wed, 3 Mar 2010 23:29:43 +0400	[thread overview]
Message-ID: <1a297b361003031129y6c19ad9cqe8658c2d85d8764@mail.gmail.com> (raw)
In-Reply-To: <4B8EB685.1060302@jic23.retrosnub.co.uk>

On Wed, Mar 3, 2010 at 11:20 PM, Jonathan Cameron
<kernel@jic23.retrosnub.co.uk> wrote:
> On 03/03/10 18:52, Linus Torvalds wrote:
>>
>>
>> On Wed, 3 Mar 2010, Dmitry Torokhov wrote:
>>
>>> On Wed, Mar 03, 2010 at 09:03:16AM -0800, Linus Torvalds wrote:
>>>>
>>>> What's the difference between a physical "increase screen brightness" key,
>>>> and a "ambient light sensor"? Absolutely none as far as I can tell.
>>>
>>> Because in general ambient light sensor may have nothing to do with the
>>> screen brightness. The fact that all current uses are tied to
>>> controlling screen brightness is coincidential. You could use it as well
>>> to turn on the lights in the kitchen if it is getting too dark...
>>
>> But my point is, it acts pretty much like a key on a keyboard
>> _regardless_.
> Just one small clarification here.  It behaves a lot more like the axis of
> a joystick.  These sensors report illuminance, not merely a binary result.
> Some of them do have sophisticated threshold type logic, but
> all of them we have seen so far allow direct reading of the value.  Typical
> uses include things like long term environmental monitoring as
> well as screen brightness.  I have at least one Mote on my desk that has a
> ambient light sensor and no ability whatsoever to drive a screen.
> (Not that this effects whether input would make sense anyway!)


Maybe it make sense to put all Generic sensors into one whole lot,
where an application can

- read the value from the driver (eg: 0 - 65535)

- read from device static information (to identify how the application
should treat the values read back.)

   - report what type of device it is (Light, Voltage, Acceleration
and what not, simple enumeration will help, mayeb you can even have
bitwise OR the types, so that you can have a driver with multiple
capabilities)
   - the max value it can go
   - the min value it can go
   - the number of steps (gradient) that the driver can do.


Maybe such a simplistic interface does help ?

The application can simply read the static information from the driver
and decide whether it should really handle that driver class.


Regards,
Manu

  reply	other threads:[~2010-03-03 19:29 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01 19:41 [GIT PULL] Ambient Light Sensors subsystem Jonathan Cameron
2010-03-03  6:13 ` Dima Zavin
2010-03-03  9:34   ` Jean Delvare
2010-03-03 10:29     ` Dima Zavin
2010-03-03 11:02       ` Jean Delvare
2010-03-03 11:10       ` Jonathan Cameron
2010-03-03 13:07       ` Linus Walleij
2010-03-03 10:30   ` Linus Walleij
2010-03-03 11:19     ` Jonathan Cameron
2010-03-03 17:03   ` Linus Torvalds
2010-03-03 17:51     ` Jonathan Cameron
2010-03-03 18:41     ` Dmitry Torokhov
2010-03-03 18:52       ` Linus Torvalds
2010-03-03 19:07         ` Dmitry Torokhov
2010-03-03 19:33           ` Jonathan Cameron
2010-03-03 20:08             ` Jonathan Cameron
2010-03-03 22:02             ` Jean Delvare
2010-03-03 23:08               ` Dima Zavin
2010-03-04  9:22                 ` Jean Delvare
2010-03-07 20:49                 ` Dmitry Torokhov
2010-03-08  6:29                   ` Dima Zavin
2010-03-05  7:38             ` Amit Kucheria
2010-03-05 10:58               ` Jonathan Cameron
2010-03-03 21:38           ` Dima Zavin
2010-03-03 21:51             ` Linus Torvalds
2010-03-04 11:19               ` Jonathan Cameron
2010-03-07 12:34                 ` Jean Delvare
2010-03-07 12:57                   ` J.I. Cameron
2010-03-08  9:58                 ` Dima Zavin
2010-03-08 10:24                   ` Jonathan Cameron
2010-03-07 20:42               ` Dmitry Torokhov
2010-03-08 10:00                 ` Jonathan Cameron
2010-03-18 14:34                 ` Jon Smirl
2010-03-03 21:56             ` Mike Chan
2010-03-03 22:05               ` Jean Delvare
2010-03-10 20:46           ` Pavel Machek
2010-03-22  0:13           ` Jan Engelhardt
2010-03-22  4:27             ` Dmitry Torokhov
2010-03-03 19:20         ` Jonathan Cameron
2010-03-03 19:29           ` Manu Abraham [this message]
2010-03-03 19:45             ` Jonathan Cameron
2010-03-03 20:08               ` Manu Abraham
2010-03-03 20:37                 ` 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=1a297b361003031129y6c19ad9cqe8658c2d85d8764@mail.gmail.com \
    --to=abraham.manu@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=amit.kucheria@verdurent.com \
    --cc=dmitriyz@google.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=greg@kroah.com \
    --cc=jic23@cam.ac.uk \
    --cc=kernel@jic23.retrosnub.co.uk \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rui.zhang@intel.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 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.