From bd1f20911fcdcd74fa504a53aabc891ff9eeb112 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Wed, 8 Apr 2015 10:51:21 -0700 Subject: [PATCH] charge_manager: modify usbpdpower HC return args Modify usbpdpower HC return args by adding a new current limit field, and adding a new charger type (UNKNOWN). Note this doesn't change the size of the return struct. BUG=chrome-os-partner:38548 BRANCH=samus TEST=make -j buildall Change-Id: I51bb062a7e4fcd9ae6aea15204adb83b19882ac9 Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/264641 Reviewed-by: Sameer Nanda --- include/ec_commands.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/ec_commands.h b/include/ec_commands.h index 49c73e0d5d..8210dd858a 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2914,6 +2914,7 @@ enum usb_chg_type { USB_CHG_TYPE_BC12_SDP, USB_CHG_TYPE_OTHER, USB_CHG_TYPE_VBUS, + USB_CHG_TYPE_UNKNOWN, }; enum usb_power_roles { USB_PD_PORT_POWER_DISCONNECTED, @@ -2926,10 +2927,7 @@ struct usb_chg_measures { uint16_t voltage_max; uint16_t voltage_now; uint16_t current_max; - /* - * this structure is used below in struct ec_response_usb_pd_power_info, - * and currently expects an odd number of uint16_t for alignment. - */ + uint16_t current_lim; } __packed; struct ec_response_usb_pd_power_info { @@ -2938,7 +2936,6 @@ struct ec_response_usb_pd_power_info { uint8_t dualrole; uint8_t reserved1; struct usb_chg_measures meas; - uint16_t reserved2; uint32_t max_power; } __packed;