From 2cc337abc18dc992e736a3c663366e980021f806 Mon Sep 17 00:00:00 2001 From: Chandler Zhang Date: Thu, 28 Jun 2012 15:06:47 +0800 Subject: 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 Reviewed-on: http://git-master/r/112892 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani --- drivers/input/misc/cm3217.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'drivers/input') 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); -- cgit v1.2.3