linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regarding export of GPIOs
@ 2021-08-20  3:25 Riz
  2021-08-20 14:04 ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Riz @ 2021-08-20  3:25 UTC (permalink / raw)
  To: linux-gpio

Hello,
I have some basic questions around the exporting of a GPIO.

1. Regarding gpio-hog mechanism:
The gpio-hog mechanism would help us to initialise a GPIO to either
high/low & in/out during bootup.
This is fine.

So my question is, if we hog a GPIO, does it also gets exported to the
userspace by default?


2. With the older sysfs interface, we would be using "echo x >
/sys/class/gpio/export" to export the gpiox to userspace.

I wanted to know what would be the right way to do this with the newer
interface?

3. To check if a GPIO is being exported or not, we would see the
/sys/class/gpio with the sysfs interface.

With the newer character device interface, what would be the right way
to check what GPIOs are exported to userspace?

Looking forward to hearing from you

Regards,
Rizwan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-01  6:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-20  3:25 Regarding export of GPIOs Riz
2021-08-20 14:04 ` Andy Shevchenko
2021-08-27  2:21   ` Kent Gibson
2021-08-31 15:05     ` Riz
2021-08-31 15:08       ` Riz
2021-09-01  6:28         ` Kent Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).