From mboxrd@z Thu Jan 1 00:00:00 1970 From: mayur.nan@gmail.com (Mayur Nande) Date: Mon, 3 Sep 2018 17:58:33 +0200 Subject: gpio: userspace tools In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Fri, Aug 31, 2018 at 8:32 AM Subhashini Rao Beerisetty 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