Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I believe this question is a bit more general but here is how it goes :

I have read this article about using pandaboard's SPI, especially the part "Configuring and patching the kernel".

It says that you have to edit the driver to use the SPI, by telling the driver what bus you want to use, and I don't really understand why we would need to do so. If we are compiling the kernel, we specify the arch (omap...) and so I guess that since the toolchain knows what is the target processor, it knows what are the pin numbers of the SPI (clock, miso, mosi, ...).

So what am I missing here ? Why do we need extra configuration ?

share|improve this question
add comment

2 Answers

The extra configuration is telling the kernel what device you've hooked up via SPI and on what pins you connected it. There's no standard answer to that, because there's a wide variety of devices you might connect.

share|improve this answer
    
But why do we need to hardcode this ? it cannot be configured at runtime like for other protocols ? (like speed of tty for instance) –  Thomas Jan 24 at 10:17
add comment
up vote 0 down vote accepted

SPI is meant to be something really hardcoded/for soldered components, as opposed to usb or uart (plug/unplug), that might be a reason why linux "requires" to configure it at compile time.

This is the concept, it is not exactly true : in this article they say spi drivers can be loaded/unloaded on demand, so no need to burn anything at compile time (but a little bit more complicated to implement)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.