@@ -243,6 +243,9 @@ static int tcpci_get_cc(struct tcpc_dev *tcpc,
unsigned int reg, role_control;
int ret;
+ if (tcpci->data->get_cc)
+ return tcpci->data->get_cc(tcpci, tcpci->data, cc1, cc2);
+
ret = regmap_read(tcpci->regmap, TCPC_ROLE_CTRL, &role_control);
if (ret < 0)
return ret;
@@ -190,6 +190,8 @@ struct tcpci_data {
unsigned char vbus_vsafe0v:1;
int (*init)(struct tcpci *tcpci, struct tcpci_data *data);
+ int (*get_cc)(struct tcpci *tcpci, struct tcpci_data *data,
+ enum typec_cc_status *cc1, enum typec_cc_status *cc2);
int (*set_vconn)(struct tcpci *tcpci, struct tcpci_data *data,
bool enable);
int (*start_drp_toggling)(struct tcpci *tcpci, struct tcpci_data *data,