summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/ectool.c5
-rw-r--r--util/ectool.h20
2 files changed, 16 insertions, 9 deletions
diff --git a/util/ectool.c b/util/ectool.c
index c7cac69a7c..5c6689d398 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -8432,11 +8432,6 @@ int cmd_port80_read(int argc, char *argv[])
return 0;
}
-struct command {
- const char *name;
- int (*handler)(int argc, char *argv[]);
-};
-
int cmd_force_lid_open(int argc, char *argv[])
{
struct ec_params_force_lid_open p;
diff --git a/util/ectool.h b/util/ectool.h
index 65687f292f..c47edbf27c 100644
--- a/util/ectool.h
+++ b/util/ectool.h
@@ -3,6 +3,22 @@
* found in the LICENSE file.
*/
+/** @brief A handler for an `ectool` command. */
+struct command {
+ /** The name of the command. */
+ const char *name;
+
+ /**
+ * The function to handle the command.
+ *
+ * @param argc The length of `argv`
+ * @param argv The arguments passed, including the command itself but
+ * not 'ectool'.
+ * @return 0 if successful, or a negative `enum ec_status` value.
+ */
+ int (*handler)(int argc, char *argv[]);
+};
+
/**
* Test low-level key scanning
*
@@ -22,9 +38,5 @@
* <keys_pressed> is a (possibly empty) list of ASCII keys
*
* The key matrix is read from the fdt.
- *
- * @param argc Number of arguments (excluding 'ectool')
- * @param argv List of arguments
- * @return 0 if ok, -1 on error
*/
int cmd_keyscan(int argc, char *argv[]);