From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Kyle Tso <kyletso@google.com>
Cc: linux@roeck-us.net, gregkh@linuxfoundation.org,
badhri@google.com, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH v1] usb: typec: tcpm: Query Source partner for FRS capability only if it is DRP
Date: Fri, 8 Dec 2023 15:52:36 +0200 [thread overview]
Message-ID: <ZXMfpPgSY1sSCHK/@kuha.fi.intel.com> (raw)
In-Reply-To: <20231205074747.1821297-1-kyletso@google.com>
On Tue, Dec 05, 2023 at 03:47:46PM +0800, Kyle Tso wrote:
> Source-only port partner will always respond NOT_SUPPORTED to
> GET_SINK_CAP. Avoid this redundant AMS by bailing out querying the FRS
> capability if the Source port partner is not DRP.
>
> Signed-off-by: Kyle Tso <kyletso@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/tcpm/tcpm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 50cbc52386b3..192c103e0d10 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -4401,7 +4401,8 @@ static void run_state_machine(struct tcpm_port *port)
> tcpm_set_current_limit(port, tcpm_get_current_limit(port), 5000);
> tcpm_swap_complete(port, 0);
> tcpm_typec_connect(port);
> - mod_enable_frs_delayed_work(port, 0);
> + if (port->pd_capable && port->source_caps[0] & PDO_FIXED_DUAL_ROLE)
> + mod_enable_frs_delayed_work(port, 0);
> tcpm_pps_complete(port, port->pps_status);
>
> if (port->ams != NONE_AMS)
> --
> 2.43.0.472.g3155946c3a-goog
--
heikki
next prev parent reply other threads:[~2023-12-08 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 7:47 [PATCH v1] usb: typec: tcpm: Query Source partner for FRS capability only if it is DRP Kyle Tso
2023-12-08 13:52 ` Heikki Krogerus [this message]
2023-12-08 17:00 ` Guenter Roeck
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=ZXMfpPgSY1sSCHK/@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 \
/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