2018-02-14 15:59 GMT+01:00 Jonas Mark (ST-FIR/ENG1) <Mark.Jonas@xxxxxxxxxxxx>: > Hello, > >> tl;dr: How do I set the polarity (active state) of a GPIO in the device >> tree and use it from user space? > > I am still not able to declare the polarity of a GPIO via device tree > so it can be used from user space using libgpio. > > I read the kernel documentation and did not find hint how to do this. > What I found is how to set the polarity of a GPIO for a gpio-hog or a > kernel driver. But that prevents the GPIO being used from user space. > > Thank you in advance for your help, > Mark Jonas > > Mit freundlichen Grüßen / Best regards > > Mark Jonas > > Security Systems, Panel Software Fire (ST-FIR/ENG1) > Bosch Sicherheitssysteme GmbH | Postfach 11 11 | 85626 Grasbrunn | GERMANY | www.bosch-sicherheitsprodukte.de > > Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart HRB 23118 > Aufsichtsratsvorsitzender: Stefan Hartung; Geschäftsführung: Gert van Iperen, Andreas Bartz, Thomas Quante, Bernhard Schuster > > -- > 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 Hi Jonas, the active state of a GPIO line is a consumer-specific setting. For example: you want to indicate to the GPIO push button driver that the line it's using is active-low so that it correctly interprets the falling edge event as a button *press* instead of a *release*. It doesn't make sense to set it globally for a line in the kernel. Hope that helps, Bartosz -- 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