Lines Matching refs:settings
173 struct tsl2772_settings settings; member
475 lux = (lux * chip->settings.als_gain_trim) / 1000; in tsl2772_get_lux()
561 chip->settings.prox_power = tsl2772_led_currents[i][1]; in tsl2772_read_prox_led_current()
630 memcpy(&chip->settings, chip->pdata->platform_default_settings, in tsl2772_defaults()
633 memcpy(&chip->settings, &tsl2772_default_settings, in tsl2772_defaults()
691 ret = (chip->settings.als_cal_target * chip->settings.als_gain_trim) / in tsl2772_als_calibrate()
696 chip->settings.als_gain_trim = ret; in tsl2772_als_calibrate()
715 chip->tsl2772_config[TSL2772_ALS_TIME] = chip->settings.als_time; in tsl2772_chip_on()
716 chip->tsl2772_config[TSL2772_PRX_TIME] = chip->settings.prox_time; in tsl2772_chip_on()
717 chip->tsl2772_config[TSL2772_WAIT_TIME] = chip->settings.wait_time; in tsl2772_chip_on()
719 chip->settings.als_prox_config; in tsl2772_chip_on()
722 (chip->settings.als_thresh_low) & 0xFF; in tsl2772_chip_on()
724 (chip->settings.als_thresh_low >> 8) & 0xFF; in tsl2772_chip_on()
726 (chip->settings.als_thresh_high) & 0xFF; in tsl2772_chip_on()
728 (chip->settings.als_thresh_high >> 8) & 0xFF; in tsl2772_chip_on()
730 (chip->settings.prox_persistence & 0xFF) << 4 | in tsl2772_chip_on()
731 (chip->settings.als_persistence & 0xFF); in tsl2772_chip_on()
734 chip->settings.prox_pulse_count; in tsl2772_chip_on()
736 (chip->settings.prox_thres_low) & 0xFF; in tsl2772_chip_on()
738 (chip->settings.prox_thres_low >> 8) & 0xFF; in tsl2772_chip_on()
740 (chip->settings.prox_thres_high) & 0xFF; in tsl2772_chip_on()
742 (chip->settings.prox_thres_high >> 8) & 0xFF; in tsl2772_chip_on()
753 (chip->settings.als_gain & 0xFF) | in tsl2772_chip_on()
754 ((chip->settings.prox_gain & 0xFF) << 2) | in tsl2772_chip_on()
755 (chip->settings.prox_diode << 4) | in tsl2772_chip_on()
756 (chip->settings.prox_power << 6); in tsl2772_chip_on()
759 als_count = 256 - chip->settings.als_time; in tsl2772_chip_on()
763 tsl2772_als_gain[chip->settings.als_gain]; in tsl2772_chip_on()
796 if (chip->settings.als_interrupt_en) in tsl2772_chip_on()
798 if (chip->settings.prox_interrupt_en) in tsl2772_chip_on()
875 if (chip->settings.prox_max_samples_cal < 1 || in tsl2772_prox_cal()
876 chip->settings.prox_max_samples_cal > MAX_SAMPLES_CAL) in tsl2772_prox_cal()
879 for (i = 0; i < chip->settings.prox_max_samples_cal; i++) { in tsl2772_prox_cal()
890 for (i = 0; i < chip->settings.prox_max_samples_cal; i++) { in tsl2772_prox_cal()
894 mean = sample_sum / chip->settings.prox_max_samples_cal; in tsl2772_prox_cal()
896 chip->settings.prox_thres_high = (max << 1) - mean; in tsl2772_prox_cal()
935 return scnprintf(buf, PAGE_SIZE, "%d\n", chip->settings.als_cal_target); in in_illuminance0_target_input_show()
950 chip->settings.als_cal_target = value; in in_illuminance0_target_input_store()
1079 return chip->settings.als_interrupt_en; in tsl2772_read_interrupt_config()
1081 return chip->settings.prox_interrupt_en; in tsl2772_read_interrupt_config()
1093 chip->settings.als_interrupt_en = val ? true : false; in tsl2772_write_interrupt_config()
1095 chip->settings.prox_interrupt_en = val ? true : false; in tsl2772_write_interrupt_config()
1116 chip->settings.als_thresh_high = val; in tsl2772_write_event_value()
1120 chip->settings.als_thresh_low = val; in tsl2772_write_event_value()
1129 chip->settings.prox_thres_high = val; in tsl2772_write_event_value()
1133 chip->settings.prox_thres_low = val; in tsl2772_write_event_value()
1143 time = chip->settings.als_time; in tsl2772_write_event_value()
1145 time = chip->settings.prox_time; in tsl2772_write_event_value()
1156 chip->settings.als_persistence = persistence; in tsl2772_write_event_value()
1158 chip->settings.prox_persistence = persistence; in tsl2772_write_event_value()
1189 *val = chip->settings.als_thresh_high; in tsl2772_read_event_value()
1192 *val = chip->settings.als_thresh_low; in tsl2772_read_event_value()
1200 *val = chip->settings.prox_thres_high; in tsl2772_read_event_value()
1203 *val = chip->settings.prox_thres_low; in tsl2772_read_event_value()
1212 time = chip->settings.als_time; in tsl2772_read_event_value()
1213 persistence = chip->settings.als_persistence; in tsl2772_read_event_value()
1219 time = chip->settings.prox_time; in tsl2772_read_event_value()
1220 persistence = chip->settings.prox_persistence; in tsl2772_read_event_value()
1271 *val = tsl2772_als_gain[chip->settings.als_gain]; in tsl2772_read_raw()
1273 *val = tsl2772_prox_gain[chip->settings.prox_gain]; in tsl2772_read_raw()
1276 *val = chip->settings.als_gain_trim; in tsl2772_read_raw()
1280 *val2 = (256 - chip->settings.als_time) * in tsl2772_read_raw()
1301 chip->settings.als_gain = 0; in tsl2772_write_raw()
1304 chip->settings.als_gain = 1; in tsl2772_write_raw()
1307 chip->settings.als_gain = 2; in tsl2772_write_raw()
1310 chip->settings.als_gain = 3; in tsl2772_write_raw()
1318 chip->settings.prox_gain = 0; in tsl2772_write_raw()
1321 chip->settings.prox_gain = 1; in tsl2772_write_raw()
1324 chip->settings.prox_gain = 2; in tsl2772_write_raw()
1327 chip->settings.prox_gain = 3; in tsl2772_write_raw()
1339 chip->settings.als_gain_trim = val; in tsl2772_write_raw()
1346 chip->settings.als_time = 256 - in tsl2772_write_raw()