tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Using SPI devices from userspace on the RPI, or from anything NetBSD for that matter?



Yeah... finally managed to find a moment to package them up:

https://ftp.netbsd.org/pub/NetBSD/misc/jakllsch/20161231/spigen-20161231.tar.gz

(this tarball may also be found attached)

Example config(5) file addition:

spigen0 at spi1 slave 0

Included in the tarball is an example that attempts to read a JEDEC ID
number from a "25"-series (such as Winbond W25Q80) SPI NOR Flash ROM.

Hope this helps.

Folks on tech-kern@: Feel free to review the API...  It's probably
lacking flexibility the Linux spidev API has.

	Jonathan Kollasch

On Wed, Dec 14, 2016 at 09:21:52AM -0800, Brian Buhrow wrote:
> 
> Would you be willing to share those local patches? 
> -thanks
> -Brian
> 
> 
> sent on the hoof
> 
> > On Dec 14, 2016, at 7:51 AM, Jonathan A. Kollasch <jakllsch%kollasch.net@localhost> wrote:
> > 
> >> On Tue, Dec 13, 2016 at 10:42:26PM -0800, Brian Buhrow wrote:
> >>    hello.  I'm working on a project where I think I'll be wanting to talk
> >> to an SPI connected LCD or LED display on an Rasberry Pi.  What I envision
> >> doing with it shouldn't require a kernel level driver given the fact that
> >> we already have the SPI(4) framework.  My question is, how can a user-space
> >> program  read from or write to  a SPI connected peripheral?  I've found the
> >> gpioctl(8) program and gpio( devices for talking to GPIO connected devices,
> >> but I don't see how to speak to SPI connected things.  Can anyone enlighten
> >> me?  I realize I may be asking a very elementary question, but my
> >> documentation searches haven't revealed what I want for NetBSD.  I've found
> >> such documents for Linux, but I'd really like to use NetBSD for this
> >> project.
> >> 
> >> Any thoughts would be greatly appreciated.
> >> -thanks
> >> -Brian
> > 
> > spi(4) does not currently expose access to userland.  I've got local
> > patches that do however..
> > 
> >    Jonathan Kollasch
> 

Attachment: spigen-20161231.tar.gz
Description: Binary data



Home | Main Index | Thread Index | Old Index