[PATCH 1/2] gpio: dwapb: Use human understandable gpio numbering.
From: Michael van der Westhuizen <hidden>
Date: 2015-07-16 08:18:38
Also in:
linux-devicetree, linux-gpio
From: Michael van der Westhuizen <hidden>
Date: 2015-07-16 08:18:38
Also in:
linux-devicetree, linux-gpio
On 16 Jul 2015, at 9:57 AM, Linus Walleij [off-list ref] wrote: On Thu, Jul 2, 2015 at 4:20 PM, Richard Cochran [off-list ref] wrote:quoted
On Thu, Jul 02, 2015 at 08:05:26AM +0100, Michael van der Westhuizen wrote:quoted
Anyhow, the whole point is, when the data sheet says that the SoC has GPIO0 to GPION, then those numbers should be exposed to user space.The gpio_chip has this: struct gpio_chip { const char *label; struct device *dev; (...) const char *const *names; (...) If you want to help the users, provide string names for all the GPIO lines and suggest them to do code in userspace that use these names instead of GPIO numbers. Also the string names "gpio0", "gpio1" etc are much better than just using the Linux-specific numbers. So what about making a patch to drivers/gpio/gpio-dwapb.c that adds the .names property to its GPIO chip?
That would meet my needs. I?ll start putting something together. Michael