touchpad.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. /* Elan and Synaptics HID-over-I2C touchpads.
  2. *
  3. * Two backends share this file: the Elan on the Braswell LPSS I2C6 and the
  4. * Synaptics 06CB:7F8F on the Sunrise Point-LP LPSS I2C0 (Yoga 720-13IKB).
  5. * Both use 16-bit HID-over-I2C register addresses; the report decoders differ
  6. * and feed the same touchpad_gesture engine. */
  7. #ifndef TOUCHPAD_H
  8. #define TOUCHPAD_H
  9. /* Probe the LPSS I2C controllers and bring the touchpad up. Returns 1 when
  10. * a device was found. Must run at boot, before processes clone the kernel
  11. * page directory (it maps the I2C MMIO window). */
  12. int touchpad_init(void);
  13. int touchpad_present(void);
  14. /* Identification of the probed device (valid when present). */
  15. unsigned int touchpad_addr(void);
  16. unsigned short touchpad_vendor(void);
  17. unsigned short touchpad_product(void);
  18. /* `touchpad` kernel command: print status, or set the tap gestures with
  19. * `rightclick off|tap|corner|both` / `tapclick on|off`. */
  20. void program_touchpad_main(const char *arg);
  21. /* Poll one input report. Returns 1 when the deltas, scroll or buttons
  22. * changed; pointer values use the mouse layer's PS/2 convention (+dy is up),
  23. * scroll is in pixels (+ = later content). */
  24. int touchpad_poll(int *buttons, int *dx, int *dy, int *scroll);
  25. #endif