Re: [PATCH] usb: cdns3: attempt to fix Kconfig dependencies

From: Peter Chen (CIX)

Date: Sun Apr 05 2026 - 21:30:28 EST


On 26-04-03 20:50:52, Arnd Bergmann wrote:
>
> > @@ -13,11 +13,13 @@ config USB_CDNS_HOST
> > bool
> > depends on USB=y || USB=USB_CDNS_SUPPORT
> >
> > -config CONFIG_USB_CDNS_PLATFORM
> > +config USB_CDNS_PLATFORM
> > tristate "Cadence USB3 generic platform support"
> > depends on USB_CDNSP || USB_CDNS3
> > depends on USB_CDNSP || !USB_CDNSP
> > depends on USB_CDNS3 || !USB_CDNS3
> > + depends on USB_CDNS3_GADGET || !USB_CDNS3_GADGET
> > + depends on USB_CDNSP_GADGET || !USB_CDNSP_GADGET
> > help
> > The platform driver support is needed on any SoC integrating
> > a variant of the Cadence USB3 or USBSSP dual-role controllers,
>
> The dependencies here are rather unwieldy, but it does look like
> this is the minimum set we need with the current code.
>
> The only other alternative I see would be to split up the
> platform driver support into separate modules for cdns3 and
> cdnsp as well, which would make the dependencies trivial but
> require reworking of the actual in a way that I haven't
> been able to figure out yet. If you are already integrating
> other changes for the next attempt, maybe you can try to
> come up with a solution for this as well.

Thanks for your suggestion, creating different platform driver
between cdns3 and cdnsp is the way we used at downstream, but
when I try to upstream cdsnp platform driver support, I find
the two platforms driver are 95% identical in content, so I
would like to keep one platform driver and one binding doc.

By the way, are there any randconfigs I could run to avoid
the similar break, of course, I will pass my local USB
randconfigs tests?

--

Best regards,
Peter