Lines Matching refs:attrb
24 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in _hid_sensor_set_report_latency() local
33 ret = hid_sensor_set_report_latency(attrb, latency); in _hid_sensor_set_report_latency()
37 attrb->latency_ms = hid_sensor_get_report_latency(attrb); in _hid_sensor_set_report_latency()
47 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in _hid_sensor_get_report_latency() local
50 latency = hid_sensor_get_report_latency(attrb); in _hid_sensor_get_report_latency()
62 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in _hid_sensor_get_fifo_state() local
65 latency = hid_sensor_get_report_latency(attrb); in _hid_sensor_get_fifo_state()
182 struct hid_sensor_common *attrb = container_of(work, in hid_sensor_set_power_work() local
186 if (attrb->poll_interval >= 0) in hid_sensor_set_power_work()
187 sensor_hub_set_feature(attrb->hsdev, attrb->poll.report_id, in hid_sensor_set_power_work()
188 attrb->poll.index, in hid_sensor_set_power_work()
189 sizeof(attrb->poll_interval), in hid_sensor_set_power_work()
190 &attrb->poll_interval); in hid_sensor_set_power_work()
192 if (attrb->raw_hystersis >= 0) in hid_sensor_set_power_work()
193 sensor_hub_set_feature(attrb->hsdev, in hid_sensor_set_power_work()
194 attrb->sensitivity.report_id, in hid_sensor_set_power_work()
195 attrb->sensitivity.index, in hid_sensor_set_power_work()
196 sizeof(attrb->raw_hystersis), in hid_sensor_set_power_work()
197 &attrb->raw_hystersis); in hid_sensor_set_power_work()
199 if (attrb->latency_ms > 0) in hid_sensor_set_power_work()
200 hid_sensor_set_report_latency(attrb, attrb->latency_ms); in hid_sensor_set_power_work()
202 if (atomic_read(&attrb->user_requested_state)) in hid_sensor_set_power_work()
203 _hid_sensor_power_state(attrb, true); in hid_sensor_set_power_work()
213 struct hid_sensor_common *attrb) in hid_sensor_remove_trigger() argument
215 if (atomic_read(&attrb->runtime_pm_enable)) in hid_sensor_remove_trigger()
216 pm_runtime_disable(&attrb->pdev->dev); in hid_sensor_remove_trigger()
218 pm_runtime_set_suspended(&attrb->pdev->dev); in hid_sensor_remove_trigger()
220 cancel_work_sync(&attrb->work); in hid_sensor_remove_trigger()
221 iio_trigger_unregister(attrb->trigger); in hid_sensor_remove_trigger()
222 iio_trigger_free(attrb->trigger); in hid_sensor_remove_trigger()
232 struct hid_sensor_common *attrb) in hid_sensor_setup_trigger() argument
238 if (hid_sensor_batch_mode_supported(attrb)) in hid_sensor_setup_trigger()
260 iio_trigger_set_drvdata(trig, attrb); in hid_sensor_setup_trigger()
268 attrb->trigger = trig; in hid_sensor_setup_trigger()
275 iio_device_set_drvdata(indio_dev, attrb); in hid_sensor_setup_trigger()
277 INIT_WORK(&attrb->work, hid_sensor_set_power_work); in hid_sensor_setup_trigger()
279 pm_suspend_ignore_children(&attrb->pdev->dev, true); in hid_sensor_setup_trigger()
281 pm_runtime_set_autosuspend_delay(&attrb->pdev->dev, in hid_sensor_setup_trigger()
297 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in hid_sensor_suspend() local
299 return _hid_sensor_power_state(attrb, false); in hid_sensor_suspend()
305 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in hid_sensor_resume() local
306 schedule_work(&attrb->work); in hid_sensor_resume()
313 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in hid_sensor_runtime_resume() local
314 return _hid_sensor_power_state(attrb, true); in hid_sensor_runtime_resume()