aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/hgpk.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 17:45:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-07 17:45:47 -0500
commit31b6ca0af758a88e5e769b48cc6dde037ee37b96 (patch)
treee1968d7168affb25e33e2be2d1d102f94af98af0 /drivers/input/mouse/hgpk.h
parent56b85f32d530d09d6805488ad00775d4e0e3baab (diff)
parent554738da71004d96e06fb75f4772dfc3b0f47810 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (58 commits) Input: wacom_w8001 - support pen or touch only devices Input: wacom_w8001 - use __set_bit to set keybits Input: bu21013_ts - fix misuse of logical operation in place of bitop Input: i8042 - add Acer Aspire 5100 to the Dritek list Input: wacom - add support for digitizer in Lenovo W700 Input: psmouse - disable the synaptics extension on OLPC machines Input: psmouse - fix up Synaptics comment Input: synaptics - ignore bogus mt packet Input: synaptics - add multi-finger and semi-mt support Input: synaptics - report clickpad property input: mt: Document interface updates Input: fix double equality sign in uevent Input: introduce device properties hid: egalax: Add support for Wetab (726b) Input: include MT library as source for kerneldoc MAINTAINERS: Update input-mt entry hid: egalax: Add support for Samsung NB30 netbook hid: egalax: Document the new devices in Kconfig hid: egalax: Add support for Wetab hid: egalax: Convert to MT slots ... Fixed up trivial conflict in drivers/input/keyboard/Kconfig
Diffstat (limited to 'drivers/input/mouse/hgpk.h')
-rw-r--r--drivers/input/mouse/hgpk.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/input/mouse/hgpk.h b/drivers/input/mouse/hgpk.h
index d61cfd3ee9cb..311c0e87fcbf 100644
--- a/drivers/input/mouse/hgpk.h
+++ b/drivers/input/mouse/hgpk.h
@@ -5,6 +5,9 @@
5#ifndef _HGPK_H 5#ifndef _HGPK_H
6#define _HGPK_H 6#define _HGPK_H
7 7
8#define HGPK_GS 0xff /* The GlideSensor */
9#define HGPK_PT 0xcf /* The PenTablet */
10
8enum hgpk_model_t { 11enum hgpk_model_t {
9 HGPK_MODEL_PREA = 0x0a, /* pre-B1s */ 12 HGPK_MODEL_PREA = 0x0a, /* pre-B1s */
10 HGPK_MODEL_A = 0x14, /* found on B1s, PT disabled in hardware */ 13 HGPK_MODEL_A = 0x14, /* found on B1s, PT disabled in hardware */
@@ -13,12 +16,34 @@ enum hgpk_model_t {
13 HGPK_MODEL_D = 0x50, /* C1, mass production */ 16 HGPK_MODEL_D = 0x50, /* C1, mass production */
14}; 17};
15 18
19enum hgpk_spew_flag {
20 NO_SPEW,
21 MAYBE_SPEWING,
22 SPEW_DETECTED,
23 RECALIBRATING,
24};
25
26#define SPEW_WATCH_COUNT 42 /* at 12ms/packet, this is 1/2 second */
27
28enum hgpk_mode {
29 HGPK_MODE_MOUSE,
30 HGPK_MODE_GLIDESENSOR,
31 HGPK_MODE_PENTABLET,
32 HGPK_MODE_INVALID
33};
34
16struct hgpk_data { 35struct hgpk_data {
17 struct psmouse *psmouse; 36 struct psmouse *psmouse;
37 enum hgpk_mode mode;
18 bool powered; 38 bool powered;
19 int count, x_tally, y_tally; /* hardware workaround stuff */ 39 enum hgpk_spew_flag spew_flag;
40 int spew_count, x_tally, y_tally; /* spew detection */
20 unsigned long recalib_window; 41 unsigned long recalib_window;
21 struct delayed_work recalib_wq; 42 struct delayed_work recalib_wq;
43 int abs_x, abs_y;
44 int dupe_count;
45 int xbigj, ybigj, xlast, ylast; /* jumpiness detection */
46 int xsaw_secondary, ysaw_secondary; /* jumpiness detection */
22}; 47};
23 48
24#define hgpk_dbg(psmouse, format, arg...) \ 49#define hgpk_dbg(psmouse, format, arg...) \
@@ -33,9 +58,13 @@ struct hgpk_data {
33 dev_notice(&(psmouse)->ps2dev.serio->dev, format, ## arg) 58 dev_notice(&(psmouse)->ps2dev.serio->dev, format, ## arg)
34 59
35#ifdef CONFIG_MOUSE_PS2_OLPC 60#ifdef CONFIG_MOUSE_PS2_OLPC
61void hgpk_module_init(void);
36int hgpk_detect(struct psmouse *psmouse, bool set_properties); 62int hgpk_detect(struct psmouse *psmouse, bool set_properties);
37int hgpk_init(struct psmouse *psmouse); 63int hgpk_init(struct psmouse *psmouse);
38#else 64#else
65static inline void hgpk_module_init(void)
66{
67}
39static inline int hgpk_detect(struct psmouse *psmouse, bool set_properties) 68static inline int hgpk_detect(struct psmouse *psmouse, bool set_properties)
40{ 69{
41 return -ENODEV; 70 return -ENODEV;