Re: [PATCH v7 6/8] usb: misc: qcom_eud: add role-based EUD control
From: Konrad Dybcio
Date: Tue Sep 01 2026 - 07:36:27 EST
On 8/31/26 5:01 AM, Elson Serrao wrote:
> EUD functions by presenting itself as a USB device to the host PC and is
> therefore only applicable when the port operates in device role. Keeping
> EUD enabled in other roles provides no benefit and unnecessarily keeps
> the associated PHY resources enabled. Furthermore, enabling EUD in host
> role can cause the USB controller to misbehave because the EUD hub
> supports only a single upstream-facing port.
[...]
> struct eud_chip *chip = dev_get_drvdata(dev);
> + struct eud_path *path;
> bool enable;
> int ret;
>
> if (kstrtobool(buf, &enable))
> return -EINVAL;
>
> + guard(mutex)(&chip->state_lock);
GPT suggests port_store() should also take this lock.. I think that's
a valid concern
Konrad