Lines Matching refs:prox_state
18 struct prox_state { struct
63 struct prox_state *prox_state = iio_priv(indio_dev); in prox_read_raw() local
76 report_id = prox_state->prox_attr.report_id; in prox_read_raw()
77 min = prox_state->prox_attr.logical_minimum; in prox_read_raw()
79 hsdev = prox_state->common_attributes.hsdev; in prox_read_raw()
86 hid_sensor_power_state(&prox_state->common_attributes, in prox_read_raw()
91 hid_sensor_power_state(&prox_state->common_attributes, in prox_read_raw()
100 *val = prox_state->scale_pre_decml; in prox_read_raw()
101 *val2 = prox_state->scale_post_decml; in prox_read_raw()
102 ret_type = prox_state->scale_precision; in prox_read_raw()
106 prox_state->prox_attr.unit_expo); in prox_read_raw()
111 &prox_state->common_attributes, val, val2); in prox_read_raw()
115 &prox_state->common_attributes, val, val2); in prox_read_raw()
132 struct prox_state *prox_state = iio_priv(indio_dev); in prox_write_raw() local
138 &prox_state->common_attributes, val, val2); in prox_write_raw()
142 &prox_state->common_attributes, val, val2); in prox_write_raw()
170 struct prox_state *prox_state = iio_priv(indio_dev); in prox_proc_event() local
173 if (atomic_read(&prox_state->common_attributes.data_ready)) in prox_proc_event()
175 &prox_state->human_presence, in prox_proc_event()
176 sizeof(prox_state->human_presence)); in prox_proc_event()
188 struct prox_state *prox_state = iio_priv(indio_dev); in prox_capture_sample() local
195 prox_state->human_presence = *(u8 *)raw_data; in prox_capture_sample()
198 prox_state->human_presence = *(u32 *)raw_data; in prox_capture_sample()
214 struct prox_state *st) in prox_parse_report()
239 struct prox_state *prox_state; in hid_prox_probe() local
243 sizeof(struct prox_state)); in hid_prox_probe()
248 prox_state = iio_priv(indio_dev); in hid_prox_probe()
249 prox_state->common_attributes.hsdev = hsdev; in hid_prox_probe()
250 prox_state->common_attributes.pdev = pdev; in hid_prox_probe()
253 &prox_state->common_attributes, in hid_prox_probe()
270 hsdev->usage, prox_state); in hid_prox_probe()
281 atomic_set(&prox_state->common_attributes.data_ready, 0); in hid_prox_probe()
284 &prox_state->common_attributes); in hid_prox_probe()
296 prox_state->callbacks.send_event = prox_proc_event; in hid_prox_probe()
297 prox_state->callbacks.capture_sample = prox_capture_sample; in hid_prox_probe()
298 prox_state->callbacks.pdev = pdev; in hid_prox_probe()
300 &prox_state->callbacks); in hid_prox_probe()
311 hid_sensor_remove_trigger(indio_dev, &prox_state->common_attributes); in hid_prox_probe()
320 struct prox_state *prox_state = iio_priv(indio_dev); in hid_prox_remove() local
324 hid_sensor_remove_trigger(indio_dev, &prox_state->common_attributes); in hid_prox_remove()