summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/ec_commands.h4
-rw-r--r--util/ectool.cc3
2 files changed, 6 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 8c3f3c442e..87985175a5 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -252,7 +252,9 @@ extern "C" {
/* Report 0 for fan stalled so userspace applications can take
* an appropriate action based on this value to control the fan.
*/
-#define EC_FAN_SPEED_STALLED 0x0 /* Fan stalled */
+#define EC_FAN_SPEED_STALLED 0x0
+/* This should be used only for ectool to support old ECs. */
+#define EC_FAN_SPEED_STALLED_DEPRECATED 0xfffe
/* Battery bit flags at EC_MEMMAP_BATT_FLAG. */
#define EC_BATT_FLAG_AC_PRESENT 0x01
diff --git a/util/ectool.cc b/util/ectool.cc
index f0da13dd51..86c4210fba 100644
--- a/util/ectool.cc
+++ b/util/ectool.cc
@@ -3649,6 +3649,9 @@ static int print_fan(int idx)
switch (rv) {
case EC_FAN_SPEED_NOT_PRESENT:
return -1;
+ case EC_FAN_SPEED_STALLED_DEPRECATED:
+ printf("Fan %d stalled (RPM: %d)\n", idx, rv);
+ break;
default:
printf("Fan %d RPM: %d\n", idx, rv);
break;