diff options
author | tryout_chen <tryout_chen@asus.com> | 2012-11-15 14:32:21 +0800 |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2012-11-29 10:18:55 -0800 |
commit | 05b777c19883248ea341945a243ddb64859cd3e7 (patch) | |
tree | 62264cf809ada4fa7d5a8ceefe7c59f27364c0b9 | |
parent | 8722d5e9b3d4bc96d433148d05334823631a645b (diff) | |
download | tegra-android-tegra3-grouper-3.1-jb-mr1.1.tar.gz |
Proximity: Enable sensor by it's previous RIL setting when device resume from suspend.android-tegra3-grouper-3.1-jb-mr1.1
Change-Id: Id5b0bfaa79d62e5c41fa704470cf82bf7a0fefac
-rw-r--r-- | drivers/input/proximity/cap1106.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/proximity/cap1106.c b/drivers/input/proximity/cap1106.c index c78299616e82..570a18fac7d6 100644 --- a/drivers/input/proximity/cap1106.c +++ b/drivers/input/proximity/cap1106.c @@ -72,6 +72,7 @@ static int prev_c6_status = 0; static int c2_acc_cnt = 0; static int c6_acc_cnt = 0; static int acc_limit = 10; +static int force_enable = 1; /*---------------------------------------------------------------------------- ** FUNCTION DECLARATION @@ -472,6 +473,7 @@ static ssize_t store_sensor_onoff(struct device *dev, struct device_attribute *a return -EINVAL; mutex_lock(&prox_mtx); + force_enable = enable; cap1106_enable_sensor(client, enable); mutex_unlock(&prox_mtx); @@ -892,7 +894,8 @@ static int cap1106_resume(struct i2c_client *client) { PROX_DEBUG("+\n"); mutex_lock(&prox_mtx); - cap1106_enable_sensor(client, 1); + if (force_enable) + cap1106_enable_sensor(client, 1); mutex_unlock(&prox_mtx); PROX_DEBUG("-\n"); return 0; |