diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-06-28 15:52:04 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:56:12 +0200 |
commit | 75b83c3eb5280fd11df91c9c465aef91315c9f0f (patch) | |
tree | b70295bdf30ebcb0933e14e7345a61c789e0ae13 /drivers/hwmon | |
parent | d656f5e0ae8dbfc090c20cd472e1e481262dfff0 (diff) |
lsm303dlh: add support for Android early suspend
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/lsm303dlh_a.c | 3 | ||||
-rw-r--r-- | drivers/hwmon/lsm303dlh_m.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hwmon/lsm303dlh_a.c b/drivers/hwmon/lsm303dlh_a.c index af0ceee2e45..8955606067d 100644 --- a/drivers/hwmon/lsm303dlh_a.c +++ b/drivers/hwmon/lsm303dlh_a.c @@ -37,6 +37,7 @@ #endif #include <linux/lsm303dlh.h> +#include <linux/earlysuspend.h> #include <linux/regulator/consumer.h> /* lsm303dlh accelerometer registers */ @@ -197,6 +198,7 @@ struct lsm303dlh_a_data { unsigned char interrupt_configure[2]; unsigned char interrupt_duration[2]; unsigned char interrupt_threshold[2]; + struct early_suspend early_suspend; int device_status; }; @@ -286,6 +288,7 @@ static int lsm303dlh_a_restore(struct lsm303dlh_a_data *ddata) if (ddata->regulator) regulator_enable(ddata->regulator); + /* BDU should be enabled by default/recommened */ reg = ddata->range; reg |= LSM303DLH_A_CR4_BDU_MASK; diff --git a/drivers/hwmon/lsm303dlh_m.c b/drivers/hwmon/lsm303dlh_m.c index 5d35dc2208d..53569c7e7f9 100644 --- a/drivers/hwmon/lsm303dlh_m.c +++ b/drivers/hwmon/lsm303dlh_m.c @@ -38,6 +38,7 @@ #include <linux/lsm303dlh.h> #include <linux/regulator/consumer.h> +#include <linux/earlysuspend.h> #include <linux/kernel.h> /* lsm303dlh magnetometer registers */ @@ -156,6 +157,7 @@ struct lsm303dlh_m_data { unsigned char mode; unsigned char rate; unsigned char range; + struct early_suspend early_suspend; int device_status; }; |