Linux USB
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "André Draszik" <andre.draszik@linaro.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Peter Griffin <peter.griffin@linaro.org>,
	Tudor Ambarus <tudor.ambarus@linaro.org>,
	Will McVicker <willmcvicker@google.com>,
	kernel-team@android.com, RD Babiera <rdbabiera@google.com>,
	Badhri Jagan Sridharan <badhri@google.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: tcpm/tcpci_maxim: fix non-contaminant CC handling
Date: Fri, 26 Jul 2024 08:07:22 +0200	[thread overview]
Message-ID: <2024072659-movable-fossil-8810@gregkh> (raw)
In-Reply-To: <1e650f29c2714b5f390a2bf5edf5920c2975fbac.camel@linaro.org>

On Fri, Jul 26, 2024 at 07:01:13AM +0100, André Draszik wrote:
> Hi,
> 
> On Wed, 2024-07-10 at 07:28 +0100, André Draszik wrote:
> > tcpci_maxim currently never triggers the TCPM state machine when CC
> > status has not changed due to a contaminant but due to a real
> > connection event, i.e. a genuine plug event, meaning the system will
> > stay idle and not notify any subscribers.
> > 
> > The reason is that the initial state of the port is 'toggling', which
> > causes _max_tcpci_irq() to only drive the contamination part of the
> > TCPM state machine (via tcpm_port_clean()).
> > 
> > What should happen instead is that if no contamination was detected,
> > the TCPM should be notified of the CC change in this case.
> > 
> > To fix this, we update ...is_contaminant() to also allow its caller to
> > determine if more CC processing is required and then call into the TCPM
> > as required.
> > 
> > While at it, add a kernel-doc for max_contaminant_is_contaminant().
> > 
> > Note: the code has an issue where I2C errors during contaminant
> > detection also cause the TCPM state machine to not be updated. This
> > commit doesn't change this behaviour and should be addressed by
> > follow-up commit(s).
> > 
> > Signed-off-by: André Draszik <andre.draszik@linaro.org>
> > ---
> >  drivers/usb/typec/tcpm/maxim_contaminant.c |  7 +++++--
> >  drivers/usb/typec/tcpm/tcpci_maxim.h       | 15 ++++++++++++++-
> >  drivers/usb/typec/tcpm/tcpci_maxim_core.c  | 12 ++++++++----
> >  3 files changed, 27 insertions(+), 7 deletions(-)
> 
> Any comments on this patch?

It's the middle of the merge window, nothing we can do until -rc1 is
out...

thanks,

greg k-h

  reply	other threads:[~2024-07-26  6:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10  6:28 [PATCH] usb: typec: tcpm/tcpci_maxim: fix non-contaminant CC handling André Draszik
2024-07-26  6:01 ` André Draszik
2024-07-26  6:07   ` Greg Kroah-Hartman [this message]
2024-08-01  8:35 ` Heikki Krogerus
2024-08-04 16:13   ` 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=2024072659-movable-fossil-8810@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=andre.draszik@linaro.org \
    --cc=badhri@google.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=rdbabiera@google.com \
    --cc=tudor.ambarus@linaro.org \
    --cc=willmcvicker@google.com \
    /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