hbtp_input.h 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _HBTP_INPUT_H
  2. #define _HBTP_INPUT_H
  3. #include <linux/input.h>
  4. #define HBTP_MAX_FINGER 10
  5. struct hbtp_input_touch {
  6. bool active;
  7. __s32 tool;
  8. __s32 x;
  9. __s32 y;
  10. __s32 pressure;
  11. __s32 major;
  12. __s32 minor;
  13. __s32 orientation;
  14. };
  15. struct hbtp_input_mt {
  16. __s32 num_touches;
  17. struct hbtp_input_touch touches[HBTP_MAX_FINGER];
  18. };
  19. struct hbtp_input_absinfo {
  20. bool active;
  21. __u16 code;
  22. __s32 minimum;
  23. __s32 maximum;
  24. };
  25. enum hbtp_afe_power_cmd {
  26. HBTP_AFE_POWER_ON,
  27. HBTP_AFE_POWER_OFF,
  28. };
  29. /* ioctl */
  30. #define HBTP_INPUT_IOCTL_BASE 'T'
  31. #define HBTP_SET_ABSPARAM _IOW(HBTP_INPUT_IOCTL_BASE, 201, \
  32. struct hbtp_input_absinfo *)
  33. #define HBTP_SET_TOUCHDATA _IOW(HBTP_INPUT_IOCTL_BASE, 202, \
  34. struct hbtp_input_mt)
  35. #define HBTP_SET_POWERSTATE _IOW(HBTP_INPUT_IOCTL_BASE, 203, \
  36. enum hbtp_afe_power_cmd)
  37. #endif /* _HBTP_INPUT_H */