Home
last modified time | relevance | path

Searched refs:lux (Results 1 - 25 of 44) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/iio/light/
H A Dcm3232.c191 * cm3232_get_lux() - report current lux value
194 * Convert sensor data to lux. It depends on integration
197 * Return: Zero or positive value is lux, otherwise error code.
206 u64 lux; in cm3232_get_lux() local
213 lux = (__force u64)als_info->mlux_per_bit; in cm3232_get_lux()
214 lux *= als_info->mlux_per_bit_base_it; in cm3232_get_lux()
215 lux = div_u64(lux, als_it); in cm3232_get_lux()
224 lux *= chip->regs_als; in cm3232_get_lux()
225 lux * in cm3232_get_lux()
[all...]
H A Dtsl2583.c3 * Device driver for monitoring ambient light intensity (lux)
65 u16 lux; member
145 /* Default lux table. */ in tsl2583_defaults()
151 * Reads and calculates current lux value.
161 * calculate the lux.
166 u32 lux; /* raw lux calculated from device data */ in tsl2583_get_lux() local
185 ret = chip->als_cur_info.lux; /* return LAST VALUE */ in tsl2583_get_lux()
215 /* extract ALS/lux data */ in tsl2583_get_lux()
228 * calculated lux t in tsl2583_get_lux()
[all...]
H A Dcm32181.c299 * cm32181_get_lux() - report current lux value
302 * Convert sensor raw data to lux. It depends on integration
305 * Return: Positive value is lux, otherwise is error code.
312 u64 lux; in cm32181_get_lux() local
318 lux = cm32181->lux_per_bit; in cm32181_get_lux()
319 lux *= cm32181->lux_per_bit_base_it; in cm32181_get_lux()
320 lux = div_u64(lux, als_it); in cm32181_get_lux()
326 lux *= ret; in cm32181_get_lux()
327 lux * in cm32181_get_lux()
[all...]
H A Dcm3605.c76 s64 lux; in cm3605_get_lux() local
96 lux = res - 30; in cm3605_get_lux()
99 lux *= cm3605->als_max; in cm3605_get_lux()
100 lux = div64_s64(lux, CM3605_AOUT_TYP_MAX_MV); in cm3605_get_lux()
102 return lux; in cm3605_get_lux()
H A Dapds9300.c67 unsigned long lux, tmp; in apds9300_calculate_lux() local
75 lux = 3150 * ch0 - (unsigned long)DIV_ROUND_UP_ULL(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()
84 lux = 0; in apds9300_calculate_lux()
87 return lux / 100000; in apds9300_calculate_lux()
H A Dtsl2772.c3 * Device driver for monitoring ambient light intensity in (lux) and proximity
147 u16 lux; member
399 * tsl2772_get_lux() - Reads and calculates current lux value.
405 * device gain. The code supports multiple lux equations through the lux table
406 * coefficients. A lux gain trim is applied to each lux equation, and then the
407 * maximum lux within the interval 0..65535 is selected.
432 ret = chip->als_cur_info.lux; /* return LAST VALUE */ in tsl2772_get_lux()
455 ret = chip->als_cur_info.lux; in tsl2772_get_lux()
463 int lux; tsl2772_get_lux() local
[all...]
H A Dopt3001.c157 * purposes. Use milli lux precision to avoid 32-bit integer in opt3001_find_scale()
173 int lux; in opt3001_to_iio_ret() local
175 lux = 10 * (mantissa << exponent); in opt3001_to_iio_ret()
176 *val = lux / 1000; in opt3001_to_iio_ret()
177 *val2 = (lux - (*val * 1000)) * 1000; in opt3001_to_iio_ret()
H A Dgp2ap002.c212 * This array maps current and lux.
214 * Ambient light sensing range is 3 to 55000 lux.
219 * When the ADC measures 0, return 0 lux.
231 u16 lux; in gp2ap002_get_lux() local
241 lux = gp2ap002_illuminance_table[res]; in gp2ap002_get_lux()
243 return (int)lux; in gp2ap002_get_lux()
/kernel/linux/linux-6.6/drivers/iio/light/
H A Dcm3232.c191 * cm3232_get_lux() - report current lux value
194 * Convert sensor data to lux. It depends on integration
197 * Return: Zero or positive value is lux, otherwise error code.
206 u64 lux; in cm3232_get_lux() local
213 lux = (__force u64)als_info->mlux_per_bit; in cm3232_get_lux()
214 lux *= als_info->mlux_per_bit_base_it; in cm3232_get_lux()
215 lux = div_u64(lux, als_it); in cm3232_get_lux()
224 lux *= chip->regs_als; in cm3232_get_lux()
225 lux * in cm3232_get_lux()
[all...]
H A Dtsl2583.c3 * Device driver for monitoring ambient light intensity (lux)
65 u16 lux; member
145 /* Default lux table. */ in tsl2583_defaults()
151 * Reads and calculates current lux value.
161 * calculate the lux.
166 u32 lux; /* raw lux calculated from device data */ in tsl2583_get_lux() local
185 ret = chip->als_cur_info.lux; /* return LAST VALUE */ in tsl2583_get_lux()
215 /* extract ALS/lux data */ in tsl2583_get_lux()
228 * calculated lux t in tsl2583_get_lux()
[all...]
H A Dcm32181.c299 * cm32181_get_lux() - report current lux value
302 * Convert sensor raw data to lux. It depends on integration
305 * Return: Positive value is lux, otherwise is error code.
312 u64 lux; in cm32181_get_lux() local
318 lux = cm32181->lux_per_bit; in cm32181_get_lux()
319 lux *= cm32181->lux_per_bit_base_it; in cm32181_get_lux()
320 lux = div_u64(lux, als_it); in cm32181_get_lux()
326 lux *= ret; in cm32181_get_lux()
327 lux * in cm32181_get_lux()
[all...]
H A Dcm3605.c77 s64 lux; in cm3605_get_lux() local
97 lux = res - 30; in cm3605_get_lux()
100 lux *= cm3605->als_max; in cm3605_get_lux()
101 lux = div64_s64(lux, CM3605_AOUT_TYP_MAX_MV); in cm3605_get_lux()
103 return lux; in cm3605_get_lux()
H A Dapds9300.c67 unsigned long lux, tmp; in apds9300_calculate_lux() local
75 lux = 3150 * ch0 - (unsigned long)DIV_ROUND_UP_ULL(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()
84 lux = 0; in apds9300_calculate_lux()
87 return lux / 100000; in apds9300_calculate_lux()
H A Dtsl2772.c3 * Device driver for monitoring ambient light intensity in (lux) and proximity
149 u16 lux; member
401 * tsl2772_get_lux() - Reads and calculates current lux value.
407 * device gain. The code supports multiple lux equations through the lux table
408 * coefficients. A lux gain trim is applied to each lux equation, and then the
409 * maximum lux within the interval 0..65535 is selected.
434 ret = chip->als_cur_info.lux; /* return LAST VALUE */ in tsl2772_get_lux()
457 ret = chip->als_cur_info.lux; in tsl2772_get_lux()
465 int lux; tsl2772_get_lux() local
[all...]
H A Dopt3001.c157 * purposes. Use milli lux precision to avoid 32-bit integer in opt3001_find_scale()
173 int lux; in opt3001_to_iio_ret() local
175 lux = 10 * (mantissa << exponent); in opt3001_to_iio_ret()
176 *val = lux / 1000; in opt3001_to_iio_ret()
177 *val2 = (lux - (*val * 1000)) * 1000; in opt3001_to_iio_ret()
H A Dtsl2591.c417 * 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; in tsl2591_read_channel_data() local
477 /* Calculate counts per lux value */ in tsl2591_read_channel_data()
482 /* Calculate lux value */ in tsl2591_read_channel_data()
483 lux = ((als_ch0 - als_ch1) * in tsl2591_read_channel_data()
486 dev_dbg(&client->dev, "Raw lux calculatio in tsl2591_read_channel_data()
[all...]
H A Dltrf216a.c75 * in calculating lux.
87 * remains constant during the measurement of lux.
237 u64 lux, div; in ltrf216a_get_lux() local
249 lux = greendata * 45 * LTRF216A_WIN_FAC * 100; in ltrf216a_get_lux()
252 return div_u64(lux, div); in ltrf216a_get_lux()
H A Dgp2ap002.c212 * This array maps current and lux.
214 * Ambient light sensing range is 3 to 55000 lux.
219 * When the ADC measures 0, return 0 lux.
231 u16 lux; in gp2ap002_get_lux() local
241 lux = gp2ap002_illuminance_table[res]; in gp2ap002_get_lux()
243 return (int)lux; in gp2ap002_get_lux()
/kernel/linux/linux-5.10/drivers/misc/
H A Dtsl2550.c145 unsigned int lux; in tsl2550_calculate_lux() local
161 lux = ((c0 - c1) * ratio_lut[r]) / 256; in tsl2550_calculate_lux()
163 lux = 0; in tsl2550_calculate_lux()
168 return lux > TSL2550_MAX_LUX ? TSL2550_MAX_LUX : lux; in tsl2550_calculate_lux()
H A Disl29020.c43 unsigned long int lux; in als_lux_input_data_show() local
70 lux = ((((1 << (2 * (val & 3))))*1000) * ret_val) / 65536; in als_lux_input_data_show()
71 return sprintf(buf, "%ld\n", lux); in als_lux_input_data_show()
H A Dapds990x.c138 u32 lux; member
248 static u16 apds990x_lux_to_threshold(struct apds990x_chip *chip, u32 lux) in apds990x_lux_to_threshold() argument
254 if (lux == 0) in apds990x_lux_to_threshold()
256 else if (lux == APDS_RANGE) in apds990x_lux_to_threshold()
268 * Math: threshold = lux * cpl where in apds990x_lux_to_threshold()
270 * (count-per-lux) in apds990x_lux_to_threshold()
274 lux = lux * (APDS_CALIB_SCALER / 4) / (chip->lux_calib / 4); in apds990x_lux_to_threshold()
280 thres = lux * cpl / 64; in apds990x_lux_to_threshold()
498 chip->lux in apds990x_irq()
[all...]
/kernel/linux/linux-6.6/drivers/misc/
H A Dtsl2550.c145 unsigned int lux; in tsl2550_calculate_lux() local
161 lux = ((c0 - c1) * ratio_lut[r]) / 256; in tsl2550_calculate_lux()
163 lux = 0; in tsl2550_calculate_lux()
168 return lux > TSL2550_MAX_LUX ? TSL2550_MAX_LUX : lux; in tsl2550_calculate_lux()
H A Disl29020.c43 unsigned long int lux; in als_lux_input_data_show() local
70 lux = ((((1 << (2 * (val & 3))))*1000) * ret_val) / 65536; in als_lux_input_data_show()
71 return sprintf(buf, "%ld\n", lux); in als_lux_input_data_show()
H A Dapds990x.c138 u32 lux; member
248 static u16 apds990x_lux_to_threshold(struct apds990x_chip *chip, u32 lux) in apds990x_lux_to_threshold() argument
254 if (lux == 0) in apds990x_lux_to_threshold()
256 else if (lux == APDS_RANGE) in apds990x_lux_to_threshold()
268 * Math: threshold = lux * cpl where in apds990x_lux_to_threshold()
270 * (count-per-lux) in apds990x_lux_to_threshold()
274 lux = lux * (APDS_CALIB_SCALER / 4) / (chip->lux_calib / 4); in apds990x_lux_to_threshold()
280 thres = lux * cpl / 64; in apds990x_lux_to_threshold()
498 chip->lux in apds990x_irq()
[all...]
/kernel/linux/linux-6.6/drivers/hid/amd-sfh-hid/sfh1_1/
H A Damd_sfh_interface.h136 u32 lux; member

Completed in 21 milliseconds

12