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>