Lines Matching refs:settings

175 	struct tsl2772_settings settings;  member
477 lux = (lux * chip->settings.als_gain_trim) / 1000; in tsl2772_get_lux()
563 chip->settings.prox_power = tsl2772_led_currents[i][1]; in tsl2772_read_prox_led_current()
604 chip->settings.prox_diode = prox_diode_mask; in tsl2772_read_prox_diodes()
626 memcpy(&chip->settings, chip->pdata->platform_default_settings, in tsl2772_defaults()
629 memcpy(&chip->settings, &tsl2772_default_settings, in tsl2772_defaults()
687 ret = (chip->settings.als_cal_target * chip->settings.als_gain_trim) / in tsl2772_als_calibrate()
692 chip->settings.als_gain_trim = ret; in tsl2772_als_calibrate()
711 chip->tsl2772_config[TSL2772_ALS_TIME] = chip->settings.als_time; in tsl2772_chip_on()
712 chip->tsl2772_config[TSL2772_PRX_TIME] = chip->settings.prox_time; in tsl2772_chip_on()
713 chip->tsl2772_config[TSL2772_WAIT_TIME] = chip->settings.wait_time; in tsl2772_chip_on()
715 chip->settings.als_prox_config; in tsl2772_chip_on()
718 (chip->settings.als_thresh_low) & 0xFF; in tsl2772_chip_on()
720 (chip->settings.als_thresh_low >> 8) & 0xFF; in tsl2772_chip_on()
722 (chip->settings.als_thresh_high) & 0xFF; in tsl2772_chip_on()
724 (chip->settings.als_thresh_high >> 8) & 0xFF; in tsl2772_chip_on()
726 (chip->settings.prox_persistence & 0xFF) << 4 | in tsl2772_chip_on()
727 (chip->settings.als_persistence & 0xFF); in tsl2772_chip_on()
730 chip->settings.prox_pulse_count; in tsl2772_chip_on()
732 (chip->settings.prox_thres_low) & 0xFF; in tsl2772_chip_on()
734 (chip->settings.prox_thres_low >> 8) & 0xFF; in tsl2772_chip_on()
736 (chip->settings.prox_thres_high) & 0xFF; in tsl2772_chip_on()
738 (chip->settings.prox_thres_high >> 8) & 0xFF; in tsl2772_chip_on()
749 (chip->settings.als_gain & 0xFF) | in tsl2772_chip_on()
750 ((chip->settings.prox_gain & 0xFF) << 2) | in tsl2772_chip_on()
751 (chip->settings.prox_diode << 4) | in tsl2772_chip_on()
752 (chip->settings.prox_power << 6); in tsl2772_chip_on()
755 als_count = 256 - chip->settings.als_time; in tsl2772_chip_on()
759 tsl2772_als_gain[chip->settings.als_gain]; in tsl2772_chip_on()
792 if (chip->settings.als_interrupt_en) in tsl2772_chip_on()
794 if (chip->settings.prox_interrupt_en) in tsl2772_chip_on()
871 if (chip->settings.prox_max_samples_cal < 1 || in tsl2772_prox_cal()
872 chip->settings.prox_max_samples_cal > MAX_SAMPLES_CAL) in tsl2772_prox_cal()
875 for (i = 0; i < chip->settings.prox_max_samples_cal; i++) { in tsl2772_prox_cal()
886 for (i = 0; i < chip->settings.prox_max_samples_cal; i++) { in tsl2772_prox_cal()
890 mean = sample_sum / chip->settings.prox_max_samples_cal; in tsl2772_prox_cal()
892 chip->settings.prox_thres_high = (max << 1) - mean; in tsl2772_prox_cal()
931 return scnprintf(buf, PAGE_SIZE, "%d\n", chip->settings.als_cal_target); in in_illuminance0_target_input_show()
946 chip->settings.als_cal_target = value; in in_illuminance0_target_input_store()
1075 return chip->settings.als_interrupt_en; in tsl2772_read_interrupt_config()
1077 return chip->settings.prox_interrupt_en; in tsl2772_read_interrupt_config()
1089 chip->settings.als_interrupt_en = val ? true : false; in tsl2772_write_interrupt_config()
1091 chip->settings.prox_interrupt_en = val ? true : false; in tsl2772_write_interrupt_config()
1112 chip->settings.als_thresh_high = val; in tsl2772_write_event_value()
1116 chip->settings.als_thresh_low = val; in tsl2772_write_event_value()
1125 chip->settings.prox_thres_high = val; in tsl2772_write_event_value()
1129 chip->settings.prox_thres_low = val; in tsl2772_write_event_value()
1139 time = chip->settings.als_time; in tsl2772_write_event_value()
1141 time = chip->settings.prox_time; in tsl2772_write_event_value()
1152 chip->settings.als_persistence = persistence; in tsl2772_write_event_value()
1154 chip->settings.prox_persistence = persistence; in tsl2772_write_event_value()
1185 *val = chip->settings.als_thresh_high; in tsl2772_read_event_value()
1188 *val = chip->settings.als_thresh_low; in tsl2772_read_event_value()
1196 *val = chip->settings.prox_thres_high; in tsl2772_read_event_value()
1199 *val = chip->settings.prox_thres_low; in tsl2772_read_event_value()
1208 time = chip->settings.als_time; in tsl2772_read_event_value()
1209 persistence = chip->settings.als_persistence; in tsl2772_read_event_value()
1215 time = chip->settings.prox_time; in tsl2772_read_event_value()
1216 persistence = chip->settings.prox_persistence; in tsl2772_read_event_value()
1267 *val = tsl2772_als_gain[chip->settings.als_gain]; in tsl2772_read_raw()
1269 *val = tsl2772_prox_gain[chip->settings.prox_gain]; in tsl2772_read_raw()
1272 *val = chip->settings.als_gain_trim; in tsl2772_read_raw()
1276 *val2 = (256 - chip->settings.als_time) * in tsl2772_read_raw()
1297 chip->settings.als_gain = 0; in tsl2772_write_raw()
1300 chip->settings.als_gain = 1; in tsl2772_write_raw()
1303 chip->settings.als_gain = 2; in tsl2772_write_raw()
1306 chip->settings.als_gain = 3; in tsl2772_write_raw()
1314 chip->settings.prox_gain = 0; in tsl2772_write_raw()
1317 chip->settings.prox_gain = 1; in tsl2772_write_raw()
1320 chip->settings.prox_gain = 2; in tsl2772_write_raw()
1323 chip->settings.prox_gain = 3; in tsl2772_write_raw()
1335 chip->settings.als_gain_trim = val; in tsl2772_write_raw()
1342 chip->settings.als_time = 256 - in tsl2772_write_raw()