lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 17 Oct 2009 19:24:09 +0100
From:	Jonathan Cameron <jic23@....ac.uk>
To:	LKML <linux-kernel@...r.kernel.org>,
	Jean Delvare <khali@...ux-fr.org>,
	Zhang Rui <rui.zhang@...el.com>
Subject: Best option for handling dependencies between sysfs params.

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ