From: Benson Leung <bleung@google.com>
To: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Cc: heikki.krogerus@linux.intel.com, tzungbi@kernel.org,
linux-usb@vger.kernel.org, chrome-platform@lists.linux.dev,
akuchynski@google.com, sboyd@kernel.org, pmalani@chromium.org,
badhri@google.com, rdbabiera@google.com,
dmitry.baryshkov@linaro.org, jthies@google.com,
Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 5/8] platform/chrome: cros_ec_typec: Update partner altmode active
Date: Thu, 19 Dec 2024 01:30:18 +0000 [thread overview]
Message-ID: <Z2N3Kplgwy8P7STz@google.com> (raw)
In-Reply-To: <20241213153543.v5.5.I083bf9188947be8cb7460211cfdf3233370a28f6@changeid>
[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]
On Fri, Dec 13, 2024 at 03:35:46PM -0800, Abhishek Pandit-Subedi wrote:
> Mux configuration is often the final piece of mode entry and can be used
> to determine whether a partner altmode is active. When mux configuration
> is done, use the active port altmode's SVID to set the partner active
> field for all partner alt modes.
>
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
> ---
>
> Changes in v5:
> - Use list_for_each_entry and simplify conditional statement within
>
> drivers/platform/chrome/cros_ec_typec.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
> index ae2f86296954..77f748fc8542 100644
> --- a/drivers/platform/chrome/cros_ec_typec.c
> +++ b/drivers/platform/chrome/cros_ec_typec.c
> @@ -619,6 +619,7 @@ static int cros_typec_configure_mux(struct cros_typec_data *typec, int port_num,
> };
> struct ec_params_usb_pd_mux_ack mux_ack;
> enum typec_orientation orientation;
> + struct cros_typec_altmode_node *node;
> int ret;
>
> ret = cros_ec_cmd(typec->ec, 0, EC_CMD_USB_PD_MUX_INFO,
> @@ -677,6 +678,14 @@ static int cros_typec_configure_mux(struct cros_typec_data *typec, int port_num,
> port->mux_flags);
> }
>
> + /* Iterate all partner alt-modes and set the active alternate mode. */
> + list_for_each_entry(node, &port->partner_mode_list, list) {
> + typec_altmode_update_active(
> + node->amode,
> + port->state.alt &&
> + node->amode->svid == port->state.alt->svid);
> + }
> +
> mux_ack:
> if (!typec->needs_mux_ack)
> return ret;
> --
> 2.47.1.613.gc27f4b7a9f-goog
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-12-19 1:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 23:35 [PATCH v5 0/8] Thunderbolt and DP altmode support for cros-ec-typec Abhishek Pandit-Subedi
2024-12-13 23:35 ` [PATCH v5 1/8] usb: typec: Only use SVID for matching altmodes Abhishek Pandit-Subedi
2024-12-19 1:18 ` Benson Leung
2024-12-19 1:24 ` Benson Leung
2024-12-13 23:35 ` [PATCH v5 2/8] usb: typec: Add driver for Thunderbolt 3 Alternate Mode Abhishek Pandit-Subedi
2024-12-19 1:20 ` Benson Leung
2024-12-13 23:35 ` [PATCH v5 3/8] usb: typec: Make active on port altmode writable Abhishek Pandit-Subedi
2024-12-18 9:47 ` Heikki Krogerus
2024-12-19 1:23 ` Benson Leung
2024-12-13 23:35 ` [PATCH v5 4/8] usb: typec: Print err when displayport fails to enter Abhishek Pandit-Subedi
2024-12-18 9:48 ` Heikki Krogerus
2024-12-19 1:25 ` Benson Leung
2024-12-13 23:35 ` [PATCH v5 5/8] platform/chrome: cros_ec_typec: Update partner altmode active Abhishek Pandit-Subedi
2024-12-19 1:30 ` Benson Leung [this message]
2024-12-13 23:35 ` [PATCH v5 6/8] platform/chrome: cros_ec_typec: Displayport support Abhishek Pandit-Subedi
2024-12-18 1:16 ` Stephen Boyd
2024-12-13 23:35 ` [PATCH v5 7/8] platform/chrome: cros_ec_typec: Thunderbolt support Abhishek Pandit-Subedi
2024-12-19 1:31 ` Benson Leung
2026-03-02 9:36 ` Dzmitry Sankouski
2026-03-02 11:31 ` Andrei Kuchynski
2026-03-03 14:13 ` Dzmitry Sankouski
2024-12-13 23:35 ` [PATCH v5 8/8] platform/chrome: cros_ec_typec: Disable tbt on port Abhishek Pandit-Subedi
2024-12-19 1:32 ` Benson Leung
2024-12-20 4:28 ` [PATCH v5 0/8] Thunderbolt and DP altmode support for cros-ec-typec Tzung-Bi Shih
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=Z2N3Kplgwy8P7STz@google.com \
--to=bleung@google.com \
--cc=abhishekpandit@chromium.org \
--cc=akuchynski@google.com \
--cc=badhri@google.com \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dmitry.baryshkov@linaro.org \
--cc=groeck@chromium.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pmalani@chromium.org \
--cc=rdbabiera@google.com \
--cc=sboyd@kernel.org \
--cc=tzungbi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.