Re: [PATCH v6 1/2] usb: xhci-pci: add AMD Promontory 21 PCI glue

From: Michal Pecio

Date: Mon May 18 2026 - 16:34:28 EST


On Mon, 18 May 2026 03:55:52 -0700, Guenter Roeck wrote:
> On 5/17/26 14:21, Michal Pecio wrote:
> > Instead of the X86 heuristic, would it be possible to build glue
> > code if and only if SENSORS_PROM21_XHCI is enabled?
> >
> > This seems to work:
> >
> > config SENSORS_PROM21_XHCI
> > tristate "AMD Promontory 21 xHCI temperature sensor"
> > - depends on USB_XHCI_PCI_PROM21
> > + depends on USB_XHCI_PCI
> >
> > config USB_XHCI_PCI_PROM21
> > tristate
> > - depends on X86
> > depends on USB_XHCI_PCI
> > - default USB_XHCI_PCI
> > + default USB_XHCI_PCI if SENSORS_PROM21_XHCI != 'n'
> > select AUXILIARY_BUS
> >
> > I don't know if it's the best way, perhaps it would be preferable for
> > the hwmon driver to select the glue, but then I'm not sure how to force
> > glue to become 'y' when xhci-pci is 'y'.
> >
>
> Unless I am missing something, that would disable the entire controller
> if the hwmon device is not enabled. That seems a bit draconian to me.

I haven't tested (I don't have this chipset), but it should work like
the similar xhci-pci-renesas module, which I'm familiar with.

When the special unicorn module is disabled by Kconfig, xhci-pci no
longer rejects its devices and works with them normally, like it always
did before the unicorn module even existed.

It should be the same with xhci-pci-prom21. You don't need to enable
this module to use USB, only for the special functions. So if hwmon
is disabled then you can disable it too.

I always found this dual-driver solution (for Renesas) rather ugly and
confusing, but so far it's the least bad option tried. Hmm, maybe the
next iteration should be an aux bus interface for FW loaders...

Regards,
Michal