Re: [PATCH 3/5] usb: typec: ucsi: add Huawei Matebook E Go (sc8280xp) ucsi driver

From: Markus Elfring
Date: Sun Dec 29 2024 - 11:15:57 EST


> The Huawei Matebook E Go (sc8280xp) tablet provides implements UCSI

Omit this verb here?


> interface in the onboard EC. …


> +++ b/drivers/platform/arm64/huawei-gaokun-ec.c
> @@ -0,0 +1,598 @@

> +static void gaokun_set_orientation(struct ucsi_connector *con,
> + struct gaokun_ucsi_port *port)
> +{

> + spin_lock_irqsave(&port->lock, flags);
> + ccx = port->ccx;
> + spin_unlock_irqrestore(&port->lock, flags);
> +
> + typec_set_orientation(con->port, CCX_TO_ORI(ccx));
> +}


Under which circumstances would you become interested to apply a statement
like “guard(spinlock_irqsave)(&port->lock);”?
https://elixir.bootlin.com/linux/v6.13-rc3/source/include/linux/spinlock.h#L572

Regards,
Markus