diff options
author | Chandler Zhang <chazhang@nvidia.com> | 2012-06-28 15:06:47 +0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-07-03 15:10:05 -0700 |
commit | 2cc337abc18dc992e736a3c663366e980021f806 (patch) | |
tree | a465866f0b829cf52812a9dc15b4828b8bfe68ad /drivers/input | |
parent | 9ceabb8535ccec39c0450542bbdedd927c920d89 (diff) |
input: misc: fix light level issue at resume
The light level is very low at the beginning of resume if auto
backlight level is enabled.
Remove the trigger event code with zero value code and directly
report the actual adc level to fix the issue.
Bug 1005271
Change-Id: I225f2b2b07e676d736ea5cd116cdc769d57ce2f2
Signed-off-by: Chandler Zhang <chazhang@nvidia.com>
Reviewed-on: http://git-master/r/112892
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/cm3217.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/input/misc/cm3217.c b/drivers/input/misc/cm3217.c index 2e96808284cc..7bea58e6ab41 100644 --- a/drivers/input/misc/cm3217.c +++ b/drivers/input/misc/cm3217.c @@ -384,20 +384,8 @@ static int lightsensor_enable(struct cm3217_info *lpi) if (ret < 0) pr_err("[LS][CM3217 error]%s: set auto light sensor fail\n", __func__); - else { - msleep(50); /* wait for 50 ms for the first report adc */ - - /* report an invalid value first to ensure we - * trigger an event when adc_level is zero. - */ - input_report_abs(lpi->ls_input_dev, ABS_MISC, -1); - input_sync(lpi->ls_input_dev); - /* resume, IOCTL and DEVICE_ATTR */ - report_lsensor_input_event(lpi, 1); - lpi->als_enable = 1; - } - queue_delayed_work(lpi->lp_wq, &report_work, lpi->polling_delay); + queue_work(lpi->lp_wq, &report_work); lpi->als_enable = 1; mutex_unlock(&als_enable_mutex); |