From: Jonathan Cameron <jic23@cam.ac.uk>
To: LKML <linux-kernel@vger.kernel.org>,
Jean Delvare <khali@linux-fr.org>,
Zhang Rui <rui.zhang@intel.com>
Subject: Best option for handling dependencies between sysfs params.
Date: Sat, 17 Oct 2009 19:24:09 +0100 [thread overview]
Message-ID: <4ADA0BC9.4010506@cam.ac.uk> (raw)
Dear All,
The tsl2561 ambient light sensor has separate controls for integration
time and for gain.
Now, discussions about the tsl2550 driver suggested that range be handled
by an illuminance0_max_range parameter. In that particular device things
are simple as there is one internal variable effecting the range.
So to try and match interfaces, I'm intending to have the
same illuminance0_max_range and also an integration time parameter.
(avoiding for now the more complex manual option!)
My current approach is to use writes to illuminance0_max_range to store
a 'requested' max gain value. Thus a later change to the integration time
parameter may well result in the internal gain parameter also changing
in order to meet this desired value.
Reading this parameter will always return the max range value for
the current configuration.
Do people think this is a valid approach? More or less corresponds to
'integration time priority' in the language of photography. In effect
it makes the internal gain an automatic parameter rather than integration
time. Could just as easily do the other way round though.
All comments welcome.
Jonathan
next reply other threads:[~2009-10-17 18:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-17 18:24 Jonathan Cameron [this message]
2009-10-18 11:43 ` Best option for handling dependencies between sysfs params Jean Delvare
2009-10-18 12:32 ` 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=4ADA0BC9.4010506@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--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