diff options
author | Mike Lockwood <lockwood@android.com> | 2009-08-29 11:55:27 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-08-29 11:55:27 -0400 |
commit | fbbb347f17942ac3436938501912ab066857b251 (patch) | |
tree | 59de8466a7c8633f1203853ea5ee846add9272b3 | |
parent | 61fee89f2d50cc01c34930cda8f65f70aa23acc4 (diff) | |
download | libhardware-fbbb347f17942ac3436938501912ab066857b251.tar.gz |
sensors: Add optional close_data_source call
Change-Id: I591afea509ee055211a4beeaa83b12692e251f67
Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r-- | include/hardware/sensors.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h index 3be07b31..f59f9384 100644 --- a/include/hardware/sensors.h +++ b/include/hardware/sensors.h @@ -293,7 +293,16 @@ struct sensors_control_device_t { * @return a native_handle_t if successful, NULL on error */ native_handle_t* (*open_data_source)(struct sensors_control_device_t *dev); - + + /** + * Releases any resources that were created by open_data_source. + * This call is optional and can be NULL if not implemented + * by the sensor HAL. + * + * @return 0 if successful, < 0 on error + */ + int (*close_data_source)(struct sensors_control_device_t *dev); + /** Activate/deactivate one sensor. * * @param handle is the handle of the sensor to change. |