Re: [PATCH] gpio: of: make it possible to name GPIO lines

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

 




On Thu, Apr 21, 2016 at 7:21 AM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> On Wed, Apr 20, 2016 at 3:10 AM, Alexandre Courbot <gnurou@xxxxxxxxx> wrote:
>
>>> +               if (!ret)
>>> +                       gdev->descs[i].name = name;
>>
>> Shouldn't we check for name collision (by calling gpio_name_to_desc()
>> as gpiochip_set_desc_names() does) here?
>
> That check is there to avoid getting the same name twice in
> sysfs (which would fail), and this is not for sysfs, it is for the chardev.
>
> And I don't think so: atleast we should not look globally like that thing
> does. It need not be a unique name for the system, but I don't know
> if we should even enforce it to be a unique name for the chip.
>
> What do people think?

As long as we don't need to do things like requesting a GPIO by (chip,
name) tuple, then there should indeed be no issue with having several
lines have the same name.

On the other hand, we want lines to be named precisely, and two lines
with the same name would indicate a lack of precision (they cannot
have *exactly* the same function, can they). So I'm a bit torn as to
whether we should enforce this or not.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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