Re: setting gpio-line-names in dts for sama5d2 SoC

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

 



On Thu, Mar 18, 2021 at 3:56 PM Alexander Dahl <ada@xxxxxxxxxxx> wrote:
> > Andy Shevchenko <andy.shevchenko@xxxxxxxxx> hat am 18.03.2021 13:40 geschrieben:
> > You may look into the commit
> > 7cba1a4d5e16 ("gpiolib: generalize devprop_gpiochip_set_names() for
> > device properties")
> > which unifies the logic, but at the same time removed one comment:
> >
> > -       /* If the chip defines names itself, these take precedence */
>
> Well, that could be added again. And if that precedence stays as is, it should be documented in the gpio devicetree bindings to not cause further confusion?
>
> > So, logic was that for a long time. And unfortunately I don't see how
> > we may change this without breakage. This backs us to the discussion
> > if the name of the line is ABI or not.
>
> I want to point out one point for consideration. There's usually a difference between the SoC and the boards using that SoC. So those pins are all the same from the chips point of view and the default names are set in a driver related to the chip (family).  However the line names set in device tree are probably related to a board.  Obviously different boards may have different line names, even when using the same SoC.
>
> In other words: if I design a new board, there's no interface I would break, at least not from the userspace point of view just looking at the line names, or is there?

I understand that  names are platform specific and I'm on your side as
an IoT specialist, but on the Linux side we may not blindly do changes
like this due to ABI concerns. You see the problem here: you can't fix
all (legacy) DTSs in the world which do not have GPIO line names
listed, and for those users we effectively break their tools and
scripts which relies on the hard coded naming scheme.

So, we may change if and only if the names of the lines are not an ABI!

What we can do as a workaround is to reverse the partsing order, and
if somebody complains, it will be their DTS issues, whoever not the
best solution either.

+Cc: Rob to hear his opinion.

-- 
With Best Regards,
Andy Shevchenko




[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