All of lore.kernel.org
 help / color / mirror / Atom feed
From: mayur.nan@gmail.com (Mayur Nande)
To: kernelnewbies@lists.kernelnewbies.org
Subject: gpio: userspace tools
Date: Mon, 3 Sep 2018 17:58:33 +0200	[thread overview]
Message-ID: <CA+fM3Xw9FDVOM3NVcu=vmHjC1ekzOCpT+oS4t6O_tq9JgFxGZQ@mail.gmail.com> (raw)
In-Reply-To: <CAPY=qRTaoZstnL2KJf1Y_pKW6vF=1ncA65Y5Yz4ys0Vbm_OeSA@mail.gmail.com>

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

      reply	other threads:[~2018-09-03 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31  6:31 gpio: userspace tools Subhashini Rao Beerisetty
2018-09-03 15:58 ` Mayur Nande [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+fM3Xw9FDVOM3NVcu=vmHjC1ekzOCpT+oS4t6O_tq9JgFxGZQ@mail.gmail.com' \
    --to=mayur.nan@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.