From aab9accfce10e70197729afd07451229ac8a178d Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Tue, 19 Feb 2013 13:33:33 +0800 Subject: spring: Add host command to read power info Getting voltage and current can be handy when verifying hardware design. Let's add host command to do this. BUG=chrome-os-partner:17880 TEST=Manual on Spring BRANCH=none Change-Id: I4d4f6a42a9d0f917292d092e132ccd9ce3367fd6 Signed-off-by: Vic Yang Reviewed-on: https://gerrit.chromium.org/gerrit/43508 Reviewed-by: Vincent Palatin --- include/ec_commands.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/ec_commands.h') diff --git a/include/ec_commands.h b/include/ec_commands.h index 54dcbd314a..cd714cc1db 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -1241,6 +1241,22 @@ struct ec_response_ldo_get { uint8_t state; } __packed; +/*****************************************************************************/ +/* Power info. */ + +/* + * Get power info. + */ +#define EC_CMD_POWER_INFO 0x9d + +struct ec_response_power_info { + uint32_t usb_dev_type; + uint16_t voltage_ac; + uint16_t voltage_system; + uint16_t current_system; + uint16_t usb_current_limit; +} __packed; + /*****************************************************************************/ /* Temporary debug commands. TODO: remove this crosbug.com/p/13849 */ -- cgit v1.2.1