platform/chrome: wilco_ec: Add batt_ppid_info command to telemetry driver
authorNick Crews <ncrews@chromium.org>
Mon, 5 Aug 2019 20:22:14 +0000 (14:22 -0600)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Thu, 22 Aug 2019 19:26:18 +0000 (21:26 +0200)
commit3b81d8bdd9143449a85166e7987aedea145fce54
tree1b5fa3a158f68d5235f217eddbf9a5dd0b02009d
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
platform/chrome: wilco_ec: Add batt_ppid_info command to telemetry driver

Add the GET_BATT_PPID_INFO=0x8A command to the allowlist of accepted
telemetry commands. In addition, since this new command requires
verifying the contents of some of the arguments, I also restructure
the request to use a union of the argument structs. Also, zero out the
request buffer before each request, and change "whitelist" to
"allowlist".

Signed-off-by: Nick Crews <ncrews@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/platform/chrome/wilco_ec/telemetry.c