This source file includes following definitions.
- hgpk_module_init
1
2
3
4
5
6 #ifndef _HGPK_H
7 #define _HGPK_H
8
9 #define HGPK_GS 0xff
10 #define HGPK_PT 0xcf
11
12 enum hgpk_model_t {
13 HGPK_MODEL_PREA = 0x0a,
14 HGPK_MODEL_A = 0x14,
15 HGPK_MODEL_B = 0x28,
16 HGPK_MODEL_C = 0x3c,
17 HGPK_MODEL_D = 0x50,
18 };
19
20 enum hgpk_spew_flag {
21 NO_SPEW,
22 MAYBE_SPEWING,
23 SPEW_DETECTED,
24 RECALIBRATING,
25 };
26
27 #define SPEW_WATCH_COUNT 42
28
29 enum hgpk_mode {
30 HGPK_MODE_MOUSE,
31 HGPK_MODE_GLIDESENSOR,
32 HGPK_MODE_PENTABLET,
33 HGPK_MODE_INVALID
34 };
35
36 struct hgpk_data {
37 struct psmouse *psmouse;
38 enum hgpk_mode mode;
39 bool powered;
40 enum hgpk_spew_flag spew_flag;
41 int spew_count, x_tally, y_tally;
42 unsigned long recalib_window;
43 struct delayed_work recalib_wq;
44 int abs_x, abs_y;
45 int dupe_count;
46 int xbigj, ybigj, xlast, ylast;
47 int xsaw_secondary, ysaw_secondary;
48 };
49
50 int hgpk_detect(struct psmouse *psmouse, bool set_properties);
51 int hgpk_init(struct psmouse *psmouse);
52
53 #ifdef CONFIG_MOUSE_PS2_OLPC
54 void hgpk_module_init(void);
55 #else
56 static inline void hgpk_module_init(void)
57 {
58 }
59 #endif
60
61 #endif