Re: [PATCH] staging:iio:magnetometer:ak8975: fix the sensor enable logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/31/2012 10:11 AM, Laxman Dewangan wrote:
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").

Now that's a solution I like!

Thanks, Laxman. Leed, does this work for you?
--
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


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux