Lines Matching refs:attrb
38 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in _hid_sensor_set_report_latency() local
47 ret = hid_sensor_set_report_latency(attrb, latency); in _hid_sensor_set_report_latency()
51 attrb->latency_ms = hid_sensor_get_report_latency(attrb); in _hid_sensor_set_report_latency()
61 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in _hid_sensor_get_report_latency() local
64 latency = hid_sensor_get_report_latency(attrb); in _hid_sensor_get_report_latency()
76 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in _hid_sensor_get_fifo_state() local
79 latency = hid_sensor_get_report_latency(attrb); in _hid_sensor_get_fifo_state()
208 struct hid_sensor_common *attrb = container_of(work, in hid_sensor_set_power_work() local
212 if (attrb->poll_interval >= 0) in hid_sensor_set_power_work()
213 sensor_hub_set_feature(attrb->hsdev, attrb->poll.report_id, in hid_sensor_set_power_work()
214 attrb->poll.index, in hid_sensor_set_power_work()
215 sizeof(attrb->poll_interval), in hid_sensor_set_power_work()
216 &attrb->poll_interval); in hid_sensor_set_power_work()
218 if (attrb->raw_hystersis >= 0) in hid_sensor_set_power_work()
219 sensor_hub_set_feature(attrb->hsdev, in hid_sensor_set_power_work()
220 attrb->sensitivity.report_id, in hid_sensor_set_power_work()
221 attrb->sensitivity.index, in hid_sensor_set_power_work()
222 sizeof(attrb->raw_hystersis), in hid_sensor_set_power_work()
223 &attrb->raw_hystersis); in hid_sensor_set_power_work()
225 if (attrb->latency_ms > 0) in hid_sensor_set_power_work()
226 hid_sensor_set_report_latency(attrb, attrb->latency_ms); in hid_sensor_set_power_work()
228 if (atomic_read(&attrb->user_requested_state)) in hid_sensor_set_power_work()
229 _hid_sensor_power_state(attrb, true); in hid_sensor_set_power_work()
238 void hid_sensor_remove_trigger(struct hid_sensor_common *attrb) in hid_sensor_remove_trigger() argument
240 if (atomic_read(&attrb->runtime_pm_enable)) in hid_sensor_remove_trigger()
241 pm_runtime_disable(&attrb->pdev->dev); in hid_sensor_remove_trigger()
243 pm_runtime_set_suspended(&attrb->pdev->dev); in hid_sensor_remove_trigger()
244 pm_runtime_put_noidle(&attrb->pdev->dev); in hid_sensor_remove_trigger()
246 cancel_work_sync(&attrb->work); in hid_sensor_remove_trigger()
247 iio_trigger_unregister(attrb->trigger); in hid_sensor_remove_trigger()
248 iio_trigger_free(attrb->trigger); in hid_sensor_remove_trigger()
257 struct hid_sensor_common *attrb) in hid_sensor_setup_trigger() argument
270 iio_trigger_set_drvdata(trig, attrb); in hid_sensor_setup_trigger()
278 attrb->trigger = trig; in hid_sensor_setup_trigger()
281 hid_sensor_setup_batch_mode(indio_dev, attrb); in hid_sensor_setup_trigger()
287 iio_device_set_drvdata(indio_dev, attrb); in hid_sensor_setup_trigger()
289 INIT_WORK(&attrb->work, hid_sensor_set_power_work); in hid_sensor_setup_trigger()
291 pm_suspend_ignore_children(&attrb->pdev->dev, true); in hid_sensor_setup_trigger()
293 pm_runtime_set_autosuspend_delay(&attrb->pdev->dev, in hid_sensor_setup_trigger()
308 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in hid_sensor_suspend() local
310 return _hid_sensor_power_state(attrb, false); in hid_sensor_suspend()
316 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in hid_sensor_resume() local
317 schedule_work(&attrb->work); in hid_sensor_resume()
324 struct hid_sensor_common *attrb = iio_device_get_drvdata(indio_dev); in hid_sensor_runtime_resume() local
325 return _hid_sensor_power_state(attrb, true); in hid_sensor_runtime_resume()