Re: [PATCH v1 1/1] pinctrl: add pinctrl/GPIO driver for Apple SoCs

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

 



Hello!

On Tue, Sep 28, 2021 at 01:34:39AM +0200, Linus Walleij wrote:
> On Sun, Sep 26, 2021 at 4:36 PM Sven Peter <sven@xxxxxxxxxxxxx> wrote:
> > On Sun, Sep 26, 2021, at 15:10, Linus Walleij wrote:
> 
> > > If these four blocks in the SoC are different, they should have
> > > different compatible strings, because they are not, by
> > > definition, compatible.
> >
> > I'd prefer to have a single compatible and get the npins from some
> > property and I don't think that's necessarily over-generalizing.
> > AFAICT Apple has been using the exact same MMIO interface for years
> > and I'd expect them to continue using it in the future. The only thing
> > that seems to change is the number of pins available and their assignment.
> > If we just have a single compatible we can likely support the M1X/2 or
> > however Apple calls the next SoCs with just a simple DTB change without
> > touching any driver code.
> 
> Admittedly the word "compatible" in DT context is a bit fuzzy around the
> edges. Sometimes it is more like "parameterizable" which is what you
> are saying here.
> 
> I don't have a very strong opinion on it, both approaches are possible.
> Being able to define new SoCs are not always helpful for developers
> as the data in DT can become opaque and hard to understand if it
> is too general.
I think we want to try avoid hardcoding big lists of GPIO pins,
especially when we don't know what most of them are used for yet.
As Sven has said it would be nice to not need to change the driver if
future SoCs have slightly different pin configurations or maybe even
extra pinctrl hardware blocks.

I have a v2 of this series mostly ready, if it's decided it's ok to go
with the current approach.

Thanks,
Joey



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux