summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-10-11 17:22:56 +0530
committerPhilippe Langlais <philippe.langlais@linaro.org>2012-03-19 09:01:32 +0100
commit6a367636b3a1ea34ca4de44f6391ffee8cd98d4c (patch)
treec34eac11b6a624745fe7900c8728904d5a12425c
parent9d4a7f720345c89a6cf750d1590027a0ac78b139 (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> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35539 Reviewed-by: Naga RADHESH Y <naga.radheshy@stericsson.com> Reviewed-by: QABUILD
-rw-r--r--drivers/hwmon/lsm303dlhc_a.c5
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;
}