From: Guenter Roeck <linux@roeck-us.net>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-imx@nxp.com, jun.li@nxp.com
Subject: Re: [PATCH] usb: typec: tcpm: handle SRC_STARTUP state if cc changes
Date: Sat, 2 Oct 2021 07:24:33 -0700 [thread overview]
Message-ID: <20211002142433.GD34532@roeck-us.net> (raw)
In-Reply-To: <20210928111639.3854174-1-xu.yang_2@nxp.com>
On Tue, Sep 28, 2021 at 07:16:39PM +0800, Xu Yang wrote:
> TCPM for DRP should do the same action as SRC_ATTACHED when cc changes in
> SRC_STARTUP state. Otherwise, TCPM will transition to SRC_UNATTACHED state
> which is not satisfied with the Type-C spec.
>
> Per Type-C spec:
> DRP port should move to Unattached.SNK instead of Unattached.SRC if sink
> removed.
>
> Fixes: 4b4e02c83167 ("typec: tcpm: Move out of staging")
> cc: <stable@vger.kernel.org>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/usb/typec/tcpm/tcpm.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index a4d37205df54..7f2f3ff1b391 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -4876,6 +4876,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
> tcpm_set_state(port, SRC_ATTACH_WAIT, 0);
> break;
> case SRC_ATTACHED:
> + case SRC_STARTUP:
> case SRC_SEND_CAPABILITIES:
> case SRC_READY:
> if (tcpm_port_is_disconnected(port) ||
> --
> 2.25.1
>
next prev parent reply other threads:[~2021-10-02 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 11:16 [PATCH] usb: typec: tcpm: handle SRC_STARTUP state if cc changes Xu Yang
2021-10-02 14:24 ` Guenter Roeck [this message]
2021-10-04 6:08 ` Heikki Krogerus
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=20211002142433.GD34532@roeck-us.net \
--to=linux@roeck-us.net \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jun.li@nxp.com \
--cc=linux-imx@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=xu.yang_2@nxp.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