Skip to content

Commit 43ad944

Browse files
kyletsoadlgregkh
authored andcommitted
usb: typec: tcpm: Keep other events when receiving FRS and Sourcing_vbus events
When receiving FRS and Sourcing_Vbus events from low-level drivers, keep other events which come a bit earlier so that they will not be ignored in the event handler. Fixes: 8dc4bd0 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)") Cc: stable <[email protected]> Cc: Badhri Jagan Sridharan <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Reviewed-by: Badhri Jagan Sridharan <[email protected]> Signed-off-by: Kyle Tso <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cb10f68 commit 43ad944

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5369,7 +5369,7 @@ EXPORT_SYMBOL_GPL(tcpm_pd_hard_reset);
53695369
void tcpm_sink_frs(struct tcpm_port *port)
53705370
{
53715371
spin_lock(&port->pd_event_lock);
5372-
port->pd_events = TCPM_FRS_EVENT;
5372+
port->pd_events |= TCPM_FRS_EVENT;
53735373
spin_unlock(&port->pd_event_lock);
53745374
kthread_queue_work(port->wq, &port->event_work);
53755375
}
@@ -5378,7 +5378,7 @@ EXPORT_SYMBOL_GPL(tcpm_sink_frs);
53785378
void tcpm_sourcing_vbus(struct tcpm_port *port)
53795379
{
53805380
spin_lock(&port->pd_event_lock);
5381-
port->pd_events = TCPM_SOURCING_VBUS;
5381+
port->pd_events |= TCPM_SOURCING_VBUS;
53825382
spin_unlock(&port->pd_event_lock);
53835383
kthread_queue_work(port->wq, &port->event_work);
53845384
}

0 commit comments

Comments
 (0)