structi2c_bus_recovery_info*bri=adap->bus_recovery_info; if(!bri->recover_bus) { dev_err(&adap->dev,"No recover_bus() found, not using recovery\n"); adap->bus_recovery_info =NULL; gotoexit_recovery; } /* Generic GPIO recovery */ if(bri->recover_bus == i2c_generic_gpio_recover...
structi2c_bus_recovery_info*bus_recovery_info; conststructi2c_adapter_quirks*quirks; structirq_domain*host_notify_domain; structregulator*bus_regulator; }; 几个重要的成员: name:适配器的名称。 nr:适配器的编号。 bus_lock和bus_unlock:用于保护对适配器的并发访问的锁机制。 algo:指向I2C算法结构体的...
MITTI2C BusRecovery Learn 登入 Windows 硬體開發人員 瀏覽 下載 Windows 驅動程式套件範例 疑難排解 資源 儀表板 本主題的部分內容可能是機器或 AI 翻譯。 關閉警示 Device.BusController 其他文件 Device.Cluster Device.Connectivity Device.DevFund Device.Display...
/* owned by the I2C core */ #define I2C_ALF_IS_SUSPENDED 0 #define I2C_ALF_SUSPEND_REPORTED 1 int nr; char name[48]; struct completion dev_released; struct mutex userspace_clients_lock; struct list_head userspace_clients; struct i2c_bus_recovery_info *bus_recovery_info; const struct ...
被测试的总线主机应该使用Linux I2C核心的助手(参见' struct bus_recovery_info ')检测这个条件并触发总线恢复(参见I2C规范版本4,第3.1.16节)。但是,总线恢复不会成功,因为在您使用“echo 1 > SDA”再次手动释放它之前,SDA仍然处于低位。使用“不完全传输”类故障注入器可以进行自动释放测试。
728行的i2c_dw_init_recovery_info是在给dw_i2c_dev结构体(指代一个i2c controller ip)初始化lock-up recovery方法, recovery相关的方法保存在i2c_bus_recovery_info结构体中。 <include/linux/i2c.h> 611 struct i2c_bus_recovery_info { 612 int (*recover_bus)(struct i2c_adapter *adap); /* recovery...
struct i2c_bus_recovery_info *bus_recovery_info; const struct i2c_adapter_quirks *quirks; }; 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 在Linux内核中我们能找到这个结构体,下面我们来讲解一下其中比较重要的成员。
struct i2c_bus_recovery_info *bus_recovery_info: I2C 总线恢复信息的指针。 const struct i2c_adapter_quirks *quirks: I2C 适配器的特殊属性的指针。 i2c_msg struct i2c_msg 提供了在 Linux 内核中定义和组织 I2C 消息的方式,通过 I2C 总线与 I2C 设备进行通信。 struct i2c_msg { __u16 addr; /* sl...
/* 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; struct i2c_bus_recovery_info *bus_recovery_info; const struct i2c_adapter_quirks *qu...
defineI2C_ALF_SUSPEND_REPORTED1intnr;/*I2C bus id*/charname[48];structcompletiondev_released;structmutexuserspace_clients_lock;structlist_headuserspace_clients;structi2c_bus_recovery_info*bus_recovery_info;conststructi2c_adapter_quirks*quirks;structirq_domain*host_notify_domain;structregulator*bus_...