問題: linux i2c 的通訊函數i2c_transfer在什麼狀況下出現錯誤
描述:linux
linux i2c設備驅動函數
本人在寫i2c設備驅動的時候使用i2c transfer函數進行通訊的時候沒法進行讀寫,返回值函數是-11,這個返回值是什麼意思,ui
解決方案1:orm
參考errno-base.h
#define EPERM 1 /* Operation not permitted */
#define ENOENT 2 /* No such file or directory */
#define ESRCH 3 /* No such process */
#define EINTR 4 /* Interrupted system call */
#define EIO 5 /* I/O error */
#define ENXIO 6 /* No such device or address */
#define E2BIG 7 /* Argument list too long */
#define ENOEXEC 8 /* Exec format error */
#define EBADF 9 /* Bad file number */
#define ECHILD 10 /* No child processes */
#define EAGAIN 11 /* Try again */
#define ENOMEM 12 /* Out of memory */
#define EACCES 13 /* Permission denied */
#define EFAULT 14 /* Bad address */
#define ENOTBLK 15 /* Block device required */it