linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Welling <mwelling@ieee.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Markus Pargmann <mpa@pengutronix.de>,
	Lee Campbell <leecam@google.com>,
	Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>,
	Grant Likely <grant.likely@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH 2/2] tools/gpio: add the gpio-hammer tool
Date: Tue, 31 May 2016 22:43:43 -0500	[thread overview]
Message-ID: <20160601034343.GA3749@deathstar> (raw)
In-Reply-To: <CACRpkdYr8GSmQ-=G4XcTtfrBcKsXUsJOvE7W35Fk-ovDiyaPJA@mail.gmail.com>

On Tue, May 31, 2016 at 01:59:42PM +0200, Linus Walleij wrote:
> On Wed, Apr 27, 2016 at 6:00 PM, Michael Welling <mwelling@ieee.org> wrote:
> > On Tue, Apr 26, 2016 at 10:54:26AM +0200, Linus Walleij wrote:
> >> The gpio-hammer is used from userspace as an example of how
> >> to retrieve a GPIO handle for one or several GPIO lines and
> >> hammer the outputs from low to high and back again. It will
> >> pulse the selected lines once per second for a specified
> >> number of times or indefinitely if no loop count is
> >> supplied.
> >>
> >> Example output:
> >> $ gpio-hammer -n gpiochip0 -o5 -o6 -o7
> >> Hammer lines [5, 6, 7] on gpiochip0, initial states: [1, 1, 1]
> >> [-] [5: 0, 6: 0, 7: 0]
> >>
> >> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> >
> > Tested-by: Michael Welling <mwelling@ieee.org>
> 
> Thanks! :)

No problem. I wish I could help more.
I like how the support has progressed.

Did you ever find a solution for the exhausted char dev problem?

> 
> > Below is the output from my target.
> 
> You can now get rid of all the "unnamed" in the first column
> by supplying the line/rail names in gpio-line-names = "A", "B" ...;
> in the GPIO controller node in the device tree for the platform,
> if it uses device tree too boot.

Yeah I saw that.. not bored enough to name all of the GPIOs.

> 
> > You will notice that a kernel warning is
> > spewed out if I use the mcp23s08.
> > The processor GPIOs work fine as verified by blinking LEDs.
> >
> > root@som3517-som200:~# ./lsgpio
> > GPIO chip: gpiochip4, "mcp23s08", 8 GPIO lines
> >         line  0: unnamed unused
> >         line  1: unnamed unused
> >         line  2: unnamed unused
> >         line  3: unnamed unused
> >         line  4: unnamed unused
> >         line  5: unnamed unused
> >         line  6: unnamed unused
> >         line  7: unnamed unused
> 
> > root@som3517-som200:~# ./gpio-hammer -n gpiochip4 -o0
> > [  187.511606] ------------[ cut here ]------------
> > [  187.516949] WARNING: CPU: 0 PID: 830 at /home/michael/projects/linux/linux-git/drivers/gpio/gpiolib.c:1907 gpiod_get_value+0x60/0xa4
> 
> Ah that's right, I have to use gpiod_get_value_cansleep(). Will
> fix that.
> 
> Yours,
> Linus Walleij

  reply	other threads:[~2016-06-01  3:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  8:54 [PATCH 1/2] gpio: userspace ABI for reading/writing GPIO lines Linus Walleij
2016-04-26  8:54 ` [PATCH 2/2] tools/gpio: add the gpio-hammer tool Linus Walleij
2016-04-27 16:00   ` Michael Welling
2016-05-31 11:59     ` Linus Walleij
2016-06-01  3:43       ` Michael Welling [this message]
2016-06-01 17:35         ` Linus Walleij
2016-06-01 18:09           ` Michael Welling
2016-06-01 21:40             ` Linus Walleij
2016-06-02 14:59               ` Michael Welling
2016-06-15  9:48                 ` Linus Walleij
2016-04-28  7:47   ` Alexander Stein
2016-04-26 16:44 ` [PATCH 1/2] gpio: userspace ABI for reading/writing GPIO lines Dmitry Torokhov
2016-05-27 13:22   ` Linus Walleij
2016-05-27 17:36     ` Dmitry Torokhov

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=20160601034343.GA3749@deathstar \
    --to=mwelling@ieee.org \
    --cc=acourbot@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=bamvor.zhangjian@linaro.org \
    --cc=broonie@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=johan@kernel.org \
    --cc=leecam@google.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    /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 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).