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