summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorFabien Parent <fparent@baylibre.com>2018-05-05 13:59:00 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-05-11 02:58:45 -0700
commit7034d8b711398d5627fab5fe787fc33e24d76c48 (patch)
tree121e30fd90112443756ad8f8a5e366dbd0d9f98e /include/ec_commands.h
parentbf62593ebd4dead8553ca5615290fe372198e846 (diff)
downloadchrome-ec-7034d8b711398d5627fab5fe787fc33e24d76c48.tar.gz
charge_manager: add host cmd to get port count
The kernel is only able to know the number of USB PD port through EC_CMD_USB_PD_PORTS, but the kernel needs also to be able to know that there is a dedicated port. Add a host command that will return the total number of charge port (USB PD + BJ). BRANCH=None BUG=chromium:841944 TEST=Called command from kernel driver and checked that the port count was the expected value. Change-Id: I6ccd8a2dee35bbe8bb66dfbe09d1cc09c54b73a0 Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-on: https://chromium-review.googlesource.com/1046593 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 26ddefe2bb..fcebb42bb2 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -4410,6 +4410,17 @@ struct __ec_align4 ec_response_usb_pd_power_info {
uint32_t max_power;
};
+
+/*
+ * 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_align1 ec_response_charge_port_count {
+ uint8_t port_count;
+};
+
/* Write USB-PD device FW */
#define EC_CMD_USB_PD_FW_UPDATE 0x0110