Re: [PATCH] gpio: pl061: Support implementations without GPIOINTR line
From: Linus Walleij <hidden>
Date: 2021-03-22 12:53:41
Also in:
linux-gpio
On Mon, Mar 22, 2021 at 1:36 PM Alexander Sverdlin [off-list ref] wrote:
quoted
One way would be to stack more compatible strings: compatible = "lsi,axm5516-primary-gpio", "arm,pl061", "arm,primecell"; Going from more to less specific. We see that this is a PL061 and that it is a primecell, but we also see that it is a version specifically integrated into the axm5516.The problem is, it's not the only SoC with this "issue". AXM56xx and AXC67xx will follow, and these "hardcoded offsets" will be different. We are not going to add a compatible for PL061 per SoC, are we?
Why not? If the hardware is not 100% compatible due to
misc factors, then it needs special compatible strings.
See for example:
Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml
compatible:
oneOf:
- items:
- enum:
- arm,arm11mp-gic
- arm,cortex-a15-gic
- arm,cortex-a7-gic
- arm,cortex-a5-gic
- arm,cortex-a9-gic
- arm,eb11mp-gic
- arm,gic-400
- arm,pl390
- arm,tc11mp-gic
- qcom,msm-8660-qgic
- qcom,msm-qgic2
Well, you can always merge v1: https://lore.kernel.org/linux-gpio/20170222123049.17588-1-alexander.sverdlin@nokia.com/ (local)
The new patch (using the hierarchical IRQ chip) is much better so no need to revert to that. The only remaining question is really how we obtain the hardware offsets, whether they way you do it in your patch (and which also happen to agree with the existing bindings) or another way using a lot of compatible strings. Yours, Linus Walleij