|
|
|
Re: How access spi device via spi driver? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
your question is how can I access a device that dose not appear on /dev
directory.
the answer is "mknod" command.
reference:
153 char SPI Bus Interface (sometimes referred to as MicroWire)
0 = /dev/spi0 First SPI device on the bus
1 = /dev/spi1 Second SPI device on the bus
...
15 = /dev/spi15 Sixteenth SPI device on the bus
2007/12/11, Ren Jeffery <finderren@xxxxxxxxx>:
>
> Hello,
> I'm currently running a 2.6.14 Linux on a S3C2440 board.
> With some pre-constraint of our project, I have to keep the current kernel
> version and port the SPI driver from 2.6.22 kernel to 2.6.14 kernel.
> Fortunately, with some minor modifications, I just can compile the
> 2.6.22-version s2c24XX driver with my kernel.
> (I mean no compiling or run-time error.) Then, I tried to test the driver.
>
> From the maillist archive, I got some hints to modify
> arch/arm/mach-s3c2410/mach-<yourboard>.c in a similar way as I found in
> (SPI for dummies (s3c2410) http://www.spinics.net/lists/arm/msg12470.html)
>
> Now, I wonder what's the next step?
> I found there's batch of spi relating files appear in sysfs.
> [root@arm-linux /]# find . -name "*spi*" -print
> ./sys/module/spidev
> ./sys/class/spidev
> ./sys/class/spi_master
> ./sys/bus/spi
> ./sys/bus/spi/drivers/spidev
> ./sys/bus/platform/devices/s3c2410-spi.0
> ./sys/devices/platform/s3c2410-spi.0
>
> But, there's no spi device under /dev. How could I add spi devices on spi
> bus and access?
> Yes, I'm a newbie to linux device driver. Thanks advance, and appreciate
> your reply!
>
> Nice day,
> Jeff
> -------------------------------------------------------------------
> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
> FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
> Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
>
--
Visual
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Linux ARM] [Linux ARM MSM] [Linux ARM Kernel] [Fedora ARM] [IETF Annouce] [Security] [Bugtraq] [Linux] [Linux OMAP] [Linux MIPS] [ECOS] [Asterisk Internet PBX] [Linux API]
![]() |
![]() |