hwmon: lis3: regulator control

Based on pm_runtime control, turn lis3 regulators on and off.
Perform context save and restore on transitions.

Feature is optional and must be enabled in platform data.

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
This commit is contained in:
Samu Onkalo 2010-10-22 07:57:24 -04:00 committed by Guenter Roeck
parent 2a34699662
commit f9deb41f91
4 changed files with 121 additions and 1 deletions

View file

@ -64,6 +64,8 @@ struct lis3lv02d_platform_data {
s8 axis_x;
s8 axis_y;
s8 axis_z;
#define LIS3_USE_REGULATOR_CTRL 0x01
u16 driver_features;
int (*setup_resources)(void);
int (*release_resources)(void);
/* Limits for selftest are specified in chip data sheet */