From: Guenter Roeck <linux@roeck-us.net>
To: Kyle Tso <kyletso@google.com>,
heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org
Cc: badhri@google.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: tcpm: Keep other events when receiving FRS and Sourcing_vbus events
Date: Tue, 3 Aug 2021 06:48:51 -0700 [thread overview]
Message-ID: <8dd797be-8912-62e4-a8da-00b8edbfb65b@roeck-us.net> (raw)
In-Reply-To: <20210803091314.3051302-1-kyletso@google.com>
On 8/3/21 2:13 AM, Kyle Tso wrote:
> 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: 8dc4bd073663 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)")
> Cc: Badhri Jagan Sridharan <badhri@google.com>
> Signed-off-by: Kyle Tso <kyletso@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/usb/typec/tcpm/tcpm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 5b22a1c931a9..b9bb63d749ec 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -5369,7 +5369,7 @@ EXPORT_SYMBOL_GPL(tcpm_pd_hard_reset);
> void tcpm_sink_frs(struct tcpm_port *port)
> {
> spin_lock(&port->pd_event_lock);
> - port->pd_events = TCPM_FRS_EVENT;
> + port->pd_events |= TCPM_FRS_EVENT;
> spin_unlock(&port->pd_event_lock);
> kthread_queue_work(port->wq, &port->event_work);
> }
> @@ -5378,7 +5378,7 @@ EXPORT_SYMBOL_GPL(tcpm_sink_frs);
> void tcpm_sourcing_vbus(struct tcpm_port *port)
> {
> spin_lock(&port->pd_event_lock);
> - port->pd_events = TCPM_SOURCING_VBUS;
> + port->pd_events |= TCPM_SOURCING_VBUS;
> spin_unlock(&port->pd_event_lock);
> kthread_queue_work(port->wq, &port->event_work);
> }
>
next prev parent reply other threads:[~2021-08-03 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 9:13 Kyle Tso
2021-08-03 13:48 ` Guenter Roeck [this message]
2021-08-03 19:22 ` Badhri Jagan Sridharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8dd797be-8912-62e4-a8da-00b8edbfb65b@roeck-us.net \
--to=linux@roeck-us.net \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kyletso@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®