leds: als: improve ALS reporting accuracy

Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
This commit is contained in:
Praveen Bharathi 2010-11-23 21:48:09 -06:00 committed by Colin Cross
parent d56d3861e2
commit 88f695fd31
2 changed files with 2 additions and 8 deletions

View File

@ -235,12 +235,7 @@ static int max9635_read_adj_als(struct max9635_data *als_data)
pr_info("exp = 0x%X, mant = 0x%X, lux = %d\n",
exponent, mantissa, lux);
/* TODO: temporary lens coefficient adjustment, final
calculation pending on shipping lens profile. */
if (lux < 200)
lux = lux * als_data->als_pdata->lens_coeff_l;
else
lux = lux * als_data->als_pdata->lens_coeff_h;
lux = lux * (exponent + als_data->als_pdata->lens_coeff);
if (max9635_debug & 1)
pr_info("%s:Reporting LUX %d\n", __func__, lux);

View File

@ -28,8 +28,7 @@ struct max9635_platform_data {
u8 threshold_timer;
u8 def_low_threshold;
u8 def_high_threshold;
u8 lens_coeff_l;
u8 lens_coeff_h;
u8 lens_coeff;
};
#endif /* __KERNEL__ */