Re: [PATCH] gpiolib: allow exporting gpios with custom names

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

 



Hi,

On Sun, Oct 12, 2014 at 2:45 AM, Alexey Ignatov <lexszero@xxxxxxxxx> wrote:
> This allows exporting gpio pins to sysfs with custom names. Before
> this patch only gpiochip-supplied names was used, or generic gpio%d.
> Added gpiod_export_name() and gpio_export_name() functions.

This looks very similar to another proposal that has been posted a few
months ago:

https://lkml.org/lkml/2014/7/23/537

There has been a lenghty discussion about the merits/drawbacks of
doing this instead of using gpiod_export_link(). To summarize my
opinion on the matter, I *really* think using gpiod_export_link() is a
better solution since it puts the GPIO under its owner's /sysfs node,
instead of having totally unrelated GPIOs arbitrarily named under
/sys/class/gpio. IIRC Linus was not too enthusiastic neither.

Could you explain why you think this change is needed, how you plan to
make use of it, and why you cannot use gpiod_export_link() to do the
same?

> gpio_request_one() now uses new behaviour with 'label' as gpio name.

Doesn't this mean that drivers that used gpio_request_one() to export
a GPIO might see the exported name change all of a sudden? This might
make a few people unhappy (also, I could not see this change in your
patch, but only had a quick look).
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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