diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-22 13:23:46 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-22 13:23:46 -0400 |
commit | 74511020dde10252f8b8e648690d99dba721de14 (patch) | |
tree | 04fc22bc7dd5d5b8d9294b2e57985b093858bd84 /drivers/input/mouse/alps.c | |
parent | 69266866a5790080d7fe80094b28d670ff8aa765 (diff) | |
parent | 3cc4e53f86dab635166929bfa47cc68d59b28c26 (diff) |
Merge branch 'for-2.6.34' into for-2.6.35
Diffstat (limited to 'drivers/input/mouse/alps.c')
-rw-r--r-- | drivers/input/mouse/alps.c | 49 |
1 files changed, 19 insertions, 30 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index f93c2c0daf1f..7490f1da4a53 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c | |||
@@ -63,6 +63,8 @@ static const struct alps_model_info alps_model_data[] = { | |||
63 | { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, | 63 | { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, |
64 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, | 64 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, |
65 | { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ | 65 | { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */ |
66 | { { 0x52, 0x01, 0x14 }, 0xff, 0xff, | ||
67 | ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ | ||
66 | }; | 68 | }; |
67 | 69 | ||
68 | /* | 70 | /* |
@@ -118,40 +120,27 @@ static void alps_report_buttons(struct psmouse *psmouse, | |||
118 | struct input_dev *dev1, struct input_dev *dev2, | 120 | struct input_dev *dev1, struct input_dev *dev2, |
119 | int left, int right, int middle) | 121 | int left, int right, int middle) |
120 | { | 122 | { |
121 | struct alps_data *priv = psmouse->private; | 123 | struct input_dev *dev; |
122 | const struct alps_model_info *model = priv->i; | ||
123 | |||
124 | if (model->flags & ALPS_PS2_INTERLEAVED) { | ||
125 | struct input_dev *dev; | ||
126 | 124 | ||
127 | /* | 125 | /* |
128 | * If shared button has already been reported on the | 126 | * If shared button has already been reported on the |
129 | * other device (dev2) then this event should be also | 127 | * other device (dev2) then this event should be also |
130 | * sent through that device. | 128 | * sent through that device. |
131 | */ | 129 | */ |
132 | dev = test_bit(BTN_LEFT, dev2->key) ? dev2 : dev1; | 130 | dev = test_bit(BTN_LEFT, dev2->key) ? dev2 : dev1; |
133 | input_report_key(dev, BTN_LEFT, left); | 131 | input_report_key(dev, BTN_LEFT, left); |
134 | 132 | ||
135 | dev = test_bit(BTN_RIGHT, dev2->key) ? dev2 : dev1; | 133 | dev = test_bit(BTN_RIGHT, dev2->key) ? dev2 : dev1; |
136 | input_report_key(dev, BTN_RIGHT, right); | 134 | input_report_key(dev, BTN_RIGHT, right); |
137 | 135 | ||
138 | dev = test_bit(BTN_MIDDLE, dev2->key) ? dev2 : dev1; | 136 | dev = test_bit(BTN_MIDDLE, dev2->key) ? dev2 : dev1; |
139 | input_report_key(dev, BTN_MIDDLE, middle); | 137 | input_report_key(dev, BTN_MIDDLE, middle); |
140 | 138 | ||
141 | /* | 139 | /* |
142 | * Sync the _other_ device now, we'll do the first | 140 | * Sync the _other_ device now, we'll do the first |
143 | * device later once we report the rest of the events. | 141 | * device later once we report the rest of the events. |
144 | */ | 142 | */ |
145 | input_sync(dev2); | 143 | input_sync(dev2); |
146 | } else { | ||
147 | /* | ||
148 | * For devices with non-interleaved packets we know what | ||
149 | * device buttons belong to so we can simply report them. | ||
150 | */ | ||
151 | input_report_key(dev1, BTN_LEFT, left); | ||
152 | input_report_key(dev1, BTN_RIGHT, right); | ||
153 | input_report_key(dev1, BTN_MIDDLE, middle); | ||
154 | } | ||
155 | } | 144 | } |
156 | 145 | ||
157 | static void alps_process_packet(struct psmouse *psmouse) | 146 | static void alps_process_packet(struct psmouse *psmouse) |