*/
#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;
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);
EXPECT_EQ(ret, 0) << "Fail to open thermal device (" << ret << ")";
}
-TEST_F(THERMALHalTest, GetStateP)
+TEST_F(THERMALHalTest, GetInfoP)
{
struct thermal_info thermal;
int ret;
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 << ")";
}