Lines Matching refs:als_settings
102 struct tsl2583_settings als_settings; member
131 chip->als_settings.als_time = 100; in tsl2583_defaults()
137 chip->als_settings.als_gain = 0; in tsl2583_defaults()
140 chip->als_settings.als_gain_trim = 1000; in tsl2583_defaults()
143 chip->als_settings.als_cal_target = 130; in tsl2583_defaults()
146 memcpy(chip->als_settings.als_device_lux, tsl2583_default_lux, in tsl2583_defaults()
240 for (p = (struct tsl2583_lux *)chip->als_settings.als_device_lux; in tsl2583_get_lux()
250 (gainadj[chip->als_settings.als_gain].ch0 >> 1)) in tsl2583_get_lux()
251 / gainadj[chip->als_settings.als_gain].ch0; in tsl2583_get_lux()
253 (gainadj[chip->als_settings.als_gain].ch1 >> 1)) in tsl2583_get_lux()
254 / gainadj[chip->als_settings.als_gain].ch1; in tsl2583_get_lux()
285 lux64 = lux64 * chip->als_settings.als_gain_trim; in tsl2583_get_lux()
352 gain_trim_val = (unsigned int)(((chip->als_settings.als_cal_target) in tsl2583_als_calibrate()
353 * chip->als_settings.als_gain_trim) / lux_val); in tsl2583_als_calibrate()
361 chip->als_settings.als_gain_trim = (int)gain_trim_val; in tsl2583_als_calibrate()
372 als_count = DIV_ROUND_CLOSEST(chip->als_settings.als_time * 100, 270); in tsl2583_set_als_time()
403 chip->als_settings.als_gain); in tsl2583_set_als_gain()
407 chip->als_settings.als_gain); in tsl2583_set_als_gain()
478 ret = sprintf(buf, "%d\n", chip->als_settings.als_cal_target); in in_illuminance_input_target_show()
496 chip->als_settings.als_cal_target = value; in in_illuminance_input_target_store()
535 for (i = 0; i < ARRAY_SIZE(chip->als_settings.als_device_lux); i++) { in in_illuminance_lux_table_show()
537 chip->als_settings.als_device_lux[i].ratio, in in_illuminance_lux_table_show()
538 chip->als_settings.als_device_lux[i].ch0, in in_illuminance_lux_table_show()
539 chip->als_settings.als_device_lux[i].ch1); in in_illuminance_lux_table_show()
540 if (chip->als_settings.als_device_lux[i].ratio == 0) { in in_illuminance_lux_table_show()
589 memcpy(chip->als_settings.als_device_lux, &value[1], in in_illuminance_lux_table_store()
706 *val = chip->als_settings.als_gain_trim; in tsl2583_read_raw()
712 *val = gainadj[chip->als_settings.als_gain].mean; in tsl2583_read_raw()
719 *val2 = chip->als_settings.als_time; in tsl2583_read_raw()
764 chip->als_settings.als_gain_trim = val; in tsl2583_write_raw()
774 chip->als_settings.als_gain = i; in tsl2583_write_raw()
784 chip->als_settings.als_time = val2; in tsl2583_write_raw()