Re: [PATCH 1/2] platform/chrome: cros_ec_typec: Enforce priority-based mode selection

From: Tzung-Bi Shih

Date: Thu Jan 29 2026 - 22:27:08 EST


On Thu, Jan 29, 2026 at 01:19:27PM +0000, Andrei Kuchynski wrote:
> The driver sets mode_selection bit for each Alternate mode, thereby
> preventing individual altmode drivers from activating their respective
> modes.
> Once the registration of all Alternate Modes is complete, the driver
> verifies if USB4 mode is supported by both the port and the partner and
> activates USB4 mode. In cases where USB4 is not supported, the driver
> invokes typec_mode_selection_start to initiate the mode selection process
> based on mode priorities.
> The driver communicates the current Type-C mode to the mode selection
> process via typec_altmode_state_update.

I find the message doesn't help me too much for understanding the patch.
Can you rephrase them and assuming readers might not have too much context?

> ---
> drivers/platform/chrome/cros_ec_typec.c | 39 +++++++++++++++++++-
> drivers/platform/chrome/cros_typec_altmode.c | 8 +++-
> 2 files changed, 44 insertions(+), 3 deletions(-)

The patch uses some exported symbols which aren't yet in upstream
(drivers/usb/typec/mode_selection.c). Ideally, you should mention that in
either cover letter or note after "---".

> +/* Delay between mode entry/exit attempts, ms */
> +static const unsigned int mode_selection_delay = 1000;
> +/* Timeout for a mode entry attempt, ms */
> +static const unsigned int mode_selection_timeout = 4000;

The commit message probably needs some description about why these values.