I have add some code  for spi_board_info just as:    
spi_board_info dm355_spi_board_info[] ={    
//add by duke 2009.6.18
        {
         .modalias = "spidev",
         .platform_data = NULL,//&davinci_8k_spi_eeprom_info,
         .mode = SPI_MODE_0,
         .irq = 0,
         .max_speed_hz = 2 * 1000 * 1000 /* max sample rate at 3V */ ,
         .bus_num = 65535,
         .chip_select = 0,
         },
.....................
but the spidev_probe cann't been call yet!why?the modalias name is the same as 
the spidev_spi name
static struct spi_driver spidev_spi = {
.driver = {
.name = "spidev",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
},
.probe = spidev_probe,
.remove = __devexit_p(spidev_remove),
/* NOTE:  suspend/resume methods are not necessary here.
 * We don't do anything except pass the requests to/from
 * the underlying controller.  The refrigerator handles
 * most issues; the controller driver handles the rest.
 */
};

2009-06-23 



zuowenping 



发件人: zuowenping 
发送时间: 2009-06-23  10:00:27 
收件人: davinci-linux-open-source 
抄送: 
主题: Re: how can i use spi in dm355? 
 
I have read the source code ,davinci_spi_board_init() must support board info 
for the spidev driver ,just like the spi_eeprom example,but i don't know how 
can i support the board info? i have insmod the module spidev.ko,but i cann't 
prouduce the device inode /dev/spi*.* ,so it must the spidev_probe() function  
cann't been callback!


2009-06-23 



zuowenping 



发件人: zuowenping 
发送时间: 2009-06-22  16:34:45 
收件人: davinci-linux-open-source 
抄送: chris-meng 
主题: how can i use spi in dm355? 
dear all:
       I am using mv_pro_4.0.1  in dm355 platform,now i want to use spi0 and 
spi1 to communication with other devices which is  like using i2c open() , 
read() ,and write() to various device by sub address in userspace. My linux 
kernel is 2.6.10,I have find the spidev.c and spidev_test.c in linux2.6.30,So i 
have transplanted the spidev.c as a module in linux kernel 2.6.10,but when i 
insmod the module,i cann't find the needful device in /dev/ path,so i cann't 
run spidev_test.c to test spi,I think there may be some errors in dm355 device 
driver,but i don't know how to modify it? Any help will be appreciated!

2009-06-22 



zuowenping 
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to