summaryrefslogtreecommitdiff
path: root/src/ec/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/ec/google')
-rw-r--r--src/ec/google/chromeec/ec.c11
-rw-r--r--src/ec/google/chromeec/ec.h12
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c
index 2ef2ea90d5..38f7e87b81 100644
--- a/src/ec/google/chromeec/ec.c
+++ b/src/ec/google/chromeec/ec.c
@@ -1170,6 +1170,17 @@ int google_chromeec_get_num_pd_ports(unsigned int *num_ports)
return 0;
}
+int google_chromeec_get_pd_chip_infoi(int port, int renew,
+ struct ec_response_pd_chip_info *r)
+{
+ const struct ec_params_pd_chip_info p = {
+ .port = port,
+ .live = renew,
+ };
+
+ return ec_cmd_pd_chip_info(PLAT_EC, &p, r);
+}
+
int google_chromeec_get_pd_port_caps(int port,
struct usb_pd_port_caps *port_caps)
{
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index 20b508c66a..5a65f2dee7 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -337,6 +337,18 @@ int google_chromeec_get_cmd_versions(int command, uint32_t *pmask);
*/
int google_chromeec_get_num_pd_ports(unsigned int *num_ports);
+/**
+ * Return a port's PD chip information.
+ *
+ * @param port The desired port number
+ * @param renew Refresh cached value
+ * @param r Result buffer for chip info
+ *
+ * @return 0 if ok, -1 on error
+ */
+int google_chromeec_get_pd_chip_infoi(int port, int renew,
+ struct ec_response_pd_chip_info *r);
+
/* Structure representing the capabilities of a USB-PD port */
struct usb_pd_port_caps {
enum ec_pd_power_role_caps power_role_cap;