Re: [PATCH v5 7/8] platform/chrome: cros_ec_typec: Thunderbolt support
From: Andrei Kuchynski
Date: Mon Mar 02 2026 - 06:31:30 EST
Hi Dzmitry,
On Mon, Mar 2, 2026 at 10:36 AM Dzmitry Sankouski <dsankouski@xxxxxxxxx> wrote:
>
>
>
> On 12/14/24 2:35 AM, Abhishek Pandit-Subedi wrote:
> > Add support for entering and exiting Thunderbolt alt-mode using AP
> > driven alt-mode.
> >
> > Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@xxxxxxxxxxxx>
> > ---
> >
> (...)
>
> > - amode = typec_port_register_altmode(port->port, &desc);
> > - typec_altmode_set_drvdata(amode, port);
> > - amode->ops = &port_amode_ops;
>
> The last usage of port_amode_ops is deleted here. Is this a mistake?
> AFAIU from kernel docs, port_amode_ops needed for alternate mode driver
> to send vdm messages to partner. Now, when it's unused, how does
> alternate modes work in this driver?
>
The assignment of the typec_altmode_ops struct pointer is still here;
see the cros_typec_register_thunderbolt / typec_altmode_set_ops
implementation.
> > + amode = cros_typec_register_thunderbolt(port, &desc);
Thanks,
Andrei