iio: mma8452: add i2c_device_id for mma8451
PATCH 1/2 iio: mma8452: add i2c_device_id for mma8451
This was forgotten about and is added for consistency now
--- drivers/iio/accel/mma8452.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/accel/mma8452.c +1 -0
@@ -1535,6 +1535,7 @@ static const struct dev_pm_ops mma8452_pm_ops = { };static const struct i2c_device_id mma8452_id[] = { + {"mma8451" , mma8452 }, {"mma8452" , mma8452 }, {"mma8453" , mma8453 }, {"mma8652" , mma8652 },
Signature · 1 line
2.1.4
PATCH 2/2 iio: mma8452: use runtime pm instead of device specific autosleep
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.
--- drivers/iio/accel/mma8452.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/mma8452.c +1 -1
@@ -17,7 +17,7 @@* * 7-bit I2C slave address 0x1c/0x1d (pin selectable) * -* TODO: orientation events, autosleep +* TODO: orientation events */ #include <linux/module.h>
Signature · 1 line
2.1.4
PATCH 1/2 iio: mma8452: add i2c_device_id for mma8451
In reply to Martin KepplingerThis was forgotten about and is added for consistency now
---
I'm sorry, I messed up the first patch. Understandable though, given it's complexity.
drivers/iio/accel/mma8452.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/accel/mma8452.c +1 -0
@@ -1535,6 +1535,7 @@ static const struct dev_pm_ops mma8452_pm_ops = { };static const struct i2c_device_id mma8452_id[] = { + {"mma8451" , mma8451 }, {"mma8452" , mma8452 }, {"mma8453" , mma8453 }, {"mma8652" , mma8652 },
Signature · 1 line
2.1.4
Jonathan Cameron
maintainerQuoted 6 lines · Martin Kepplinger
This was forgotten about and is added for consistency now
Signed-off-by Martin Kepplinger <[email protected]>---
I'm sorry, I messed up the first patch. Understandable though, given it's complexity.
Took me a disturbingly long time to notice what was wrong.
Applied to the togreg branch of iio.git - pushed out as testing for the autobuilders to play with it.
Jonathan
Quoted 18 lines
drivers/iio/accel/mma8452.c | 1 + 1 file changed, 1 insertion(+)drivers/iio/accel/mma8452.c +1
-0@@ -1535,6 +1535,7 @@ static const struct dev_pm_ops mma8452_pm_ops = { };static const struct i2c_device_id mma8452_id[] = { + {"mma8451" , mma8451 }, {"mma8452" , mma8452 }, {"mma8453" , mma8453 }, {"mma8652" , mma8652 },
Re: [PATCH 2/2] iio: mma8452: use runtime pm instead of device specific autosleep
In reply to Martin KepplingerQuoted 21 lines · Martin Kepplinger
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 maintainruntime 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
Quoted 8 lines
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 <[email protected]>Reviewed-by Martina Kepplinger <[email protected]>
A good detailed explanation + to be cynical, if anyone actually wants to implement it and provide numbers showing it is the best thing since sliced bread - the absence of a comment about it not being done isn't going to stop them!
Applied, thanks,
Jonathan
Quoted 18 lines
--- drivers/iio/accel/mma8452.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/accel/mma8452.c +1
-1@@ -17,7 +17,7 @@* * 7-bit I2C slave address 0x1c/0x1d (pin selectable) * -* TODO: orientation events, autosleep +* TODO: orientation events */ #include <linux/module.h>