Add device_thermal_e 33/196433/3 accepted/tizen/unified/20190219.154203 accepted/tizen/unified/20190221.165818 submit/tizen/20190218.105211 submit/tizen/20190220.073046
authorlokilee73 <changjoo.lee@samsung.com>
Fri, 28 Dec 2018 08:50:35 +0000 (17:50 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 18 Feb 2019 10:23:24 +0000 (10:23 +0000)
Change-Id: I29a0c82d3973e9a6a01d16cba2def98362c30bc5
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
hw/thermal.h
unittest/device_haltests.cpp

index 08dd056..8eef95f 100644 (file)
  */
 #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);
index 9a7dea1..1dba1b4 100644 (file)
@@ -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 << ")";
 }