On Tue, Mar 1, 2016 at 2:52 PM, Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> wrote: > On Mon, Feb 29, 2016 at 04:24:16PM +0000, sergk sergk2mail wrote: >> But how then to obtain gpio name or if it is possible the list of all >> available names? >> For example decoded ACPI DSDT shows the following: >> how to get gpio name for mentioned in your reply function? > > For existing systems that do not provide _DSD naming for GPIOs you still > can provide them in the driver itself (ugly but works). See > Documentation/acpi/gpio-properties.txt chapter "ACPI GPIO Mappings > Provided by Drivers". I just this merge window added an ABI for userspace to read name of the GPIO line and also consumer name ("label") by using the two strings stored in struct gpio_desc. Currently this will be initialized per-offset from the seldom used char names[] in struct gpio_chip, if not NULL. We're working on DT bindings to set this per-line from the DT, and if ACPI has a mechanism to name individual lines, please submit patches for assigning this properly! (Hi Mika ;) For consumers struct gpio_desc is opaque, but if they actually need to know the name of a line we can add gpiod_get_name(struct gpio_desc *) but then I want to know a usecase. debugfs and userspace ABI is already displaying it just fine. 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