DO NOT MERGE ANYWHERE Add new interface for sensor physical data
This is spesical solution only for emerald branch.
Changes including new const char* value/interface for sensor physical data. Sensor service and manager does not take care of content, structure or other
details of string. Sensor HAL is taking care of parsing data from string and setting values to Sensor HW.
Change-Id: Iae69e04b71313fbcba46515d6787f3deef4e7346
Signed-off-by: Ben Fennema <fennema@google.com>
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index 51bffe1..611fff6 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -35,7 +35,8 @@
#define SENSORS_DEVICE_API_VERSION_1_1 HARDWARE_DEVICE_API_VERSION_2(1, 1, SENSORS_HEADER_VERSION)
#define SENSORS_DEVICE_API_VERSION_1_2 HARDWARE_DEVICE_API_VERSION_2(1, 2, SENSORS_HEADER_VERSION)
#define SENSORS_DEVICE_API_VERSION_1_3 HARDWARE_DEVICE_API_VERSION_2(1, 3, SENSORS_HEADER_VERSION)
-#define SENSORS_DEVICE_API_VERSION_1_4 HARDWARE_DEVICE_API_VERSION_2(1, 4, SENSORS_HEADER_VERSION)
+#define SENSORS_DEVICE_API_VERSION_1_3_5 HARDWARE_DEVICE_API_VERSION_2(1, 4, SENSORS_HEADER_VERSION)
+#define SENSORS_DEVICE_API_VERSION_1_4 HARDWARE_DEVICE_API_VERSION_2(1, 5, SENSORS_HEADER_VERSION)
/**
* Please see the Sensors section of source.android.com for an
@@ -858,6 +859,13 @@
* -EPERM if operation is not allowed
*/
int (*set_operation_mode)(unsigned int mode);
+
+ /**
+ * Set string to sensor HAL, which includes physical settings.
+ * Content of string is hardware/vendor specific.
+ * Availability: SENSORS_DEVICE_API_VERSION_1_3_5
+ **/
+ int (*set_sensor_physical_data)(const char* physicaldata);
};
struct sensor_t {