summaryrefslogtreecommitdiff
path: root/include/thermal.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-10-11 13:16:43 -0700
committerGerrit <chrome-bot@google.com>2012-10-11 14:24:43 -0700
commitb00a446ec57323f84002722523783351f19e41b1 (patch)
tree03dce4a51f0ed47655cb147f5a02907c5c127a4b /include/thermal.h
parentceb696a20896511aa233b1f59227a6edaeda3157 (diff)
downloadchrome-ec-b00a446ec57323f84002722523783351f19e41b1.tar.gz
link: EC reclaims fan control on AP shutdown
Previously, if the AP took fan control, the EC would never take it back. This meant the EC would leave the fan off even if the system was sitting at the INSERT screen or booted an alternate OS. BUG=chrome-os-partner:15189 BRANCH=link TEST=manual - boot system - from EC console, fanset 0 - faninfo shows fan at 0rpm - from root shell, crossystem recovery_request=123 && reboot - wait a few mins - faninfo should show fan spinning again Change-Id: I534c9978194085467f1df6eae971c55d4e8083be Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/35309
Diffstat (limited to 'include/thermal.h')
-rw-r--r--include/thermal.h33
1 files changed, 28 insertions, 5 deletions
diff --git a/include/thermal.h b/include/thermal.h
index 6259504c01..8b32bf9773 100644
--- a/include/thermal.h
+++ b/include/thermal.h
@@ -46,13 +46,36 @@ struct thermal_config_t {
int16_t thresholds[THRESHOLD_COUNT + THERMAL_FAN_STEPS];
};
-/* Set the threshold temperature value. Return -1 on error. */
-int thermal_set_threshold(enum temp_sensor_type type, int threshold_id, int value);
+/**
+ * Set a threshold temperature.
+ *
+ * @param type Sensor type to set threshold for
+ * @param threshold_id Threshold ID to set
+ * @param value New threshold temperature in K, or
+ * THERMAL_THRESHOLD_DISABLE to disable this threshold.
+ *
+ * @return EC_SUCCESS if success, non-zero if error.
+ */
+int thermal_set_threshold(enum temp_sensor_type type, int threshold_id,
+ int value);
-/* Get the threshold temperature value. Return -1 on error. */
+/**
+ * Read a threshold temperature.
+ *
+ * @param type Sensor type to get threshold for
+ * @param threshold_id Threshold ID
+ *
+ * @return The threshold temperature in K, THERMAL_THRESHOLD_DISABLE if
+ * disabled, -1 if error.
+ */
int thermal_get_threshold(enum temp_sensor_type type, int threshold_id);
-/* Toggle automatic fan speed control. Return -1 on error. */
-int thermal_toggle_auto_fan_ctrl(int auto_fan_on);
+/**
+ * Enable/disable automatic fan speed control
+ *
+ * @param enable Enable (!=0) or disable (0) auto fan control
+ *
+ * @return EC_SUCCESS if successful, non-zero if error. */
+int thermal_control_fan(int enable);
#endif /* __CROS_EC_THERMAL_H */