summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorVic Yang <victoryang@google.com>2012-03-15 14:55:28 +0800
committerVic Yang <victoryang@google.com>2012-03-16 10:40:52 +0800
commit9f8e8dc6a3461cf0e8e3758db876c7b98c35a92a (patch)
tree02e5ca561dab349f9e74db3a4ecae807a1420888 /util
parent7d1884ee06793b776a8b8af3508e6cb6b7027b3f (diff)
downloadchrome-ec-9f8e8dc6a3461cf0e8e3758db876c7b98c35a92a.tar.gz
Temperature sensor grouping.
Group temperature sensors into different types so we only have to set temperature threshold for each type instead of each sensor. Signed-off-by: Vic Yang <victoryang@google.com> BUG=chrome-os-partner:8466 TEST=Fan control still works. Change-Id: I7acc714c32f282cec490b9e02d402ab91a53becf
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/util/ectool.c b/util/ectool.c
index e3d24b1abd..ed63c1668b 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -657,13 +657,13 @@ int cmd_thermal_get_threshold(int argc, char *argv[])
int rv;
if (argc != 2) {
- fprintf(stderr, "Usage: thermalget <sensorid> <thresholdid>\n");
+ fprintf(stderr, "Usage: thermalget <sensortypeid> <thresholdid>\n");
return -1;
}
- p.sensor_id = strtol(argv[0], &e, 0);
+ p.sensor_type = strtol(argv[0], &e, 0);
if (e && *e) {
- fprintf(stderr, "Bad sensor ID.\n");
+ fprintf(stderr, "Bad sensor type ID.\n");
return -1;
}
@@ -681,8 +681,8 @@ int cmd_thermal_get_threshold(int argc, char *argv[])
if (r.value < 0)
return -1;
- printf("Threshold %d for sensor %d is %d K.\n",
- p.threshold_id, p.sensor_id, r.value);
+ printf("Threshold %d for sensor type %d is %d K.\n",
+ p.threshold_id, p.sensor_type, r.value);
return 0;
}
@@ -696,13 +696,13 @@ int cmd_thermal_set_threshold(int argc, char *argv[])
if (argc != 3) {
fprintf(stderr,
- "Usage: thermalset <sensorid> <thresholdid> <value>\n");
+ "Usage: thermalset <sensortypeid> <thresholdid> <value>\n");
return -1;
}
- p.sensor_id = strtol(argv[0], &e, 0);
+ p.sensor_type = strtol(argv[0], &e, 0);
if (e && *e) {
- fprintf(stderr, "Bad sensor ID.\n");
+ fprintf(stderr, "Bad sensor type ID.\n");
return -1;
}
@@ -723,8 +723,8 @@ int cmd_thermal_set_threshold(int argc, char *argv[])
if (rv)
return rv;
- printf("Threshold %d for sensor %d set to %d.\n",
- p.threshold_id, p.sensor_id, p.value);
+ printf("Threshold %d for sensor type %d set to %d.\n",
+ p.threshold_id, p.sensor_type, p.value);
return 0;
}