From: Jonathan Cameron <jic23@cam.ac.uk>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] Sysfs attribute to specify device range
Date: Sat, 02 Oct 2010 12:03:58 +0000 [thread overview]
Message-ID: <4CA71FAE.9060900@cam.ac.uk> (raw)
In-Reply-To: <4CA71DF0.5000309@cam.ac.uk>
On 10/02/10 12:56, Jonathan Cameron wrote:
> Hi All,
>
> This question is actually motivated by a light sensor driver
> proposed for IIO, but given we don't have an answer in our
> current abi and the problem seems a common one I thought
> I would ask you guys. Firstly I'm not sure if you already
> have an interface for this!
>
> We have a multi range sensor, to simplify the discussion, let us
> call it an adc. So it's range can be configured to say 0-1V, 0-2V, 0-4V.
> We would like to be able to control this via a sysfs attribute and
> have been trying to work out what to call it.
>
> in1_max is out because I believe that is used for alarms (whilst we have
> different, more general, naming for those, we don't want to muddy the
> waters by reusing the name).
>
> in1_range is a bit non specific as it isn't clear how to specify future
> devices that support say 1-2V range. We could allow a pair of values
> to specify the range (fine as single conceptual entity). If only one
> is present then assume the minimum is 0?
>
> Pointers to drivers which are already handling this case, bits of the
> hwmon abi that I missed or suggestions all welcome.
>
Actually from our point of view it occurs to me that we can just treat this
case as an on chip calibration scale factor so we do have an interface for
this in IIO _calibscale. I was clearly half asleep this morning. Still,
I would be interested to here if there is an equivalent in hwmon. Sorry for
the noise.
Jonathan
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2010-10-02 12:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 11:56 [lm-sensors] Sysfs attribute to specify device range Jonathan Cameron
2010-10-02 12:03 ` Jonathan Cameron [this message]
2010-10-02 13:08 ` Guenter Roeck
2010-10-02 15:57 ` 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=4CA71FAE.9060900@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=lm-sensors@vger.kernel.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.