mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
leds: als: improve ALS reporting accuracy
Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
This commit is contained in:
parent
d56d3861e2
commit
88f695fd31
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user