1 /* 2 * OLPC HGPK (XO-1) touchpad PS/2 mouse driver 3 */ 4 5 #ifndef _HGPK_H 6 #define _HGPK_H 7 8 enum hgpk_model_t { 9 HGPK_MODEL_PREA = 0x0a, /* pre-B1s */ 10 HGPK_MODEL_A = 0x14, /* found on B1s, PT disabled in hardware */ 11 HGPK_MODEL_B = 0x28, /* B2s, has capacitance issues */ 12 HGPK_MODEL_C = 0x3c, 13 HGPK_MODEL_D = 0x50, /* C1, mass production */ 14 }; 15 16 struct hgpk_data { 17 struct psmouse *psmouse; 18 int powered; 19 int count, x_tally, y_tally; /* hardware workaround stuff */ 20 unsigned long recalib_window; 21 struct delayed_work recalib_wq; 22 }; 23 24 #define hgpk_dbg(psmouse, format, arg...) \ 25 dev_dbg(&(psmouse)->ps2dev.serio->dev, format, ## arg) 26 #define hgpk_err(psmouse, format, arg...) \ 27 dev_err(&(psmouse)->ps2dev.serio->dev, format, ## arg) 28 #define hgpk_info(psmouse, format, arg...) \ 29 dev_info(&(psmouse)->ps2dev.serio->dev, format, ## arg) 30 #define hgpk_warn(psmouse, format, arg...) \ 31 dev_warn(&(psmouse)->ps2dev.serio->dev, format, ## arg) 32 #define hgpk_notice(psmouse, format, arg...) \ 33 dev_notice(&(psmouse)->ps2dev.serio->dev, format, ## arg) 34 35 #ifdef CONFIG_MOUSE_PS2_OLPC 36 int hgpk_detect(struct psmouse *psmouse, int set_properties); 37 int hgpk_init(struct psmouse *psmouse); 38 #else 39 static inline int hgpk_detect(struct psmouse *psmouse, int set_properties) 40 { 41 return -ENODEV; 42 } 43 static inline int hgpk_init(struct psmouse *psmouse) 44 { 45 return -ENODEV; 46 } 47 #endif 48 49 #endif 50