summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-11-01 11:39:00 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-11-04 19:48:49 +0000
commitc1e02ca2203a7889539a88570e142f16cfd265a8 (patch)
treed5179376c575bfed91c7227e1da7d50cddbfd1b5 /util
parent2aae9d678a500cab94ad7f0747940de9e01d8a6e (diff)
downloadchrome-ec-c1e02ca2203a7889539a88570e142f16cfd265a8.tar.gz
cleanup: Yes, even more TODO comments
Almost done. Comment changes only. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms Change-Id: I974dfc12aa264e2035b3bae35a089c19344e7d45 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/175484 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/comm-dev.c10
-rw-r--r--util/comm-i2c.c3
-rw-r--r--util/comm-lpc.c9
-rw-r--r--util/ectool.c29
-rw-r--r--util/ectool_keyscan.c2
5 files changed, 33 insertions, 20 deletions
diff --git a/util/comm-dev.c b/util/comm-dev.c
index 1175f92555..eb3a4f9b47 100644
--- a/util/comm-dev.c
+++ b/util/comm-dev.c
@@ -108,11 +108,11 @@ int comm_init_dev(void)
ec_readmem = ec_readmem_dev;
/*
- * TODO: need a way to get this from the driver and EC. For now,
- * pick a magic lowest common denominator value. The ec_max_outsize
- * is set to handle v3 EC protocol. The ec_max_insize needs to be
- * set to the largest value that can be returned from the EC,
- * EC_PROTO2_MAX_PARAM_SIZE.
+ * TODO(crosbug.com/p/23823): Need a way to get this from the driver
+ * and EC. For now, pick a magic lowest common denominator value. The
+ * ec_max_outsize is set to handle v3 EC protocol. The ec_max_insize
+ * needs to be set to the largest value that can be returned from the
+ * EC, EC_PROTO2_MAX_PARAM_SIZE.
*/
ec_max_outsize = EC_PROTO2_MAX_PARAM_SIZE - 8;
ec_max_insize = EC_PROTO2_MAX_PARAM_SIZE;
diff --git a/util/comm-i2c.c b/util/comm-i2c.c
index 91ceb555e2..b305823198 100644
--- a/util/comm-i2c.c
+++ b/util/comm-i2c.c
@@ -126,7 +126,8 @@ static int ec_command_i2c(int command, int version,
/* check response error code */
ret = resp_buf[0];
- /* TODO: handle EC_RES_IN_PROGRESS case. */
+
+ /* TODO(crosbug.com/p/23824): handle EC_RES_IN_PROGRESS case. */
resp_len = resp_buf[1];
if (resp_len > insize) {
diff --git a/util/comm-lpc.c b/util/comm-lpc.c
index 8ea4e9ddd8..25f0bea4c6 100644
--- a/util/comm-lpc.c
+++ b/util/comm-lpc.c
@@ -26,11 +26,10 @@ static int wait_for_ec(int status_addr, int timeout_usec)
for (i = 0; i < timeout_usec; i += delay) {
/*
* Delay first, in case we just sent out a command but the EC
- * hasn't raise the busy flag. However, I think this doesn't
+ * hasn't raised the busy flag. However, I think this doesn't
* happen since the LPC commands are executed in order and the
- * busy flag is set by hardware.
- *
- * TODO: move this delay after inb(status).
+ * busy flag is set by hardware. Minor issue in any case,
+ * since the initial delay is very short.
*/
usleep(MIN(delay, timeout_usec - i));
@@ -142,7 +141,7 @@ static int ec_command_lpc_3(int command, int version,
return -EC_RES_REQUEST_TRUNCATED;
/* Fill in request packet */
- /* TODO: this should be common to all protocols */
+ /* TODO(crosbug.com/p/23825): This should be common to all protocols */
rq.struct_version = EC_HOST_REQUEST_VERSION;
rq.checksum = 0;
rq.command = command;
diff --git a/util/ectool.c b/util/ectool.c
index 382dd556a6..23244e54fb 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -496,7 +496,10 @@ int cmd_reboot_ec(int argc, char *argv[])
else if (!strcmp(argv[1], "RO"))
p.cmd = EC_REBOOT_JUMP_RO;
else if (!strcmp(argv[1], "RW") || !strcmp(argv[1], "A")) {
- /* TODO: remove "A" once all scripts are updated to use "RW" */
+ /*
+ * TODO(crosbug.com/p/11149): remove "A" once all scripts are
+ * updated to use "RW".
+ */
p.cmd = EC_REBOOT_JUMP_RW;
} else if (!strcmp(argv[1], "cold"))
p.cmd = EC_REBOOT_COLD;
@@ -1080,7 +1083,11 @@ int cmd_thermal_set_threshold_v1(int argc, char *argv[])
return rv;
}
-
+/**
+ * Detect the version of EC_CMD_THERMAL_GET_THRESHOLD that the EC supports.
+ *
+ * @return The version, or -1 if error.
+ */
static int thermal_threshold_version(void)
{
struct ec_params_thermal_get_threshold v0_p;
@@ -1092,8 +1099,11 @@ static int thermal_threshold_version(void)
v1_p.sensor_num = 0;
rv = ec_command(EC_CMD_THERMAL_GET_THRESHOLD, 1,
&v1_p, sizeof(v1_p), &v1_r, sizeof(v1_r));
- /* FIXME: Verson 1 will only return these responses */
- /* FIXME: if (??? == EC_RES_SUCCESS || ??? == EC_RES_INVALID_PARAM) */
+
+ /*
+ * TODO(crosbug.com/p/23828): Version 1 of the threshold command will
+ * only return EC_RES_SUCCESS or EC_RES_INVALID_PARAM?
+ */
if (rv > 0)
return 1;
@@ -1101,13 +1111,16 @@ static int thermal_threshold_version(void)
v0_p.threshold_id = 0;
rv = ec_command(EC_CMD_THERMAL_GET_THRESHOLD, 0,
&v0_p, sizeof(v0_p), &v0_r, sizeof(v0_r));
- /* FIXME: Verson 0 will only return these responses */
- /* FIXME: if (??? == EC_RES_SUCCESS || ??? == EC_RES_ERROR) */
+ /*
+ * TODO(crosbug.com/p/23828): Version 0 of the threshold command will
+ * only return EC_RES_SUCCESS or EC_RES_ERROR?
+ */
if (rv > 0)
return 0;
- /* Anything else is most likely EC_RES_INVALID_COMMAND,
- * but we don't care because it's nothing we can use.
+ /*
+ * Anything else is most likely EC_RES_INVALID_COMMAND, but we don't
+ * care because it's nothing we can use.
*/
return -1;
}
diff --git a/util/ectool_keyscan.c b/util/ectool_keyscan.c
index 868fbd11ab..6029e0b09a 100644
--- a/util/ectool_keyscan.c
+++ b/util/ectool_keyscan.c
@@ -663,7 +663,7 @@ int cmd_keyscan(int argc, char *argv[])
return -1;
}
- /* TODO(sjg@chromium.org): Read key matrix from fdt */
+ /* TODO(crosbug.com/p/23826): Read key matrix from fdt */
err = keyscan_read_fdt_matrix(&keyscan, "test/test-matrix.bin");
if (!err)
err = keyscan_process_file(f, &keyscan);