现在的看的linux3.3内核i2c 的总线驱动中i2c_adapter结构为:
struct i2c_adapter {
struct module *owner;
unsigned int class; /* classes to allow probing for */
const struct i2c_algorithm *algo; /* the algorithm to access the bus */
void *algo_data;
/* data fields that are valid for all devices */
struct rt_mutex bus_lock;
int timeout; /* in jiffies */
int retries;
struct device dev; /* the adapter device */
int nr;
char name[48];
struct completion dev_released;
struct mutex userspace_clients_lock;
struct list_head userspace_clients;
};
这个表中的内容和LDD3等中的结构体区别在于没用成员变量struct list_head client。所以就不需要进行i2c_attach_client来实现。
本文详细介绍了 Linux 3.3 内核中 i2c 总线驱动的 i2c_adapter 结构体。该结构体包含模块所有者、算法、互斥锁等关键字段,并与 LDD3 中的版本有所不同,不再使用 client 成员变量。

被折叠的 条评论
为什么被折叠?



