From: Fabien Parent Date: Fri, 10 Aug 2018 13:13:47 +0000 (+0200) Subject: mfd: cros: add charger port count command definition X-Git-Tag: v4.20-rc1~132^2~10^2~1 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=36f47383c7f9fa0fdc20a92635435ff77ff71a6f;p=linux.git mfd: cros: add charger port count command definition A new more command has been added to the ChromeOS embedded controller that allows to get the number of charger port count. Unlike EC_CMD_USB_PD_PORTS, this new command also includes the dedicated port if present. This command will be used to expose the dedicated charger port in the ChromeOS charger driver. Signed-off-by: Fabien Parent Acked-for-MFD-by: Lee Jones Reviewed-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel --- diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index 6e1ab9bead28..20ee71f10865 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h @@ -3102,6 +3102,16 @@ struct ec_params_usb_pd_info_request { uint8_t port; } __packed; +/* + * This command will return the number of USB PD charge port + the number + * of dedicated port present. + * EC_CMD_USB_PD_PORTS does NOT include the dedicated ports + */ +#define EC_CMD_CHARGE_PORT_COUNT 0x0105 +struct ec_response_charge_port_count { + uint8_t port_count; +} __packed; + /* Read USB-PD Device discovery info */ #define EC_CMD_USB_PD_DISCOVERY 0x0113 struct ec_params_usb_pd_discovery_entry {