Loading thermal/1.0/IThermal.hal +15 −0 Original line number Diff line number Diff line Loading @@ -75,4 +75,19 @@ interface IThermal { getCoolingDevices() generates (ThermalStatus status, vec<CoolingDevice> devices); /* Retrieves an undefined temperature value. * * @return status Status of the operation. If status code is FAILURE, * the status.debugMessage must be populated with the human-readable * error message. * @return undefinedTemperature returns an undefined temperature value if * status code is SUCCESS. Undefined temperature value is an * unreachable constant device temperature value for HAL. * */ @callflow(next={"*"}) @entry @exit getUndefinedTemperature() generates (ThermalStatus status, float undefinedTemperature); }; thermal/1.0/default/Thermal.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,13 @@ Return<void> Thermal::getCoolingDevices(getCoolingDevices_cb _hidl_cb) { return Void(); } Return<void> Thermal::getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) { ThermalStatus status; status.code = ThermalStatusCode::SUCCESS; _hidl_cb(status, UNKNOWN_TEMPERATURE); return Void(); } IThermal* HIDL_FETCH_IThermal(const char* /* name */) { thermal_module_t* module; status_t err = hw_get_module(THERMAL_HARDWARE_MODULE_ID, Loading thermal/1.0/default/Thermal.h +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ struct Thermal : public IThermal { Return<void> getTemperatures(getTemperatures_cb _hidl_cb) override; Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb) override; Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb) override; Return<void> getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) override; private: thermal_module_t* mModule; }; Loading thermal/1.0/types.hal +4 −8 Original line number Diff line number Diff line Loading @@ -46,27 +46,27 @@ struct Temperature { /** * Current temperature in Celsius. If not available set by HAL to * UNKNOWN_TEMPERATURE. * undefined temperature value. * Current temperature can be in any units if type=UNKNOWN. */ float currentValue; /** * Throttling temperature constant for this temperature. * If not available, set by HAL to UNKNOWN_TEMPERATURE. * If not available, set by HAL to undefined temperature value. */ float throttlingThreshold; /** * Shutdown temperature constant for this temperature. * If not available, set by HAL to UNKNOWN_TEMPERATURE. * If not available, set by HAL to undefined temperature value. */ float shutdownThreshold; /** * Threshold temperature above which the VR mode clockrate minimums cannot * be maintained for this device. * If not available, set by HAL to UNKNOWN_TEMPERATURE. * If not available, set by HAL to undefined temperature value. */ float vrThrottlingThreshold; Loading Loading @@ -135,7 +135,3 @@ struct ThermalStatus { */ string debugMessage; }; /** * TODO(pbond): add float constant UNDEFINED_TEMPERATURE. */ thermal/1.0/vts/Thermal.vts +21 −0 Original line number Diff line number Diff line Loading @@ -79,4 +79,25 @@ interface: { } } api: { name: "getUndefinedTemperature" return_type_hidl: { type: TYPE_STRUCT predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus" } return_type_hidl: { type: TYPE_SCALAR scalar_type: "float_t" } callflow: { next: "*" } callflow: { entry: true } callflow: { exit: true } } } Loading
thermal/1.0/IThermal.hal +15 −0 Original line number Diff line number Diff line Loading @@ -75,4 +75,19 @@ interface IThermal { getCoolingDevices() generates (ThermalStatus status, vec<CoolingDevice> devices); /* Retrieves an undefined temperature value. * * @return status Status of the operation. If status code is FAILURE, * the status.debugMessage must be populated with the human-readable * error message. * @return undefinedTemperature returns an undefined temperature value if * status code is SUCCESS. Undefined temperature value is an * unreachable constant device temperature value for HAL. * */ @callflow(next={"*"}) @entry @exit getUndefinedTemperature() generates (ThermalStatus status, float undefinedTemperature); };
thermal/1.0/default/Thermal.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,13 @@ Return<void> Thermal::getCoolingDevices(getCoolingDevices_cb _hidl_cb) { return Void(); } Return<void> Thermal::getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) { ThermalStatus status; status.code = ThermalStatusCode::SUCCESS; _hidl_cb(status, UNKNOWN_TEMPERATURE); return Void(); } IThermal* HIDL_FETCH_IThermal(const char* /* name */) { thermal_module_t* module; status_t err = hw_get_module(THERMAL_HARDWARE_MODULE_ID, Loading
thermal/1.0/default/Thermal.h +1 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ struct Thermal : public IThermal { Return<void> getTemperatures(getTemperatures_cb _hidl_cb) override; Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb) override; Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb) override; Return<void> getUndefinedTemperature(getUndefinedTemperature_cb _hidl_cb) override; private: thermal_module_t* mModule; }; Loading
thermal/1.0/types.hal +4 −8 Original line number Diff line number Diff line Loading @@ -46,27 +46,27 @@ struct Temperature { /** * Current temperature in Celsius. If not available set by HAL to * UNKNOWN_TEMPERATURE. * undefined temperature value. * Current temperature can be in any units if type=UNKNOWN. */ float currentValue; /** * Throttling temperature constant for this temperature. * If not available, set by HAL to UNKNOWN_TEMPERATURE. * If not available, set by HAL to undefined temperature value. */ float throttlingThreshold; /** * Shutdown temperature constant for this temperature. * If not available, set by HAL to UNKNOWN_TEMPERATURE. * If not available, set by HAL to undefined temperature value. */ float shutdownThreshold; /** * Threshold temperature above which the VR mode clockrate minimums cannot * be maintained for this device. * If not available, set by HAL to UNKNOWN_TEMPERATURE. * If not available, set by HAL to undefined temperature value. */ float vrThrottlingThreshold; Loading Loading @@ -135,7 +135,3 @@ struct ThermalStatus { */ string debugMessage; }; /** * TODO(pbond): add float constant UNDEFINED_TEMPERATURE. */
thermal/1.0/vts/Thermal.vts +21 −0 Original line number Diff line number Diff line Loading @@ -79,4 +79,25 @@ interface: { } } api: { name: "getUndefinedTemperature" return_type_hidl: { type: TYPE_STRUCT predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus" } return_type_hidl: { type: TYPE_SCALAR scalar_type: "float_t" } callflow: { next: "*" } callflow: { entry: true } callflow: { exit: true } } }