Re: [PATCH v3 3/5] usb: typec: ucsi: Set no_mode_control flag

Heikki Krogerus
2025-09-09T09:07:57Z

On Fri, Sep 05, 2025 at 02:22:04PM +0000, Andrei Kuchynski wrote:
> This flag indicates that the PPM allows the OPM to change the currently
> negotiated alternate mode using the SET_NEW_CAM command.
>
> Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
> ---
> drivers/usb/typec/ucsi/ucsi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 0d6b0cf5a7cd..9f754344a841 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1632,6 +1632,7 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
>
> cap->driver_data = con;
> cap->ops = &ucsi_ops;
> + cap->no_mode_control = !(con->ucsi->cap.features & UCSI_CAP_ALT_MODE_OVERRIDE);

The flag is now used to expose the priority file, but you can't affect
the order in which the UCSI attempts to enter the modes, or can you?

thanks,

--
heikki