Lines Matching full:ch1
56 /* Calculated values 1000 * (CH1/CH0)^1.4 for CH1/CH0 from 0 to 0.52 */
64 static unsigned long apds9300_calculate_lux(u16 ch0, u16 ch1) in apds9300_calculate_lux() argument
72 tmp = DIV_ROUND_UP(ch1 * 100, ch0); in apds9300_calculate_lux()
77 lux = 2290 * ch0 - 2910 * ch1; in apds9300_calculate_lux()
79 lux = 1570 * ch0 - 1800 * ch1; in apds9300_calculate_lux()
81 lux = 338 * ch0 - 260 * ch1; in apds9300_calculate_lux()
238 int ch0, ch1, ret = -EINVAL; in apds9300_read_raw() local
249 ch1 = apds9300_get_adc_val(data, 1); in apds9300_read_raw()
250 if (ch1 < 0) { in apds9300_read_raw()
251 ret = ch1; in apds9300_read_raw()
254 *val = apds9300_calculate_lux(ch0, ch1); in apds9300_read_raw()