static int init_alert_mask(int port) { uint16_t mask; int rv; /* * Create mask of alert events that will cause the TCPC to * signal the TCPM via the Alert# gpio line. */ mask = TCPC_REG_ALERT_TX_SUCCESS | TCPC_REG_ALERT_TX_FAILED | TCPC_REG_ALERT_TX_DISCARDED | TCPC_REG_ALERT_RX_STATUS | TCPC_REG_ALERT_RX_HARD_RST | TCPC_REG_ALERT_CC_STATUS; /* Set the alert mask in TCPC */ rv = tcpc_alert_mask_set(port, mask); return rv; }
int tcpm_alert_mask_set(int port, uint16_t mask) { return tcpc_alert_mask_set(port, mask); }