summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-10-10 16:39:42 -0700
committerGerrit <chrome-bot@google.com>2012-10-11 13:47:17 -0700
commitd1bebbbe66f78d2dcfb9380456a80e7c2f26a662 (patch)
treed7e7e996bbebc8e70bd58a57c2b24e64683851ce /include/ec_commands.h
parentbea56570f3105830a9df92cc7c9ea1185bf0dbef (diff)
downloadchrome-ec-d1bebbbe66f78d2dcfb9380456a80e7c2f26a662.tar.gz
Add host command to get/set TMP006 calibration data
Needed for host-based thermal control and tweaking. BUG=chrome-os-partner:14955 BRANCH=link TEST=manual From a root shell, ectool tmp006cal 0 3.5e-14 -2.8e-5 -5.5e-7 4.5e-9 ectool tmp006cal 2 3.6e-14 -2.9e-5 -5.6e-7 4.6e-9 ectool tmp006cal 0 S0: 3.500000e-14 b0: -2.800000e-05 b1: -5.500000e-07 b2: 4.500000e-09 ectool tmp006cal 2 S0: 3.600000e-14 b0: -2.900000e-05 b1: -5.600000e-07 b2: 4.600000e-09 At the ec console, "t6cal" should show the settings took effect as well. Change-Id: If43b11e1e827483f0a20db1a2e5644f3475fd95e Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/35215
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 2dc53f1feb..e8f406cae7 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -837,6 +837,32 @@ struct ec_response_thermal_get_threshold {
/* Toggle automatic fan control */
#define EC_CMD_THERMAL_AUTO_FAN_CTRL 0x52
+/* Get TMP006 calibration data */
+#define EC_CMD_TMP006_GET_CALIBRATION 0x53
+
+struct ec_params_tmp006_get_calibration {
+ uint8_t index;
+} __packed;
+
+struct ec_response_tmp006_get_calibration {
+ float s0;
+ float b0;
+ float b1;
+ float b2;
+} __packed;
+
+/* Set TMP006 calibration data */
+#define EC_CMD_TMP006_SET_CALIBRATION 0x54
+
+struct ec_params_tmp006_set_calibration {
+ uint8_t index;
+ uint8_t reserved[3]; /* Reserved; set 0 */
+ float s0;
+ float b0;
+ float b1;
+ float b2;
+} __packed;
+
/*****************************************************************************/
/* MKBP - Matrix KeyBoard Protocol */