[ARM] pxa: Gumstix Verdex PCMCIA support
[linux-2.6/verdex.git] / drivers / input / mouse / hgpk.h
blobd61cfd3ee9cb2f1e176ad0bc10db6330b1a16d3b
1 /*
2 * OLPC HGPK (XO-1) touchpad PS/2 mouse driver
3 */
5 #ifndef _HGPK_H
6 #define _HGPK_H
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 */
16 struct hgpk_data {
17 struct psmouse *psmouse;
18 bool powered;
19 int count, x_tally, y_tally; /* hardware workaround stuff */
20 unsigned long recalib_window;
21 struct delayed_work recalib_wq;
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)
35 #ifdef CONFIG_MOUSE_PS2_OLPC
36 int hgpk_detect(struct psmouse *psmouse, bool set_properties);
37 int hgpk_init(struct psmouse *psmouse);
38 #else
39 static inline int hgpk_detect(struct psmouse *psmouse, bool set_properties)
41 return -ENODEV;
43 static inline int hgpk_init(struct psmouse *psmouse)
45 return -ENODEV;
47 #endif
49 #endif