mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
iio: hid-sensors: Add API to power on/off
Added an API to allow client drivers to turn ON and OFF sensors for quick read. Added data_read as counting varaible instead of boolean, so that sensor is powered off only when last user released it. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
a269b9a0a2
commit
56ff6be608
11 changed files with 39 additions and 38 deletions
|
@ -189,7 +189,7 @@ struct hid_sensor_common {
|
|||
struct hid_sensor_hub_device *hsdev;
|
||||
struct platform_device *pdev;
|
||||
unsigned usage_id;
|
||||
bool data_ready;
|
||||
atomic_t data_ready;
|
||||
struct iio_trigger *trigger;
|
||||
struct hid_sensor_hub_attribute_info poll;
|
||||
struct hid_sensor_hub_attribute_info report_state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue