Skip to content

Commit

Permalink
staging: typec: tcpci: enable vbus detection
Browse files Browse the repository at this point in the history
TCPCI implementation may need SW to enable VBUS detection to generate
power status events.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Li Jun authored and Greg Kroah-Hartman committed Jun 28, 2018
1 parent b28d9be commit 2104632
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/staging/typec/tcpci.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ static int tcpci_init(struct tcpc_dev *tcpc)
if (ret < 0)
return ret;

/* Enable Vbus detection */
ret = regmap_write(tcpci->regmap, TCPC_COMMAND,
TCPC_CMD_ENABLE_VBUS_DETECT);
if (ret < 0)
return ret;

reg = TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_FAILED |
TCPC_ALERT_TX_DISCARDED | TCPC_ALERT_RX_STATUS |
TCPC_ALERT_RX_HARD_RST | TCPC_ALERT_CC_STATUS;
Expand Down

0 comments on commit 2104632

Please sign in to comment.