From: Jonathan Cameron <jic23@cam.ac.uk>
To: Zhang Rui <rui.zhang@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Jean Delvare <khali@linux-fr.org>,
"alan@linux.intel.com" <alan@linux.intel.com>,
"lenb@kernel.org" <lenb@kernel.org>,
"pavel@ucw.cz" <pavel@ucw.cz>,
"Cory T. Tusar" <ctusar@videon-central.com>,
"Trisal, Kalhan" <kalhan.trisal@intel.com>,
linux-acpi <linux-acpi@vger.kernel.org>
Subject: Re: RFC: Light sensors, unifying current options?
Date: Fri, 11 Sep 2009 10:22:16 +0100 [thread overview]
Message-ID: <4AAA16C8.9030904@cam.ac.uk> (raw)
In-Reply-To: <1252634101.3483.514.camel@rzhang-dt>
>
> so, if there are two sensors that support visible and infrared,
> sensor 1:
> illuminance: xxx
> infrared: yyy
> sensor 2:
> illuminance: xxx
> infrared: yyy
>
> does this mean the ambient light of these two sensors are the same?
If the values are the same, then probably up to variations in the
sensitivity of the two sensors (and things like calibration etc
afterall we don't really have a ready consistent measure for infrared
in the same way as the perception scaled illuminance)
It's entirely possible that two sensors on a given device might get
different readings, both of which are useful. e.g. one of those
phones with a screen on the outside then a flip lid with another one
underneath for example.
>
> If no, I can't image how the userspace app uses these attributes?
That depends if your aim is to use them to control the brightness of
a screen and similar, or for example to use them for environmental
monitoring.
I agree with Jean (next email) in many ways that it is useful to
hide some complexity within a given driver (so as to provide
consistent interfaces etc to userspace.) However, if we can
also provide device specific access to other features of the device
I see no reason not to make them available. As already stated, there
are several applications where that infrared measurement is useful
even if only available as a raw adc count. (typically you'd have a
calibration function from measured values of what ever you care about
anyway).
As long as we have illuminance (the generally useful one that all such
sensors seem to provide) then any other values the driver wants to export
are fine as long as we maintain decent documentation of what they are.
Jonathan
prev parent reply other threads:[~2009-09-11 9:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 13:51 RFC: Light sensors, unifying current options? Jonathan Cameron
2009-09-07 5:26 ` Trisal, Kalhan
2009-09-07 7:28 ` Pavel Machek
2009-09-07 7:32 ` RFC: " Zhang Rui
2009-09-07 8:10 ` Corentin Chary
2009-09-07 11:42 ` Jonathan Cameron
2009-09-09 3:41 ` Zhang Rui
2009-09-09 11:28 ` Jonathan Cameron
2009-09-10 1:34 ` Zhang Rui
2009-09-10 8:23 ` Pavel Machek
2009-09-10 10:10 ` Jonathan Cameron
2009-09-10 10:05 ` Jonathan Cameron
2009-09-11 1:55 ` Zhang Rui
2009-09-11 7:20 ` Jean Delvare
2009-09-11 9:05 ` Jonathan Cameron
2009-09-11 9:22 ` Jonathan Cameron [this message]
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=4AAA16C8.9030904@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=alan@linux.intel.com \
--cc=ctusar@videon-central.com \
--cc=kalhan.trisal@intel.com \
--cc=khali@linux-fr.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rui.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox