diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-08-29 12:46:37 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-08-30 16:47:14 +0000 |
commit | 32045efb23efdb8c68689ff871a24b9c19c75546 (patch) | |
tree | 80f8c2f9250fc14cf5b01e48b3489add3b52b9fa /util/lbplay.c | |
parent | cfd007c833a676ca2e5b82503f5871ec2531f322 (diff) | |
download | chrome-ec-32045efb23efdb8c68689ff871a24b9c19c75546.tar.gz |
Add LIGHTBAR_CMD_VERSION command to detect lightbar features.stabilize-4636.B
Most systems don't have a lightbar. Those that do need a way to detect that
one exists. That's easily done by just sending a EC_CMD_LIGHTBAR_CMD command
to the EC and checking the result. If the response is
EC_RES_INVALID_COMMAND, there isn't a lightbar.
But what .cmd value should we use in struct ec_params_lightbar? Future
lightbar implementations (if any), could remove existing functions or add
new ones, so there isn't a safe choice.
This change adds a LIGHTBAR_CMD_VERSION operation to determine if any new
implementation exists. Future systems should return some useful information
in response to this command. Existing systems will return
EC_RES_INVALID_PARAM, which is enough to distinguish them.
BUG=chromium:239205
BRANCH=none
TEST=manual
make BOARD=link
make BOARD=link runtests
There are no user-visible changes in functionality to anything.
Change-Id: Ibe37f74a4dcbf68dd6bfd1963530aec907e67534
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/167549
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util/lbplay.c')
-rw-r--r-- | util/lbplay.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/lbplay.c b/util/lbplay.c index 9cb853aa75..da093a1807 100644 --- a/util/lbplay.c +++ b/util/lbplay.c @@ -34,7 +34,8 @@ static const struct { LB_SIZES(get_seq), LB_SIZES(demo), LB_SIZES(get_params), - LB_SIZES(set_params) + LB_SIZES(set_params), + LB_SIZES(version) }; #undef LB_SIZES |