]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iio: mma8452: use runtime pm instead of device specific autosleep
authorMartin Kepplinger <martink@posteo.de>
Mon, 14 Mar 2016 11:26:29 +0000 (12:26 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 20 Mar 2016 10:27:23 +0000 (10:27 +0000)
What is this autosleep?
-----------------------
It slows down the device after x seconds of inactivity. The thing is, we have
really achieved almost the same by runtime pm.

differnces are:

autosleep
 * uses more power during inactivity
 * the first read after inactivity slightly faster
 * complicated to understand for the user
 * no documented sysfs interface (afaik)
 * complicated to read and maintain

runtime pm
 * already merged in mma8452
 * uses less power during inactivity
 * first read after inactivity slower
 * easy to use. well documented.
 * easy to maintain and understand

The two approaches solve the same problem. runtime pm has more advantages
than autosleep and comes quite close to it's behaviour anyways. As I see it,
autosleep, even if somehow supported, would never be used anyways.

So resolve this issue by "ignoring" autosleep.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Reviewed-by: Martina Kepplinger <martina.novakovic@zoho.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/mma8452.c

index 6aa2517b4688cc28a4701b103da5c5bae9560377..e225d3c53bd51c11cb84746837c4b6e05668fd60 100644 (file)
@@ -17,7 +17,7 @@
  *
  * 7-bit I2C slave address 0x1c/0x1d (pin selectable)
  *
- * TODO: orientation events, autosleep
+ * TODO: orientation events
  */
 
 #include <linux/module.h>