ltr502als.c: Increase the sample integration circle of proximity sensor
authorLeo Yan <leo.yan@intel.com>
Tue, 27 Dec 2011 01:56:51 +0000 (09:56 +0800)
committerbuildbot <buildbot@intel.com>
Fri, 6 Jan 2012 01:50:54 +0000 (17:50 -0800)
BZ: 18196

During voice call display may go off by an accidental swipe. To avoid
that, we increase the sample intergration circle of proximity sensor.
After this change, it will take more time to trigger proximity interrupt
than before.

Change-Id: Id6fe644a9daf610de31398b2485914c43b7600d9
Signed-off-by: Leo Yan <leo.yan@intel.com>
Reviewed-on: http://android.intel.com:8080/29996
Reviewed-by: Liu, Hong <hong.liu@intel.com>
Reviewed-by: Du, Alek <alek.du@intel.com>
Tested-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/hwmon/ltr502als.c

index b4f2ee3..5785a2f 100644 (file)
@@ -409,7 +409,7 @@ static int ltr502als_initchip(struct alsps_device *alsps)
        alsps_write(alsps, CONFIGREG, POWER_UP | IDLE);
        alsps_write(alsps, DLSCTROL, ADC_64LEVEL);
        alsps_write(alsps, TCREG,
-                   PRX_INT_CYCLE1 | INTEGRATE_100MS | ALPS_INT_CYCLE1);
+                   PRX_INT_CYCLE4 | INTEGRATE_100MS | ALPS_INT_CYCLE1);
 
        /* change proximity threshold PRX_THRESH_CTL to 31 to decrease the distance
         * that triggers proximity interrupt*/