Home Linux Community Forums Hardware Drivers SPI Driver with multiple chip selects

SPI Driver with multiple chip selects

Link to this post 26 Dec 11

I wrote spi eeprom driver that reads and writes from eeprom device.
I used spi char device api to connect the driver to linux kernel.
I want to modify the driver to support multiple eeprom devices. Each SPI device is connected to single chip select. The spi_add_device api gets structure containing single and unique spi chip select. How can I build SPI device driver with single “father” that holds the chip protocol and below it many “kids” that holds the chip select info
I’d like to know, what is the best way to implement this driver?
Attached the driver skeleton.
Thank you for your help
Yaniv Lankry
HW SW Board support Team

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board