linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Badhri Jagan Sridharan <badhri@google.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Kyle Tso <kyletso@google.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	USB <linux-usb@vger.kernel.org>,
	LKML <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 12:22:18 -0700	[thread overview]
Message-ID: <CAPTae5KO2cAgCWVOPB+D+bMtDRaH=LhoASKYdAM2_J31Q6ehGA@mail.gmail.com> (raw)
In-Reply-To: <8dd797be-8912-62e4-a8da-00b8edbfb65b@roeck-us.net>

On Tue, Aug 3, 2021 at 6:48 AM Guenter Roeck <linux@roeck-us.net> wrote:
>
> 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>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
>
> > ---
> >   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);
> >   }
> >
>

      reply	other threads:[~2021-08-03 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03  9:13 [PATCH] usb: typec: tcpm: Keep other events when receiving FRS and Sourcing_vbus events Kyle Tso
2021-08-03 13:48 ` Guenter Roeck
2021-08-03 19:22   ` Badhri Jagan Sridharan [this message]

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='CAPTae5KO2cAgCWVOPB+D+bMtDRaH=LhoASKYdAM2_J31Q6ehGA@mail.gmail.com' \
    --to=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 \
    --cc=linux@roeck-us.net \
    /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;
as well as URLs for NNTP newsgroup(s).