Re: [PATCH RFC v3 02/10] usb: misc: qcom_eud: add sysfs attribute for port selection

From: Greg Kroah-Hartman

Date: Fri Mar 13 2026 - 08:46:46 EST


On Fri, Mar 13, 2026 at 01:10:10PM +0100, Konrad Dybcio wrote:
> On 3/11/26 2:16 PM, Greg Kroah-Hartman wrote:
> > On Mon, Mar 09, 2026 at 01:33:29PM -0700, Elson Serrao wrote:
> >> EUD can be mapped to either the primary USB port or the secondary USB port
> >> depending on the value of the EUD_PORT_SEL register. Add a 'port' sysfs
> >> attribute to allow userspace to select which port EUD should operate on
> >> and update the ABI documentation. This is needed for systems with dual
> >> USB ports where EUD needs to be accessible on either port depending on the
> >> system configuration and use case.
> >>
> >> Signed-off-by: Elson Serrao <elson.serrao@xxxxxxxxxxxxxxxx>
> >> ---
> >> Documentation/ABI/testing/sysfs-driver-eud | 16 ++++++++
> >> drivers/usb/misc/qcom_eud.c | 43 ++++++++++++++++++++++
> >> 2 files changed, 59 insertions(+)
> >>
> >> diff --git a/Documentation/ABI/testing/sysfs-driver-eud b/Documentation/ABI/testing/sysfs-driver-eud
> >> index 2bab0db2d2f0..67223f73ee60 100644
> >> --- a/Documentation/ABI/testing/sysfs-driver-eud
> >> +++ b/Documentation/ABI/testing/sysfs-driver-eud
> >> @@ -7,3 +7,19 @@ Description:
> >> EUD based on a 1 or a 0 value. By enabling EUD,
> >> the user is able to activate the mini-usb hub of
> >> EUD for debug and trace capabilities.
> >> +
> >> +What: /sys/bus/platform/drivers/qcom_eud/.../port
> >> +Date: January 2026
> >> +Contact: Elson Serrao <elson.serrao@xxxxxxxxxxxxxxxx>
> >> +Description:
> >> + Selects which USB port the Embedded USB Debugger (EUD)
> >> + is mapped to on platforms providing multiple High-Speed
> >> + USB ports.
> >> +
> >> + Valid values:
> >> + 0 - Primary USB port
> >> + 1 - Secondary USB port
> >
> > Why not use "primary" and "secondary" as values instead? That makes
> > this much simpler to understand.
>
> It's not inconceivable that future iterations of this hardware will let
> one mux between more than two USB PHYs/ports (there are already a multitude
> of SoCs where we have 4 or more USB controllers and >= that ports)

Great, and how will that be defined? As a number? Name? Something
else?

thanks,

greg k-h