summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlokilee73 <changjoo.lee@samsung.com>2018-12-28 17:50:35 +0900
committerHyotaek Shim <hyotaek.shim@samsung.com>2019-02-18 10:23:24 +0000
commitb955a220deccff8beb73c32bc4c320a4cd8d2c72 (patch)
tree9cb361601b15b263d8f270d66c1ba4ef03e23f60
parent97595f5a00f9ca8f313467d330feceeebbcb5b18 (diff)
downloadlibdevice-node-submit/tizen/20190218.105211.tar.gz
libdevice-node-submit/tizen/20190218.105211.tar.bz2
libdevice-node-submit/tizen/20190218.105211.zip
Change-Id: I29a0c82d3973e9a6a01d16cba2def98362c30bc5 Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
-rw-r--r--hw/thermal.h9
-rw-r--r--unittest/device_haltests.cpp4
2 files changed, 10 insertions, 3 deletions
diff --git a/hw/thermal.h b/hw/thermal.h
index 08dd056..8eef95f 100644
--- a/hw/thermal.h
+++ b/hw/thermal.h
@@ -32,6 +32,13 @@
*/
#define THERMAL_HARDWARE_DEVICE_VERSION MAKE_VERSION(0,1)
+typedef enum
+{
+ DEVICE_THERMAL_AP, /* AP temperature */
+ DEVICE_THERMAL_CP, /* CP temperature */
+ DEVICE_THERMAL_BATTERY, /* Battery temperature */
+} device_thermal_e;
+
struct thermal_info {
int temp;
int adc;
@@ -43,7 +50,7 @@ struct thermal_device {
struct hw_common common;
/* Get thermal state */
- int (*get_info)(struct thermal_info *info);
+ int (*get_info)(device_thermal_e type, struct thermal_info *info);
/* Register thermal event */
int (*register_changed_event)(ThermalUpdated updated_cb, void *data);
diff --git a/unittest/device_haltests.cpp b/unittest/device_haltests.cpp
index 9a7dea1..1dba1b4 100644
--- a/unittest/device_haltests.cpp
+++ b/unittest/device_haltests.cpp
@@ -758,7 +758,7 @@ TEST_F(THERMALHalTest, InitP)
EXPECT_EQ(ret, 0) << "Fail to open thermal device (" << ret << ")";
}
-TEST_F(THERMALHalTest, GetStateP)
+TEST_F(THERMALHalTest, GetInfoP)
{
struct thermal_info thermal;
int ret;
@@ -767,7 +767,7 @@ TEST_F(THERMALHalTest, GetStateP)
cout << "There is no function for get_info" << endl;
return;
}
- ret = thermal_dev->get_info(&thermal);
+ ret = thermal_dev->get_info(DEVICE_THERMAL_AP, &thermal);
EXPECT_EQ(ret, 0) << "Fail to get_info (" << ret << ")";
}