diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2012-02-14 07:46:51 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@linaro.org> | 2012-02-14 16:02:56 +0100 |
commit | 0a2566f6898dd07b681476645bab14d3f4a20dc3 (patch) | |
tree | 49bc8e5a7d6806679f0dcb0496735fecd4323820 | |
parent | c35e412a6de8d67230d580c9987345dd7a02cdab (diff) |
hwmon: lsm303dlhc_a: use regulator_set_optimum_mode()
ST-Ericsson ID: 366715
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I3fd6e8025e658110505e77c724f6bf9b00f6ce9c
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
-rw-r--r-- | drivers/hwmon/lsm303dlhc_a.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hwmon/lsm303dlhc_a.c b/drivers/hwmon/lsm303dlhc_a.c index 17c74595ff2..1c6d25f9b87 100644 --- a/drivers/hwmon/lsm303dlhc_a.c +++ b/drivers/hwmon/lsm303dlhc_a.c @@ -518,6 +518,11 @@ static int __devinit lsm303dlhc_a_probe(struct i2c_client *client, } if (adata->regulator) { + /* + * 130 microamps typical with magnetic sensor setting ODR = 7.5 + * Hz, Accelerometer sensor ODR = 50 Hz. Double for safety. + */ + regulator_set_optimum_mode(adata->regulator, 130 * 2); regulator_enable(adata->regulator); adata->device_status = DEVICE_ON; } |