Lines Matching refs:lux
417 * tsl2591_read_channel_data - Reads raw channel data and calculates lux
419 * Formula for lux calculation;
423 * lux = ((C0DATA - C1DATA) * (1 - (C1DATA / C0DATA))) / CPL
425 * Scale values to get more representative value of lux i.e.
426 * lux = ((C0DATA - C1DATA) * (1000 - ((C1DATA * 1000) / C0DATA))) / CPL
439 int counts_per_lux, int_time_fval, gain_multi, lux;
477 /* Calculate counts per lux value */
482 /* Calculate lux value */
483 lux = ((als_ch0 - als_ch1) *
486 dev_dbg(&client->dev, "Raw lux calculation: %d\n", lux);
488 /* Divide by 1000 to get real lux value before scaling */
489 *val = lux / 1000;
491 /* Get the decimal part of lux reading */
492 *val2 = (lux - (*val * 1000)) * 1000;