1 /* SPDX-License-Identifier: GPL-2.0 */
3 * OLPC HGPK (XO-1) touchpad PS/2 mouse driver
9 #define HGPK_GS 0xff /* The GlideSensor */
10 #define HGPK_PT 0xcf /* The PenTablet */
13 HGPK_MODEL_PREA
= 0x0a, /* pre-B1s */
14 HGPK_MODEL_A
= 0x14, /* found on B1s, PT disabled in hardware */
15 HGPK_MODEL_B
= 0x28, /* B2s, has capacitance issues */
17 HGPK_MODEL_D
= 0x50, /* C1, mass production */
27 #define SPEW_WATCH_COUNT 42 /* at 12ms/packet, this is 1/2 second */
31 HGPK_MODE_GLIDESENSOR
,
37 struct psmouse
*psmouse
;
40 enum hgpk_spew_flag spew_flag
;
41 int spew_count
, x_tally
, y_tally
; /* spew detection */
42 unsigned long recalib_window
;
43 struct delayed_work recalib_wq
;
46 int xbigj
, ybigj
, xlast
, ylast
; /* jumpiness detection */
47 int xsaw_secondary
, ysaw_secondary
; /* jumpiness detection */
50 int hgpk_detect(struct psmouse
*psmouse
, bool set_properties
);
51 int hgpk_init(struct psmouse
*psmouse
);
53 #ifdef CONFIG_MOUSE_PS2_OLPC
54 void hgpk_module_init(void);
56 static inline void hgpk_module_init(void)