Lines Matching full:ch1
57 /* Calculated values 1000 * (CH1/CH0)^1.4 for CH1/CH0 from 0 to 0.52 */
65 static unsigned long apds9300_calculate_lux(u16 ch0, u16 ch1) in apds9300_calculate_lux() argument
73 tmp = DIV_ROUND_UP(ch1 * 100, ch0); in apds9300_calculate_lux()
78 lux = 2290 * ch0 - 2910 * ch1; in apds9300_calculate_lux()
80 lux = 1570 * ch0 - 1800 * ch1; in apds9300_calculate_lux()
82 lux = 338 * ch0 - 260 * ch1; in apds9300_calculate_lux()
239 int ch0, ch1, ret = -EINVAL; in apds9300_read_raw() local
250 ch1 = apds9300_get_adc_val(data, 1); in apds9300_read_raw()
251 if (ch1 < 0) { in apds9300_read_raw()
252 ret = ch1; in apds9300_read_raw()
255 *val = apds9300_calculate_lux(ch0, ch1); in apds9300_read_raw()