On Thursday 31 May 2012 12:58 PM, Jonathan Cameron wrote:
Also cc'd Laxman for comments.
Allow the magn sensor raw attributes to be available only
when enable is true.
The single measurement mode change to power-down mode
automatically once the sensor data is measured, so there
is no need to enable this mode to allow the data reading
process (ak8975_read_axis) to begin, which internally is
setting the single measurement mode to take a sample.
Hmm. I'm not terribly keen on this as it's just changed from one non
abi compliant attribute to a different one.
We need to take another look at how to handle low power modes etc.
We could add some heuristics in driver on when to disable the device,
but that is obviously not that flexible.
Otherwise I'd much prefer a kernel wide view on manual disables
of indivual devices to adhoc bits of code liek this...
The underlying change to do with not explicitly setting power down
modes is fine, but I'd like Laxman's comment on this as I don't have
one.
The measurement is done in ONCE mode and once conversion completes the
device automatically goes into the power down mode. Hence we need not to
set the power-down mode explictly.
However, do we really require this "enable" sysfs? I think we can get
rid of this sysfs as it just does the flag setting now and so we really
dont need as per lots of improvement done in staging driver recently.
I will go with getting rid of this sysfs (enable or old name " mode").
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html