On Thu, Jul 7, 2016 at 12:30 PM, Dirk Behme <dirk.behme@xxxxxxxxxxxx> wrote: > From: Oleksij Rempel <fixed-term.Oleksij.Rempel@xxxxxxxxxxxx> > > The device tree is the only source of board dependent information in > the system, and thus it is the logical place to list which GPIOs, ADC > channels etc. to use for various functions. It is straight-forward to > use this information in kernel space and the contents of the device > tree can also be exported to user space. > > If user space applications need to use GPIOs, they can do so over the > existing sysfs interface and they could use the device tree > information to find out which GPIO pin to use for a given function, > but unfortunately the numbering of GPIOs exported through sysfs is > totally unrelated to the device tree standard for how references to > GPIO pins are made. This patch creates a virtual device which is used > to provide symbolic links to GPIO pins in sysfs using logical names > taken from the device tree. > > Signed-off-by: Jonas Oester <jonas.oester@xxxxxxxxxxxx> > Cc: devicetree@xxxxxxxxxxxxxxx > Cc: linux-gpio@xxxxxxxxxxxxxxx NACK! But a year ago it would have been a completely valid reasoning. In kernel v4.6 I introduced a GPIO character device, and since v4.7 it is possible to name lines from the device tree using gpio-names like I do in this patch: http://marc.info/?l=linux-arm-kernel&m=146672328215354&w=2 For the kernel v4.8 merge window I am also adding ABIs to hammer GPIOs up/down and to listen for GPIO events using the character device. Just checkout linux-next, go to tools/gpio and enjoy the new stuff from userspace as it was designed by the example of lsgpio, gpio-hammer and gpio-event-mon. Yours, Linus Walleij -- 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