Re: How do I set user space GPIO polarity (active state) via device tree?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux