/linux/Documentation/misc-devices/ |
H A D | isl29003.rst | 22 ADC, I2C user programmable lux range select for optimized counts/lux, and 27 The driver allows to set the lux range, the bit resolution, the operational 28 mode (see below) and the power state of device and can read the current lux 46 0: 0 lux to 1000 lux (default) 47 1: 0 lux to 4000 lux 48 2: 0 lux to 16,000 lux 49 3: 0 lux to 64,000 lux 73 lux (read only):
|
H A D | apds990x.rst | 29 only lux values. Lux value is calculated using information from the both 30 channels. HW threshold level is calculated from the given lux value to match 60 RO - measured lux value
|
H A D | bh1770glc.rst | 25 ALS produces 16 bit lux values. The chip contains interrupt logic to produce 46 so that measurement produces about the expected lux value. 63 RO - measured lux value
|
/linux/drivers/iio/light/ |
H A D | cm3232.c | 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 *= als_info->calibscale; in cm3232_get_lux() 226 lux = div_u64(lux, CM3232_CALIBSCALE_RESOLUTION); in cm3232_get_lux() 227 lux = div_u64(lux, CM3232_MLUX_PER_LUX); in cm3232_get_lux() 229 if (lux > 0xFFFF) in cm3232_get_lux() 230 lux = 0xFFFF; in cm3232_get_lux() [all …]
|
H A D | cm32181.c | 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 *= cm32181->calibscale; in cm32181_get_lux() 328 lux = div_u64(lux, CM32181_CALIBSCALE_RESOLUTION); in cm32181_get_lux() 329 lux = div_u64(lux, CM32181_LUX_PER_BIT_RESOLUTION); in cm32181_get_lux() 331 if (lux > 0xFFFF) in cm32181_get_lux() 332 lux = 0xFFFF; in cm32181_get_lux() [all …]
|
H A D | tsl2583.c | 65 u16 lux; member 232 chip->als_cur_info.lux = 0; in tsl2583_get_lux() 245 lux = 0; in tsl2583_get_lux() 265 lux = ch0lux - ch1lux; in tsl2583_get_lux() 270 lux = 0; in tsl2583_get_lux() 272 lux = (lux + (chip->als_time_scale >> 1)) / in tsl2583_get_lux() 284 lux64 = lux; in tsl2583_get_lux() 287 lux = lux64; in tsl2583_get_lux() 288 lux = DIV_ROUND_CLOSEST(lux, 1000); in tsl2583_get_lux() 296 chip->als_cur_info.lux = lux; in tsl2583_get_lux() [all …]
|
H A D | cm3605.c | 77 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 D | apds9300.c | 67 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 D | tsl2772.c | 149 u16 lux; member 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; in tsl2772_get_lux() local 467 lux = ((chip->als_cur_info.als_ch0 * p->ch0) - in tsl2772_get_lux() 477 lux = (lux * chip->settings.als_gain_trim) / 1000; in tsl2772_get_lux() 479 if (lux > TSL2772_LUX_CALC_OVER_FLOW) { in tsl2772_get_lux() 484 max_lux = max(max_lux, lux); in tsl2772_get_lux() 491 chip->als_cur_info.lux = max_lux; in tsl2772_get_lux() 1243 *val = chip->als_cur_info.lux; in tsl2772_read_raw()
|
H A D | ltrf216a.c | 245 u64 lux; in ltrf216a_get_lux() local 257 lux = greendata * data->info->lux_multiplier * LTRF216A_WIN_FAC; in ltrf216a_get_lux() 259 return lux; in ltrf216a_get_lux()
|
H A D | opt3001.c | 177 int lux; in opt3001_to_iio_ret() local 179 lux = 10 * (mantissa << exponent); in opt3001_to_iio_ret() 180 *val = lux / 1000; in opt3001_to_iio_ret() 181 *val2 = (lux - (*val * 1000)) * 1000; in opt3001_to_iio_ret()
|
H A D | tsl2591.c | 439 int counts_per_lux, int_time_fval, gain_multi, lux; in tsl2591_read_channel_data() local 483 lux = ((als_ch0 - als_ch1) * in tsl2591_read_channel_data() 486 dev_dbg(&client->dev, "Raw lux calculation: %d\n", lux); in tsl2591_read_channel_data() 489 *val = lux / 1000; in tsl2591_read_channel_data() 492 *val2 = (lux - (*val * 1000)) * 1000; in tsl2591_read_channel_data()
|
H A D | gp2ap002.c | 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()
|
H A D | si1133.c | 709 int lux; in si1133_get_lux() local 732 lux = si1133_calc_polynomial(high_vis, ir, in si1133_get_lux() 737 lux = si1133_calc_polynomial(low_vis, ir, in si1133_get_lux() 742 *val = lux >> SI1133_LUX_OUTPUT_FRACTION; in si1133_get_lux()
|
H A D | tsl2563.c | 425 unsigned long ratio, lux, ch0 = adc0, ch1 = adc1; in tsl2563_adc_to_lux() local 432 lux = ch0 * lp->ch0_coeff - ch1 * lp->ch1_coeff; in tsl2563_adc_to_lux() 434 return (unsigned int) (lux >> ADC_FRAC_BITS); in tsl2563_adc_to_lux()
|
H A D | ltr501.c | 311 unsigned long ratio, lux; in ltr501_calculate_lux() local 320 lux = LTR501_LUX_CONV(1774, vis_data, -1105, ir_data); in ltr501_calculate_lux() 322 lux = LTR501_LUX_CONV(3772, vis_data, 1336, ir_data); in ltr501_calculate_lux() 324 lux = LTR501_LUX_CONV(1690, vis_data, 169, ir_data); in ltr501_calculate_lux() 326 lux = 0; in ltr501_calculate_lux() 328 return lux / 1000; in ltr501_calculate_lux()
|
H A D | isl29018.c | 192 static int isl29018_read_lux(struct isl29018_chip *chip, int *lux) in isl29018_read_lux() argument 204 *lux = data_x_range * chip->calibscale + in isl29018_read_lux()
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-bus-iio-light-tsl2583 | 6 value which is later used in calculating illuminance in lux. 13 used in calculating illuminance in lux. 19 This property is the known externally illuminance (in lux).
|
H A D | sysfs-bus-iio-light-tsl2772 | 6 value which is later used in calculating illuminance in lux.
|
/linux/drivers/misc/ |
H A D | tsl2550.c | 145 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 D | isl29020.c | 43 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 D | apds990x.c | 138 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() 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 = chip->lux_raw; in apds990x_irq() 640 result = (chip->lux * chip->lux_calib) / APDS_CALIB_SCALER; in apds990x_lux_show()
|
H A D | bh1770glc.c | 180 int lux) in bh1770_lux_interrupt_control() argument 182 chip->int_mode_lux = lux; in bh1770_lux_interrupt_control() 186 (lux << 1) | chip->int_mode_prox); in bh1770_lux_interrupt_control() 288 u32 lux; in bh1770_lux_raw_to_adjusted() local 289 lux = ((u32)raw * chip->lux_corr) / BH1770_LUX_CORR_SCALE; in bh1770_lux_raw_to_adjusted() 290 return min(lux, (u32)BH1770_LUX_RANGE); in bh1770_lux_raw_to_adjusted()
|
/linux/drivers/hid/amd-sfh-hid/sfh1_1/ |
H A D | amd_sfh_interface.h | 148 u32 lux; member
|
H A D | amd_sfh_interface.c | 121 *ambient_light = amd_sfh_float_to_int(als_data.lux); in amd_sfh_als_info()
|