dib-i2c.h 894 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * adapted from different kernel headers
  3. * "this is the current way of doing things."-Greg K-H
  4. *
  5. * everything copied from linux kernel 2.6.10 source
  6. */
  7. #ifndef _DIB_I2C_H
  8. #define _DIB_I2C_H
  9. /* from <linux/i2c.h> */
  10. #define I2C_SLAVE 0x0703
  11. #define I2C_SLAVE_FORCE 0x0706
  12. #define I2C_TENBIT 0x0704
  13. #define I2C_PEC 0x0708
  14. #define I2C_RETRIES 0x0701
  15. #define I2C_TIMEOUT 0x0702
  16. #define I2C_FUNCS 0x0705
  17. #define I2C_RDWR 0x0707
  18. #define I2C_SMBUS 0x0720
  19. struct i2c_msg {
  20. __u16 addr;
  21. __u16 flags;
  22. #define I2C_M_RD 0x0001
  23. #define I2C_M_TEN 0x0010
  24. #define I2C_M_NOSTART 0x4000
  25. #define I2C_M_REV_DIR_ADDR 0x2000
  26. #define I2C_M_IGNORE_NAK 0x1000
  27. #define I2C_M_NO_RD_ACK 0x0800
  28. __u16 len;
  29. __u8 *buf;
  30. };
  31. /* from <linux/i2c-dev.h> */
  32. struct i2c_rdwr_ioctl_data {
  33. struct i2c_msg *msgs;
  34. __u32 nmsgs;
  35. };
  36. #endif