On Tue, Oct 25, 2016 at 11:34:40AM +0200, Linus Walleij wrote: > Good work on this patch, nice that it got merged. > > I was just thinking that as an add-on, you may want to name > the gpio lines so they have meaningful names in userspace > when you use this with the chardev (I have reasons to believe > these GPIOs will be used from userspace, tell me if that > is wrong). > > We currently support naming lines for devicetree and > ACPI (in -next). > > I was thinking on either reusing the .names field of the > struct gpiochip to name the lines for the userspace > chardev. With the sideeffect of the names getting reflected > also to sysfs if using that. Simply reusing .names would cause problems since the old sysfs name space is flat, so you would be unable to use more than one pluggable expander (unless also encoding the topology in the name). > We could otherwise add a special function to name the > lines from drivers like this that hang off a pluggable bus. > > Johan/Martyn what is your idea? Providing default names from the driver could perhaps be useful at times. For this particular chip the names would still be GPIO_0, GPIO_1 and GPIO_2 (possibly with a suffix depending on which of the two controllers they hang off of) however, which may not be much better than using chip->base + offset. I'd assume this to be the common case. Device-tree overlays is what I see a real use for where different overlays can be applied based on topology data to describe what is actually connected to a pin in a specific setup. And that seems like something that could be useful for normal (static) DT systems as well (e.g. describe what's actually connected to those Beaglebone pins). Johan -- 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