struct extcon_dev
时间: 2024-05-12 09:13:20 浏览: 120
该结构体是 Linux 内核中用于表示 USB 外部控制器设备的数据结构。它包含了设备的基本信息、设备的 I/O 请求队列、设备的状态等信息。
以下是该结构体的定义:
```
struct extcon_dev {
struct device dev;
struct list_head list;
struct extcon_devinfo *edev_info;
struct extcon_dev_notifier *notifier;
struct mutex lock;
spinlock_t wq_lock;
wait_queue_head_t wq;
unsigned long state;
struct list_head events;
struct notifier_block nb;
struct kobject *kobj;
struct attribute_group **attr_groups;
struct work_struct work;
struct workqueue_struct *wq_io;
struct extcon_devmon *monitor;
int (*extcon_set_state)(struct extcon_dev *edev, unsigned int id, bool state);
int (*extcon_get_state)(struct extcon_dev *edev, unsigned int id);
void *driver_data;
};
```
阅读全文