• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: SPI from userspace  (Read 2162 times)
shuveb
Newbie
*

Karma: 0
Posts: 1


View Profile
« on: February 25, 2011, 12:11:38 AM »

Hi,

I have compiled a kernel with the orion_spi driver enabled directly into the kernel and also enabled SPI usage from user space. However, I don't see any device files in the /dev directory being created. Also, I tried manually creating character devices with major number 153 and minor numbers 0 and 1, but the test program under Documents/spi in the Linux kernel source tree is unable to open the device successfully. I am able to see spi under major number 153 in the /proc/devices file.

I am trying to use the SPI port on the CPU to communicate with the outside world. I'm having trouble getting started. Any pointers are greatly appreciated.

Some output that could be helpful:

----------------------------
[root@Plugbox ~]# cat /proc/devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 89 i2c
 90 mtd
128 ptm
136 pts
153 spi
180 usb
189 usb_device
253 ttySDIO
254 rtc
----------------------------
[root@Plugbox ~]# ls -l
total 20
-rwxr-xr-x 1 root root 9154 Feb 24 06:12 a.out
-rw-r--r-- 1 root root 4408 Feb 24 06:12 spidev_test.c
[root@Plugbox ~]# ./a.out
can't open device: No such device or address
Aborted
[root@Plugbox ~]#
----------------------------

TIA.
Logged

Pages: [1]
Print
Jump to: