2010-01-25 07:55:42     SPI in userspace

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2010-01-25 07:55:42     SPI in userspace

Miquel Soler i Mir (SPAIN)

Message: 85086   

 

Hello

 

I'm working with CM-BF537E with Bluetechnix eval_board and 2009R1 kernel and toolchain

 

I would like to acces to SPI device in user space. I has the MMC working in SPI CS=1 and another device in CS=2 (not conneted now)

 

Following the wiki documentation I modified the cm-bf537.c file attached, the device is added in line 57 to 62 and 182 to 191.

 

Compiling the kernel I enable this options:

 

Device Drivers --->

 

Character devices --->

 

[*] SPI support --->

 

--- SPI support

 

*** SPI Master Controller Drivers ***

 

<*> SPI controller driver for ADI Blackfin5xx

 

[ ] SPI bus lock

 

< > emulate SPI bus with Blackfin SPORT

 

<*> Bitbanging SPI master

 

*** SPI Protocol Masters ***

 

< > SPI EEPROMs from most vendors

 

<*> User mode SPI device driver support

 

< > Infineon TLE62X0 (for power switching)

 

The system boot OK, but I don't have any spi device in "/dev" folder. I attached the boot file

 

I think, I'm making something wrong but I don't Know.

 

Can somebody help me

 

Thanks.

 

Miquel Soler i Mir

 

boot.txt

cm_bf537.c

TranslateQuoteReplyEditDelete

 

 

2010-01-25 10:37:26     Re: SPI in userspace

Mike Frysinger (UNITED STATES)

Message: 85091   

 

i see no references to spidev in that file, so either you posted the wrong file or you didnt add the right stuff.  please read the documentation:

  docs.blackfin.uclinux.org/doku.php?id=spi#userspace_driver

QuoteReplyEditDelete

 

 

2010-01-25 11:07:36     Re: SPI in userspace

Miquel Soler i Mir (SPAIN)

Message: 85096   

 

Thanks Mike.

 

My mistake was in line 184, the correct line is :

 

.modalias = "spidev",

 

I did not understand the documentation correctly.

 

Thanks.

 

Miquel Soler i Mir

Attachments

Outcomes