Linux USB
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Badhri Jagan Sridharan <badhri@google.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kyle Tso <kyletso@google.com>
Subject: Re: [PATCH v5 1/3] usb: typec: tcpm: Add callbacks to mitigate wakeups due to contaminant
Date: Thu, 8 Dec 2022 08:03:47 +0100	[thread overview]
Message-ID: <Y5GMUzmkfU6qWZgS@kroah.com> (raw)
In-Reply-To: <20221208020043.374033-1-badhri@google.com>

On Wed, Dec 07, 2022 at 06:00:41PM -0800, Badhri Jagan Sridharan wrote:
> On some of the TCPC implementations, when the Type-C port is exposed
> to contaminants, such as water, TCPC stops toggling while reporting OPEN
> either by the time TCPM reads CC pin status or during CC debounce
> window. This causes TCPM to be stuck in TOGGLING state. If TCPM is made
> to restart toggling, the behavior recurs causing redundant CPU wakeups
> till the USB-C port is free of contaminant.
> 
> [206199.287817] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
> [206199.640337] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
> [206199.985789] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected]
> ...
> 
> TCPM invokes is_potential_contaminant callback to allow low level chip
> drivers to monitor TCPM state machine transitions and notify TCPM when
> the Type-C port needs to be checked for potential contaminant presence.
> TCPCs which do have the needed hardware can implement the check_contaminant
> callback which is invoked by TCPM to evaluate for presence of contaminant.
> Lower level TCPC driver can restart toggling through TCPM_PORT_CLEAN event
> when the driver detects that USB-C port is free of contaminant.
> 
> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> Change-Id: I136d788bb46d871d12e64bd73fd50a77b4659dbf
> ---

Always run checkpatch.pl on your patches so you don't get a grumpy
maintainer asking why you didn't run checkpatch.pl on your patches :(

  parent reply	other threads:[~2022-12-08  7:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08  2:00 [PATCH v5 1/3] usb: typec: tcpm: Add callbacks to mitigate wakeups due to contaminant Badhri Jagan Sridharan
2022-12-08  2:00 ` [PATCH v5 2/3] usb: typec: tcpci: Add callback for evaluating contaminant presence Badhri Jagan Sridharan
2022-12-08  2:00 ` [PATCH v5 3/3] usb: typec: maxim_contaminant: Implement check_contaminant callback Badhri Jagan Sridharan
2022-12-08  7:03 ` Greg Kroah-Hartman [this message]
2022-12-08 15:06   ` [PATCH v5 1/3] usb: typec: tcpm: Add callbacks to mitigate wakeups due to contaminant 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=Y5GMUzmkfU6qWZgS@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=badhri@google.com \
    --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