From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Badhri Jagan Sridharan <badhri@google.com>
Cc: gregkh@linuxfoundation.org, linux@roeck-us.net,
kyletso@google.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v1] usb: typec: tcpm: Fix response to vsafe0V event
Date: Mon, 31 Jul 2023 14:08:24 +0300 [thread overview]
Message-ID: <ZMeWKDi99T6tBRg8@kuha.fi.intel.com> (raw)
In-Reply-To: <20230712085722.1414743-1-badhri@google.com>
Hi,
I'm sorry to keep you waiting.
On Wed, Jul 12, 2023 at 08:57:22AM +0000, Badhri Jagan Sridharan wrote:
> Do not transition to SNK_UNATTACHED state when receiving vsafe0v event
> while in SNK_HARD_RESET_WAIT_VBUS. Ignore VBUS off events as well as
> in some platforms VBUS off can be signalled more than once.
>
> [143515.364753] Requesting mux state 1, usb-role 2, orientation 2
> [143515.365520] pending state change SNK_HARD_RESET_SINK_OFF -> SNK_HARD_RESET_SINK_ON @ 650 ms [rev3 HARD_RESET]
> [143515.632281] CC1: 0 -> 0, CC2: 3 -> 0 [state SNK_HARD_RESET_SINK_OFF, polarity 1, disconnected]
> [143515.637214] VBUS on
> [143515.664985] VBUS off
> [143515.664992] state change SNK_HARD_RESET_SINK_OFF -> SNK_HARD_RESET_WAIT_VBUS [rev3 HARD_RESET]
> [143515.665564] VBUS VSAFE0V
> [143515.665566] state change SNK_HARD_RESET_WAIT_VBUS -> SNK_UNATTACHED [rev3 HARD_RESET]
>
> Fixes: 28b43d3d746b ("usb: typec: tcpm: Introduce vsafe0v for vbus")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tcpm/tcpm.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 829d75ebab42..cc1d83926497 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -5349,6 +5349,10 @@ static void _tcpm_pd_vbus_off(struct tcpm_port *port)
> /* Do nothing, vbus drop expected */
> break;
>
> + case SNK_HARD_RESET_WAIT_VBUS:
> + /* Do nothing, its OK to receive vbus off events */
> + break;
> +
> default:
> if (port->pwr_role == TYPEC_SINK && port->attached)
> tcpm_set_state(port, SNK_UNATTACHED, tcpm_wait_for_discharge(port));
> @@ -5395,6 +5399,9 @@ static void _tcpm_pd_vbus_vsafe0v(struct tcpm_port *port)
> case SNK_DEBOUNCED:
> /*Do nothing, still waiting for VSAFE5V for connect */
> break;
> + case SNK_HARD_RESET_WAIT_VBUS:
> + /* Do nothing, its OK to receive vbus off events */
> + break;
> default:
> if (port->pwr_role == TYPEC_SINK && port->auto_vbus_discharge_enabled)
> tcpm_set_state(port, SNK_UNATTACHED, 0);
>
> base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
> --
> 2.41.0.255.g8b1d071c50-goog
--
heikki
prev parent reply other threads:[~2023-07-31 11:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 8:57 Badhri Jagan Sridharan
2023-07-31 11:08 ` Heikki Krogerus [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=ZMeWKDi99T6tBRg8@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kyletso@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=stable@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®