SPI总线驱动分析:
基本数据结构:
链表queue : 为spi controller 提供 任务队列。 每个任务是一个message。
链表transfer_list :message 中存放任务具体内容的队列, 它的内容在应用中填充
struct spi_device {
struct device dev;
struct spi_master *master;
u32 max_speed_hz;
u8 chip_select;
u8 mode;
u8 bits_per_word;
int irq;
void *controller_state;
void *controller_data;
char modalias[32];
/*
* likely need more hooks for more protocol options affecting how
* the controller talks to each chip, like:
* - memory packing (12 bit samples into low bits, others zeroed)
* - priority
* - drop chipselect after each word
* - chipselect del
基本数据结构:
链表queue : 为spi controller 提供 任务队列。 每个任务是一个message。
链表transfer_list :message 中存放任务具体内容的队列, 它的内容在应用中填充
struct spi_device {
struct device dev;
struct spi_master *master;
u32 max_speed_hz;
u8 chip_select;
u8 mode;
u8 bits_per_word;
int irq;
void *controller_state;
void *controller_data;
char modalias[32];
/*
* likely need more hooks for more protocol options affecting how
* the controller talks to each chip, like:
* - memory packing (12 bit samples into low bits, others zeroed)
* - priority
* - drop chipselect after each word
* - chipselect del