Lines Matching refs:accel_state

139 	struct accel_3d_state *accel_state = iio_priv(indio_dev);  in accel_3d_read_raw()  local
145 accel_state->common_attributes.hsdev; in accel_3d_read_raw()
151 hid_sensor_power_state(&accel_state->common_attributes, true); in accel_3d_read_raw()
152 report_id = accel_state->accel[chan->scan_index].report_id; in accel_3d_read_raw()
153 min = accel_state->accel[chan->scan_index].logical_minimum; in accel_3d_read_raw()
157 accel_state->common_attributes.hsdev, in accel_3d_read_raw()
163 hid_sensor_power_state(&accel_state->common_attributes, in accel_3d_read_raw()
167 hid_sensor_power_state(&accel_state->common_attributes, false); in accel_3d_read_raw()
171 *val = accel_state->scale_pre_decml; in accel_3d_read_raw()
172 *val2 = accel_state->scale_post_decml; in accel_3d_read_raw()
173 ret_type = accel_state->scale_precision; in accel_3d_read_raw()
176 *val = accel_state->value_offset; in accel_3d_read_raw()
181 &accel_state->common_attributes, val, val2); in accel_3d_read_raw()
185 &accel_state->common_attributes, val, val2); in accel_3d_read_raw()
202 struct accel_3d_state *accel_state = iio_priv(indio_dev); in accel_3d_write_raw() local
208 &accel_state->common_attributes, val, val2); in accel_3d_write_raw()
212 &accel_state->common_attributes, val, val2); in accel_3d_write_raw()
240 struct accel_3d_state *accel_state = iio_priv(indio_dev); in accel_3d_proc_event() local
243 if (atomic_read(&accel_state->common_attributes.data_ready)) { in accel_3d_proc_event()
244 if (!accel_state->timestamp) in accel_3d_proc_event()
245 accel_state->timestamp = iio_get_time_ns(indio_dev); in accel_3d_proc_event()
248 &accel_state->scan, in accel_3d_proc_event()
249 sizeof(accel_state->scan), in accel_3d_proc_event()
250 accel_state->timestamp); in accel_3d_proc_event()
252 accel_state->timestamp = 0; in accel_3d_proc_event()
265 struct accel_3d_state *accel_state = iio_priv(indio_dev); in accel_3d_capture_sample() local
274 accel_state->scan.accel_val[CHANNEL_SCAN_INDEX_X + offset] = in accel_3d_capture_sample()
279 accel_state->timestamp = in accel_3d_capture_sample()
281 &accel_state->common_attributes, in accel_3d_capture_sample()
334 struct accel_3d_state *accel_state; in hid_accel_3d_probe() local
347 accel_state = iio_priv(indio_dev); in hid_accel_3d_probe()
348 accel_state->common_attributes.hsdev = hsdev; in hid_accel_3d_probe()
349 accel_state->common_attributes.pdev = pdev; in hid_accel_3d_probe()
364 &accel_state->common_attributes, in hid_accel_3d_probe()
380 hsdev->usage, accel_state); in hid_accel_3d_probe()
390 atomic_set(&accel_state->common_attributes.data_ready, 0); in hid_accel_3d_probe()
393 &accel_state->common_attributes); in hid_accel_3d_probe()
405 accel_state->callbacks.send_event = accel_3d_proc_event; in hid_accel_3d_probe()
406 accel_state->callbacks.capture_sample = accel_3d_capture_sample; in hid_accel_3d_probe()
407 accel_state->callbacks.pdev = pdev; in hid_accel_3d_probe()
409 &accel_state->callbacks); in hid_accel_3d_probe()
420 hid_sensor_remove_trigger(indio_dev, &accel_state->common_attributes); in hid_accel_3d_probe()
429 struct accel_3d_state *accel_state = iio_priv(indio_dev); in hid_accel_3d_remove() local
433 hid_sensor_remove_trigger(indio_dev, &accel_state->common_attributes); in hid_accel_3d_remove()