Re: [PATCH v5 10/14] arm64: apple: Add pinctrl nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 30, 2021 at 10:00 AM Marc Zyngier <maz@xxxxxxxxxx> wrote:

> > In other discussions it turns out that the driver is abusing these gpio-ranges
> > to find out how many pins are in each pinctrl instance. This is not the
> > idea with gpio-ranges, these can be multiple and map different sets,
> > so we need something like
> >
> > apple,npins = <212>;
> > (+ bindings)
> >
> > or so...
>
> Is it the driver that needs updating? Or the binding?

Both, I guess.

> I don't really
> care about the former, but the latter is more disruptive as it has
> impacts over both u-boot and at least OpenBSD.
>
> How is that solved on other pinctrl blocks? I can't see anyone having
> a similar a similar property.

The Apple pincontroller is unique in having four instances using the
same compatible string (I raised this as an issue too).

Most SoCs has one instance of a pin controller, with one compatible
string and then we also know how many pins it has.

The maintainer seeme unhappy about my suggestion to name
the four pin controllers after function and insist to use the same
compatible for all four, which means they instead need to be
parametrized, which means this parameter has to be added
because ranges should not be used in this way.

I guess the code can survive using the ranges as a fallback at
the cost of some more complex code.

Yours,
Linus Walleij



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux