Re: [PATCH] power: sequencing: pcie-m2: enforce PCI and OF dependencies

From: Arnd Bergmann

Date: Thu Apr 02 2026 - 05:03:16 EST


On Thu, Apr 2, 2026, at 10:39, Bartosz Golaszewski wrote:
> On Wed, Apr 1, 2026 at 11:19 AM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
> Hi Arnd,
>
> Mani posted the following series[1]. It seems to me it fixes at least
> some of the build issues.

I don't think that covers the case of CONFIG_SERIAL_DEV_BUS=m
with POWER_SEQUENCING_PCIE_M2. Trying to make this work with
compile testing adds a lot of complexity for little benefit,
so I think my second patch is better there. SERIAL_DEV_BUS
is visible on all architectures, so compile-testing works
fine on allmodconfig and randconfig builds either way.

For PCI it's similar: while you can't build test this on
architectures without PCI (m68k, hexagon, ...), nobody
cares, and you just make the driver uglier, though there is
less risk of introducing additional regressions here.

Obviously the m2 pwrseq driver has a real dependency on pcie,
so there is no point trying to make it build with PCI=n,
the same way we don't allow building normal PCI device drivers
without PCI support.

> I would really prefer to keep the COMPILE_TEST option here. I'm seeing
> that only some of the symbols depending on OF_DYNAMIC are stubbed out.
> Rob: is there any reason for that? Would you be willing to Ack a patch
> adding stubs for the remainder and me taking it along with the pwrseq
> changes?

The idea with OF_DYNAMIC is that any driver that uses it should
'select' that symbol, so there is no need for stubs.

More generally: I think the stub helpers in headers are useful
for features that are truly optional, e.g. a driver may be
able to light LEDs if they are enabled but still work fine without
that. COMPILE_TEST in turn is nice when it enables building
platform specific drivers on other platforms. The combination of
the two causes more problems than it helps: if a driver has
a clear dependency on a particular subsystem, we should just
enforce that in Kconfig and not artificially allow compile
testing a configuration that is neither useful in practice
nor hard to build test already.

Arnd