[PATCH 5/9] drivers: gpio: add QIXIS FPGA GPIO controller
Andrew Lunn
andrew at lunn.ch
Thu Jul 10 07:12:08 PDT 2025
> The FPGA does have an ID register that we could verify and match against
> the board type that we expect.
>
> On the other hand, I am not 100% on board with the idea to check this
> from the GPIO driver which teoretically should only touch its one
> register. Maybe from the parent's driver we could do that and prevent
> the probing of children if things don't match up. But this does prove to
> be complicated since those drivers are simple-mfd (for LS1046AQDS) and
> simple-mfd-i2c (for LX2160ARDB). And I don't think it would be wise to
> add some specific board logic into of/platform.c.
My experience is, DT authors will mess up and put in the wrong
compatible. And the wrong compatible might be enough for it to mostly
work, so you end up with deployed systems with wrong compatibles. It
then becomes difficult to actually extend the use of the compatible,
without causing regressions.
Also, checking will catch putting the wrong bitstream into the FPGA.
So if you can check it, do check it, and return -ENODEV.
Andrew
More information about the linux-arm-kernel
mailing list