aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/hgpk.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/hgpk.h')
-rw-r--r--drivers/input/mouse/hgpk.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/input/mouse/hgpk.h b/drivers/input/mouse/hgpk.h
new file mode 100644
index 000000000000..a4b2a96f5f54
--- /dev/null
+++ b/drivers/input/mouse/hgpk.h
@@ -0,0 +1,49 @@
1/*
2 * OLPC HGPK (XO-1) touchpad PS/2 mouse driver
3 */
4
5#ifndef _HGPK_H
6#define _HGPK_H
7
8enum 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
16struct 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
36int hgpk_detect(struct psmouse *psmouse, int set_properties);
37int hgpk_init(struct psmouse *psmouse);
38#else
39static inline int hgpk_detect(struct psmouse *psmouse, int set_properties)
40{
41 return -ENODEV;
42}
43static inline int hgpk_init(struct psmouse *psmouse)
44{
45 return -ENODEV;
46}
47#endif
48
49#endif