misc/apds990x: Reduce the IR factor when CH1/CH0 ratio is abnormal
authorLeo Yan <leo.yan@intel.com>
Thu, 26 Apr 2012 00:54:36 +0000 (08:54 +0800)
committerbuildbot <buildbot@intel.com>
Fri, 27 Apr 2012 22:08:33 +0000 (15:08 -0700)
commit5da6583e8e71292881bd13f7fd3174fdcc056191
treebeaf1717ad0b111de88aae7044960f2097a5a0bf
parent21650fde6feeadb58f19362e1799ac5952025ad0
misc/apds990x: Reduce the IR factor when CH1/CH0 ratio is abnormal

BZ: 31055 31056

The lux equation in the apds990x datasheet assume the light source
is far from the sensor and CH1/CH0 ratio is always below than 0.3.
If the ratio is out of range, it means an abnormal incandescent light
source is very close to the sensor. In this case, the lux equation
doesn't work and we need to reduce the IR factor to get the correct
lux value.

Change-Id: I59b967bf775fbb3a46591728952688811c6347eb
Signed-off-by: Leo Yan <leo.yan@intel.com>
Reviewed-on: http://android.intel.com:8080/46184
Reviewed-by: Chen, Jie D <jie.d.chen@intel.com>
Reviewed-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: Du, Alek <alek.du@intel.com>
Reviewed-by: Tang, HaifengX <haifengx.tang@intel.com>
Tested-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/misc/apds990x.c