[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/51676 (Enhancement - interrupt support for RPI gpio, kevents for gpio.c, PPS driver for gpio, and more)
The following reply was made to PR kern/51676; it has been noted by GNATS.
From: Brad Spencer <brad%anduin.eldar.org@localhost>
Cc: thorpej%NetBSD.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/51676 (Enhancement - interrupt support for RPI gpio,
kevents for gpio.c, PPS driver for gpio, and more)
Date: Tue, 01 May 2018 13:42:35 -0400
Jason Thorpe <thorpej%me.com@localhost> writes:
> > On May 1, 2018, at 5:15 AM, Brad Spencer <brad%anduin.eldar.org@localhost> =
> > Hello...
> > I was the one who put in this PR.. You may want to visit my web site:
> Hey Brad thanks for following up. Cool stuff! The project
> I am using this for is a Nixie tube display clock.
Oh, ya, those are fun. Post some pictures when you get it working.
> > I have not had time to update anything to support the FDTization that
> > occurred with the RPI, so all patches are very much pre-FDT. Sorry...
> > I was also mostly unclear if the RPI will support interrupts coming to
> > more than one CPU core. Right now, the patches pretty much have CPU0
> > handle the interrupts. This won't be a problem for PPS, but may very
> > well be a problem if there is a high number of interrupts occurring on =
> > pin, such as what can happen here:
> I'll have a look in the documentation. I am doing my Nixie
> project on a Pi B+, but I also have a Pi 3 for general hackery (and
> eventually a cocktail table game system with important titles like Ms
> Pac Man and Galaga), so if I can figure out how to steer interrupts to
> other CPUs, I'll work on it on that platform.
This was an area of the docs that confused me some, and I just wasn't
sure what I was looking at.
> > http://anduin.eldar.org/true-rng
> > for one of the true rng generators I built.
> This is excellent!
Thanks... ya, the true rngs were fun to build. The diode generator
creates around 250,000 interrupts a second, and I found it impossible to
process every interrupt with only one CPU handling the hard interrupt,
so having more then one CPU involved is likely to help in that case.
The gpiorng driver on that page tries to be as MP as possible, but it
can't help the fact that only CPU0 get the hard interrupt.
> > I would love to see GPIO interrupts official for the RPI as well=E2=80=A6=
> Yah, I'll definitely be integrating that part. In particular,
> the thing I'm most interested in is the interrupt support, which
> I will then enhance gpiokeys with (I'd prefer
> to generate the UI events for the buttons on the clock housing [snooze,
> etc] without resorting using an AVR to generate USB events), and I
> really loathe polling :-)
Depending on what is desired some of the rest of the patches might be of
interest. The patches to gpio.c added kevent support for gpio stuff in
general, including interrupts. You can then use the included gpioirq
driver as a simple trigger, which is all it really is anyway, and get
interrupt events into user land. There is some example C code included
that show how to use GPIO kevents.
> Anyway, I'll be working on it in the coming weeks (and I have a
> couple of cross-country flights coming up, so that will give me
> some extra time).
I will be watching out for this.. thanks for picking it up.
> -- thorpej
Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS - http://anduin.eldar.org
Main Index |
Thread Index |