Lines Matching full:rf

170  * @rf: Regmap register fields structure
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()
548 struct apds9306_regfields *rf = &data->rf; in apds9306_intg_time_get() local
551 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_intg_time_get()
567 struct apds9306_regfields *rf = &data->rf; in apds9306_intg_time_set() local
577 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_intg_time_set()
581 ret = regmap_field_read(rf->gain, &gain_idx); in apds9306_intg_time_set()
617 ret = regmap_field_write(rf->intg_time, ret); in apds9306_intg_time_set()
625 return regmap_field_write(rf->gain, ret); in apds9306_intg_time_set()
631 struct apds9306_regfields *rf = &data->rf; in apds9306_sampling_freq_get() local
634 ret = regmap_field_read(rf->repeat_rate, &repeat_rate_idx); in apds9306_sampling_freq_get()
650 struct apds9306_regfields *rf = &data->rf; in apds9306_sampling_freq_set() local
656 return regmap_field_write(rf->repeat_rate, i); in apds9306_sampling_freq_set()
664 struct apds9306_regfields *rf = &data->rf; in apds9306_scale_get() local
667 ret = regmap_field_read(rf->gain, &gain_idx); in apds9306_scale_get()
671 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_scale_get()
688 struct apds9306_regfields *rf = &data->rf; in apds9306_scale_set() local
691 ret = regmap_field_read(rf->intg_time, &intg_time_idx); in apds9306_scale_set()
712 ret = regmap_field_write(rf->intg_time, time_sel); in apds9306_scale_set()
717 return regmap_field_write(rf->gain, gain_sel); in apds9306_scale_set()
722 struct apds9306_regfields *rf = &data->rf; in apds9306_event_period_get() local
725 ret = regmap_field_read(rf->int_persist_val, &period); in apds9306_event_period_get()
739 struct apds9306_regfields *rf = &data->rf; in apds9306_event_period_set() local
744 return regmap_field_write(rf->int_persist_val, val); in apds9306_event_period_set()
792 struct apds9306_regfields *rf = &data->rf; in apds9306_event_thresh_adaptive_get() local
795 ret = regmap_field_read(rf->int_thresh_var_val, &thr_adpt); in apds9306_event_thresh_adaptive_get()
809 struct apds9306_regfields *rf = &data->rf; in apds9306_event_thresh_adaptive_set() local
814 return regmap_field_write(rf->int_thresh_var_val, val); in apds9306_event_thresh_adaptive_set()
931 struct apds9306_regfields *rf = &data->rf; in apds9306_irq_handler() local
946 ret = regmap_field_read(rf->int_src, &int_src); in apds9306_irq_handler()
1035 struct apds9306_regfields *rf = &data->rf; in apds9306_read_event_config() local
1042 ret = regmap_field_read(rf->int_src, &int_src); in apds9306_read_event_config()
1046 ret = regmap_field_read(rf->int_en, &int_en); in apds9306_read_event_config()
1059 ret = regmap_field_read(rf->int_thresh_var_en, &int_en); in apds9306_read_event_config()
1076 struct apds9306_regfields *rf = &data->rf; in apds9306_write_event_config() local
1083 ret = regmap_field_read(rf->int_en, &enabled); in apds9306_write_event_config()
1095 ret = regmap_field_write(rf->int_src, 1); in apds9306_write_event_config()
1097 ret = regmap_field_write(rf->int_src, 0); in apds9306_write_event_config()
1107 ret = regmap_field_write(rf->int_en, 1); in apds9306_write_event_config()
1116 ret = regmap_field_write(rf->int_en, 0); in apds9306_write_event_config()
1127 return regmap_field_write(rf->int_thresh_var_en, state); in apds9306_write_event_config()
1178 struct apds9306_regfields *rf = &data->rf; in apds9306_powerdown() local
1181 ret = regmap_field_write(rf->int_thresh_var_en, 0); in apds9306_powerdown()
1185 ret = regmap_field_write(rf->int_en, 0); in apds9306_powerdown()
1194 struct apds9306_regfields *rf = &data->rf; in apds9306_device_init() local
1201 ret = regmap_field_write(rf->intg_time, APDS9306_MEAS_MODE_100MS); in apds9306_device_init()
1205 ret = regmap_field_write(rf->repeat_rate, APDS9306_SAMP_FREQ_10HZ); in apds9306_device_init()
1209 ret = regmap_field_write(rf->gain, APDS9306_GSEL_3X); in apds9306_device_init()
1213 ret = regmap_field_write(rf->int_src, APDS9306_INT_SRC_ALS); in apds9306_device_init()
1217 ret = regmap_field_write(rf->int_en, 0); in apds9306_device_init()
1221 return regmap_field_write(rf->int_thresh_var_en, 0); in apds9306_device_init()