Hi all,
I am new to linux device driver development. I have to develop a SPI driver for MPC8377 processor based board. Right now I don't have a that board ready(but I have the MPC837xERDB with me), so I was thinking of developing and testing it on the RDB. But in MPC837xERDB, I don't have an SPI slave device, the SPI pins on the board is connected to the SD card slot. Is it possible to use SD card slot as SPI device? Also I have written a sample SPI driver, but its probe function is not getting called? #include <linux/module.h> #include <linux/spi/spi.h> static int __devinit spi_probe(struct spi_device *spi) { printk(KERN_DEBUG "spi_probe..."); return 0; } static int __devexit spi_remove(struct spi_device *spi) { printk(KERN_DEBUG "spi_remove\n"); return 0; } static struct spi_driver sample_spi_driver = { .driver = { .name = "sample-spi", .bus = &spi_bus_type, .owner = THIS_MODULE, }, .probe = spi_probe, .remove = spi_remove, }; static __init int spi_module_init(void) { printk(KERN_INFO "SPI Driver Version 0.1\n"); return spi_register_driver(&sample_spi_driver); } static __exit void spi_module_exit(void) { /* unregister SPI device */ spi_unregister_driver(&sample_spi_driver); } MODULE_LICENSE("GPL"); module_init(spi_module_init); module_exit(spi_module_exit); Any help would be greatly appreciated. Thanks in advance, Ravi
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev