2010-07-19 09:26:24     Adding SPI devices

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

2010-07-19 09:26:24     Adding SPI devices

Mike Sinkovsky (RUSSIAN FEDERATION)

Message: 91445   

 

I have a question  about  SPI devices configuration.

 

Problem is that I cannot place information about some SPI devices in board file – a do not know exactly configuration ahead of time, I must first read from one SPI device to know if there present other devices.

 

Is there ways to add SPI devices later?

QuoteReplyEditDelete

 

 

2010-07-19 14:07:43     Re: Adding SPI devices

Mike Frysinger (UNITED STATES)

Message: 91460   

 

the only way currently to do it dynamically is to place the resources in a module and load that at runtime.  you could write multiple modules with different setups, or have the module take parameters that correspond to the dynamic settings and then load the module with those set according to your runtime discovery.

QuoteReplyEditDelete

 

 

2010-07-20 05:40:34     Re: Adding SPI devices

Mike Sinkovsky (RUSSIAN FEDERATION)

Message: 91499   

 

If I place SPI resources in module, it don't work at all:

 

root:~> modprobe trikom_tez

trikom_tez: Unknown symbol _spi_register_board_info

modprobe: failed to load module trikom_tez (trikom/trikom_tez.ko): unknown symbol in module, or unknown parameter

 

QuoteReplyEditDelete

 

 

2010-07-20 14:20:41     Re: Adding SPI devices

Mike Frysinger (UNITED STATES)

Message: 91508   

 

hmm, that's obnoxious.  i thought it was exported to modules.

 

i guess you'll need to add the SPI lookup to your early board init, have it modify the resources as desired, and then register the result.

Attachments

    Outcomes