kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* gpio: userspace tools
@ 2018-08-31  6:31 Subhashini Rao Beerisetty
  2018-09-03 15:58 ` Mayur Nande
  0 siblings, 1 reply; 2+ messages in thread
From: Subhashini Rao Beerisetty @ 2018-08-31  6:31 UTC (permalink / raw)
  To: kernelnewbies

Hi All,


I?m using v4.4 kernel and I see that gpiochipN are created under
/sys/class/gpio. Latest kernel has three tools lsgpio, gpio-hammer and
gpio-event-mon, all these tools opens the device node under /dev/gpiochipN.
Does v4.4 kernel has any similar tools to control GPIO pins by using
/sys/class/gpio/gpiochipN?

If not, can someone point me how the GPIO pins were controlled in the older
kernel(which supports /sys/class/gpio)?


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180831/1d72664a/attachment.html>

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

* gpio: userspace tools
  2018-08-31  6:31 gpio: userspace tools Subhashini Rao Beerisetty
@ 2018-09-03 15:58 ` Mayur Nande
  0 siblings, 0 replies; 2+ messages in thread
From: Mayur Nande @ 2018-09-03 15:58 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Aug 31, 2018 at 8:32 AM Subhashini Rao Beerisetty
<subhashbeerisetty@gmail.com> wrote:
>
> Hi All,
>
>
> I?m using v4.4 kernel and I see that gpiochipN are created under /sys/class/gpio. Latest kernel has three tools lsgpio, gpio-hammer and gpio-
> event-mon, all these tools opens the device node under /dev/gpiochipN. Does v4.4 kernel has any similar tools to control GPIO pins by using
> /sys/class/gpio/gpiochipN?
There are no tools available within the kernel source for the
deprecated sysfs interface.

> If not, can someone point me how the GPIO pins were controlled in the older kernel(which supports /sys/class/gpio)?
Google around, you will find a lot of examples to access gpios from
userspace. Here are some good references:
https://github.com/jackmitch/libsoc
https://github.com/Linutronix/libgpio
https://github.com/animalcreek/libgpio
https://developer.ridgerun.com/wiki/index.php/Gpio-int-test.c

It is also straight forward to write your own small interface/library,
although I would recommend using one of the above.
HTH.

Regards
Mayur
>
>
> Thanks
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2018-09-03 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31  6:31 gpio: userspace tools Subhashini Rao Beerisetty
2018-09-03 15:58 ` Mayur Nande

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).