Re: [PATCH] gpiolib: Disallow identical line names in the same chip

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

 



On Sat, Dec 12, 2020 at 10:23 AM Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:

> As the names are specified in DT, I think the biggest "use case" for
> collisions is GPIO chips on expansion boards, if multiple instances
> of the same board can be connected.

The actual case that happens in reality is GPIO chips on USB.
For example if you plug in two FTDI adapters (these have GPIOs)
and they have named their lines statically in the driver.

This is what Johan points out and also what I find from Googling.

So I would say hot-pluggable buses. Greybus would have the
same issue I think.

> This is a bit similar to clock outputs, cfr. commit f491276a51685987
> ("clk: vc5: Allow Versaclock driver to support multiple instances"), but
> in the clock case, the name of the clock output is dictated by the
> driver, not by DT.

Yeah actually the collisions we have seen in GPIO is the same
type, where we assign the names in gc->names and not in the
device tree (or ACPI).

But I think it is good to establish this habit already so we don't
end up depending on having to support flat namespaces with
several lines on the same chip named the same at least.

Yours,
Linus Walleij



[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