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

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

 



On Fri, Jan 15, 2021 at 5:48 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Friday, January 15, 2021, Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx> wrote:
>> On Fri, Jan 8, 2021 at 4:04 PM Andy Shevchenko
>> <andy.shevchenko@xxxxxxxxx> wrote:
>> > On Fri, Jan 8, 2021 at 4:39 PM Flavio Suligoi <f.suligoi@xxxxxxx> wrote:
>> >
>> > ...
>> >
>> > > > > For example, something like the following:
>> > > > >
>> > > > > # gpiofind button_1
>> > > > > gpiochip0 20
>> > > > > gpiochip0 22 (duplicate)
>> > > >
>> > > > This cannot happen, as the duplicate is on the same gpiochip.
>> > >
>> > > Just a question:  I think that a duplicate name can be present
>> > > both in the same gpiochip
>> >
>> > No. This is against common sense. Can you have the same pin numbers on one chip?
>> >
>>
>> You're correct logically but technically this definitely can happen.
>> As the DT examples from qualcomm show: you can have multiple pins
>> being called "nc" for "not connected". I'm still not sure what
>> assumptions user-space can make in this case. Should we have a list of
>> unsupported or illegal names to look up? Sounds sketchy.
>>
>
> NC or “” or something like that should be done solely by framework (or at least be reserved by framework), otherwise it makes no sense to me at all.

To be ignored due to gpio_chip.valid_mask?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[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