Lines Matching refs:rf

181 	struct apds9306_regfields rf;  member
391 struct apds9306_regfields *rf = &data->rf; in apds9306_regfield_init() local
396 rf->sw_reset = tmp; in apds9306_regfield_init()
401 rf->en = tmp; in apds9306_regfield_init()
406 rf->intg_time = tmp; in apds9306_regfield_init()
411 rf->repeat_rate = tmp; in apds9306_regfield_init()
416 rf->gain = tmp; in apds9306_regfield_init()
421 rf->int_src = tmp; in apds9306_regfield_init()
426 rf->int_thresh_var_en = tmp; in apds9306_regfield_init()
431 rf->int_en = tmp; in apds9306_regfield_init()
436 rf->int_persist_val = tmp; in apds9306_regfield_init()
441 rf->int_thresh_var_val = tmp; in apds9306_regfield_init()
448 struct apds9306_regfields *rf = &data->rf; in apds9306_power_state() local
453 ret = regmap_field_write(rf->en, 1); in apds9306_power_state()
461 return regmap_field_write(rf->en, 0); in apds9306_power_state()
468 struct apds9306_regfields *rf = &data->rf; in apds9306_read_data() local
478 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_read_data()
482 ret = regmap_field_read(rf->repeat_rate, &repeat_rate_idx); in apds9306_read_data()
486 ret = regmap_field_read(rf->int_src, &int_src); in apds9306_read_data()
547 struct apds9306_regfields *rf = &data->rf; in apds9306_intg_time_get() local
550 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_intg_time_get()
566 struct apds9306_regfields *rf = &data->rf; in apds9306_intg_time_set() local
576 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_intg_time_set()
580 ret = regmap_field_read(rf->gain, &gain_idx); in apds9306_intg_time_set()
616 ret = regmap_field_write(rf->intg_time, ret); in apds9306_intg_time_set()
624 return regmap_field_write(rf->gain, ret); in apds9306_intg_time_set()
630 struct apds9306_regfields *rf = &data->rf; in apds9306_sampling_freq_get() local
633 ret = regmap_field_read(rf->repeat_rate, &repeat_rate_idx); in apds9306_sampling_freq_get()
649 struct apds9306_regfields *rf = &data->rf; in apds9306_sampling_freq_set() local
655 return regmap_field_write(rf->repeat_rate, i); in apds9306_sampling_freq_set()
663 struct apds9306_regfields *rf = &data->rf; in apds9306_scale_get() local
666 ret = regmap_field_read(rf->gain, &gain_idx); in apds9306_scale_get()
670 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_scale_get()
687 struct apds9306_regfields *rf = &data->rf; in apds9306_scale_set() local
690 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_scale_set()
711 ret = regmap_field_write(rf->intg_time, time_sel); in apds9306_scale_set()
716 return regmap_field_write(rf->gain, gain_sel); in apds9306_scale_set()
721 struct apds9306_regfields *rf = &data->rf; in apds9306_event_period_get() local
724 ret = regmap_field_read(rf->int_persist_val, &period); in apds9306_event_period_get()
738 struct apds9306_regfields *rf = &data->rf; in apds9306_event_period_set() local
743 return regmap_field_write(rf->int_persist_val, val); in apds9306_event_period_set()
795 struct apds9306_regfields *rf = &data->rf; in apds9306_event_thresh_adaptive_get() local
798 ret = regmap_field_read(rf->int_thresh_var_val, &thr_adpt); in apds9306_event_thresh_adaptive_get()
812 struct apds9306_regfields *rf = &data->rf; in apds9306_event_thresh_adaptive_set() local
817 return regmap_field_write(rf->int_thresh_var_val, val); in apds9306_event_thresh_adaptive_set()
934 struct apds9306_regfields *rf = &data->rf; in apds9306_irq_handler() local
949 ret = regmap_field_read(rf->int_src, &int_src); in apds9306_irq_handler()
1038 struct apds9306_regfields *rf = &data->rf; in apds9306_read_event_config() local
1045 ret = regmap_field_read(rf->int_src, &int_src); in apds9306_read_event_config()
1049 ret = regmap_field_read(rf->int_en, &int_en); in apds9306_read_event_config()
1062 ret = regmap_field_read(rf->int_thresh_var_en, &int_en); in apds9306_read_event_config()
1079 struct apds9306_regfields *rf = &data->rf; in apds9306_write_event_config() local
1086 ret = regmap_field_read(rf->int_en, &enabled); in apds9306_write_event_config()
1098 ret = regmap_field_write(rf->int_src, 1); in apds9306_write_event_config()
1100 ret = regmap_field_write(rf->int_src, 0); in apds9306_write_event_config()
1110 ret = regmap_field_write(rf->int_en, 1); in apds9306_write_event_config()
1119 ret = regmap_field_write(rf->int_en, 0); in apds9306_write_event_config()
1129 return regmap_field_write(rf->int_thresh_var_en, state); in apds9306_write_event_config()
1180 struct apds9306_regfields *rf = &data->rf; in apds9306_powerdown() local
1183 ret = regmap_field_write(rf->int_thresh_var_en, 0); in apds9306_powerdown()
1187 ret = regmap_field_write(rf->int_en, 0); in apds9306_powerdown()
1196 struct apds9306_regfields *rf = &data->rf; in apds9306_device_init() local
1203 ret = regmap_field_write(rf->intg_time, APDS9306_MEAS_MODE_100MS); in apds9306_device_init()
1207 ret = regmap_field_write(rf->repeat_rate, APDS9306_SAMP_FREQ_10HZ); in apds9306_device_init()
1211 ret = regmap_field_write(rf->gain, APDS9306_GSEL_3X); in apds9306_device_init()
1215 ret = regmap_field_write(rf->int_src, APDS9306_INT_SRC_ALS); in apds9306_device_init()
1219 ret = regmap_field_write(rf->int_en, 0); in apds9306_device_init()
1223 return regmap_field_write(rf->int_thresh_var_en, 0); in apds9306_device_init()