touchscreen.h 763 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2014 Sebastian Reichel <[email protected]>
  4. */
  5. #ifndef _TOUCHSCREEN_H
  6. #define _TOUCHSCREEN_H
  7. struct input_dev;
  8. struct input_mt_pos;
  9. struct touchscreen_properties {
  10. unsigned int max_x;
  11. unsigned int max_y;
  12. bool invert_x;
  13. bool invert_y;
  14. bool swap_x_y;
  15. };
  16. void touchscreen_parse_properties(struct input_dev *input, bool multitouch,
  17. struct touchscreen_properties *prop);
  18. void touchscreen_set_mt_pos(struct input_mt_pos *pos,
  19. const struct touchscreen_properties *prop,
  20. unsigned int x, unsigned int y);
  21. void touchscreen_report_pos(struct input_dev *input,
  22. const struct touchscreen_properties *prop,
  23. unsigned int x, unsigned int y,
  24. bool multitouch);
  25. #endif