现在的看的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来实现。