diff options
author | Badhri Jagan Sridharan <badhri@google.com> | 2020-10-28 23:31:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-18 12:56:58 +0100 |
commit | a30a00e37ceb094f949e4d96c2c586e6503b5d1d (patch) | |
tree | 5b7dbc492ab0c2342033616a11f8f3d2d075ade0 /drivers/usb/typec | |
parent | 8115240c4fbd1c2705d1369f66168ec77fa2a7e4 (diff) | |
download | linux-a30a00e37ceb094f949e4d96c2c586e6503b5d1d.tar.bz2 |
usb: typec: tcpm: frs sourcing vbus callback
During FRS hardware autonomously starts to source vbus. Provide
callback to perform chip specific operations.
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20201029063138.1429760-5-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r-- | drivers/usb/typec/tcpm/tcpm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index a091a63758f4..c196bd4b8a37 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -4091,7 +4091,16 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port) case SRC_TRY_DEBOUNCE: /* Do nothing, waiting for sink detection */ break; + case FR_SWAP_SEND: + case FR_SWAP_SEND_TIMEOUT: + case FR_SWAP_SNK_SRC_TRANSITION_TO_OFF: + case FR_SWAP_SNK_SRC_SOURCE_VBUS_APPLIED: + if (port->tcpc->frs_sourcing_vbus) + port->tcpc->frs_sourcing_vbus(port->tcpc); + break; case FR_SWAP_SNK_SRC_NEW_SINK_READY: + if (port->tcpc->frs_sourcing_vbus) + port->tcpc->frs_sourcing_vbus(port->tcpc); tcpm_set_state(port, FR_SWAP_SNK_SRC_SOURCE_VBUS_APPLIED, 0); break; |