Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Fujitsu B-series Lifebook PS/2 TouchScreen driver |
| 3 | * |
| 4 | * Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz> |
| 5 | * Copyright (c) 2005 Kenan Esau <kenan.esau@conan.de> |
| 6 | * |
| 7 | * TouchScreen detection, absolute mode setting and packet layout is taken from |
| 8 | * Harald Hoyer's description of the device. |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify it |
| 11 | * under the terms of the GNU General Public License version 2 as published by |
| 12 | * the Free Software Foundation. |
| 13 | */ |
| 14 | |
| 15 | #include <linux/input.h> |
| 16 | #include <linux/serio.h> |
| 17 | #include <linux/libps2.h> |
| 18 | #include <linux/dmi.h> |
| 19 | |
| 20 | #include "psmouse.h" |
| 21 | #include "lifebook.h" |
| 22 | |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 23 | struct lifebook_data { |
| 24 | struct input_dev *dev2; /* Relative device */ |
| 25 | char phys[32]; |
| 26 | }; |
| 27 | |
Dmitry Torokhov | e7afcd1 | 2007-04-12 01:36:25 -0400 | [diff] [blame] | 28 | static const char *desired_serio_phys; |
| 29 | |
Jeff Garzik | 1855256 | 2007-10-03 15:15:40 -0400 | [diff] [blame] | 30 | static int lifebook_set_serio_phys(const struct dmi_system_id *d) |
Dmitry Torokhov | e7afcd1 | 2007-04-12 01:36:25 -0400 | [diff] [blame] | 31 | { |
| 32 | desired_serio_phys = d->driver_data; |
| 33 | return 0; |
| 34 | } |
| 35 | |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 36 | static unsigned char lifebook_use_6byte_proto; |
| 37 | |
Jeff Garzik | 1855256 | 2007-10-03 15:15:40 -0400 | [diff] [blame] | 38 | static int lifebook_set_6byte_proto(const struct dmi_system_id *d) |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 39 | { |
| 40 | lifebook_use_6byte_proto = 1; |
| 41 | return 0; |
| 42 | } |
| 43 | |
Jeff Garzik | 1855256 | 2007-10-03 15:15:40 -0400 | [diff] [blame] | 44 | static const struct dmi_system_id lifebook_dmi_table[] = { |
Andrew Morton | b1b2965 | 2006-11-02 23:27:44 -0500 | [diff] [blame] | 45 | { |
| 46 | .ident = "FLORA-ie 55mi", |
| 47 | .matches = { |
| 48 | DMI_MATCH(DMI_PRODUCT_NAME, "FLORA-ie 55mi"), |
| 49 | }, |
| 50 | }, |
| 51 | { |
| 52 | .ident = "LifeBook B", |
| 53 | .matches = { |
| 54 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B Series"), |
| 55 | }, |
| 56 | }, |
| 57 | { |
| 58 | .ident = "Lifebook B", |
| 59 | .matches = { |
| 60 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"), |
| 61 | }, |
| 62 | }, |
| 63 | { |
Dmitry Torokhov | 6b9ff69 | 2009-04-24 12:01:47 -0700 | [diff] [blame^] | 64 | .ident = "Lifebook B-2130", |
| 65 | .matches = { |
| 66 | DMI_MATCH(DMI_BOARD_NAME, "ZEPHYR"), |
| 67 | }, |
| 68 | }, |
| 69 | { |
Andrew Morton | b1b2965 | 2006-11-02 23:27:44 -0500 | [diff] [blame] | 70 | .ident = "Lifebook B213x/B2150", |
| 71 | .matches = { |
| 72 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B2131/B2133/B2150"), |
| 73 | }, |
| 74 | }, |
| 75 | { |
| 76 | .ident = "Zephyr", |
| 77 | .matches = { |
| 78 | DMI_MATCH(DMI_PRODUCT_NAME, "ZEPHYR"), |
| 79 | }, |
| 80 | }, |
| 81 | { |
| 82 | .ident = "CF-18", |
| 83 | .matches = { |
| 84 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"), |
| 85 | }, |
Dmitry Torokhov | e7afcd1 | 2007-04-12 01:36:25 -0400 | [diff] [blame] | 86 | .callback = lifebook_set_serio_phys, |
| 87 | .driver_data = "isa0060/serio3", |
Andrew Morton | b1b2965 | 2006-11-02 23:27:44 -0500 | [diff] [blame] | 88 | }, |
| 89 | { |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 90 | .ident = "Panasonic CF-28", |
| 91 | .matches = { |
| 92 | DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"), |
| 93 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-28"), |
| 94 | }, |
| 95 | .callback = lifebook_set_6byte_proto, |
| 96 | }, |
| 97 | { |
Dmitry Torokhov | 43887ba | 2007-04-25 00:39:31 -0400 | [diff] [blame] | 98 | .ident = "Panasonic CF-29", |
| 99 | .matches = { |
| 100 | DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"), |
| 101 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"), |
| 102 | }, |
| 103 | .callback = lifebook_set_6byte_proto, |
| 104 | }, |
| 105 | { |
Dmitry Torokhov | f76f672 | 2007-09-05 00:22:17 -0400 | [diff] [blame] | 106 | .ident = "CF-72", |
| 107 | .matches = { |
| 108 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-72"), |
| 109 | }, |
| 110 | .callback = lifebook_set_serio_phys, |
| 111 | .driver_data = "isa0060/serio3", |
| 112 | }, |
| 113 | { |
Andrew Morton | b1b2965 | 2006-11-02 23:27:44 -0500 | [diff] [blame] | 114 | .ident = "Lifebook B142", |
| 115 | .matches = { |
| 116 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B142"), |
| 117 | }, |
| 118 | }, |
| 119 | { } |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 120 | }; |
| 121 | |
David Howells | 7d12e78 | 2006-10-05 14:55:46 +0100 | [diff] [blame] | 122 | static psmouse_ret_t lifebook_process_byte(struct psmouse *psmouse) |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 123 | { |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 124 | struct lifebook_data *priv = psmouse->private; |
| 125 | struct input_dev *dev1 = psmouse->dev; |
Dmitry Torokhov | e6b20d8 | 2007-07-20 00:29:14 -0400 | [diff] [blame] | 126 | struct input_dev *dev2 = priv ? priv->dev2 : NULL; |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 127 | unsigned char *packet = psmouse->packet; |
| 128 | int relative_packet = packet[0] & 0x08; |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 129 | |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 130 | if (relative_packet || !lifebook_use_6byte_proto) { |
| 131 | if (psmouse->pktcnt != 3) |
| 132 | return PSMOUSE_GOOD_DATA; |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 133 | } else { |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 134 | switch (psmouse->pktcnt) { |
| 135 | case 1: |
| 136 | return (packet[0] & 0xf8) == 0x00 ? |
| 137 | PSMOUSE_GOOD_DATA : PSMOUSE_BAD_DATA; |
| 138 | case 2: |
| 139 | return PSMOUSE_GOOD_DATA; |
| 140 | case 3: |
| 141 | return ((packet[2] & 0x30) << 2) == (packet[2] & 0xc0) ? |
| 142 | PSMOUSE_GOOD_DATA : PSMOUSE_BAD_DATA; |
| 143 | case 4: |
| 144 | return (packet[3] & 0xf8) == 0xc0 ? |
| 145 | PSMOUSE_GOOD_DATA : PSMOUSE_BAD_DATA; |
| 146 | case 5: |
| 147 | return (packet[4] & 0xc0) == (packet[2] & 0xc0) ? |
| 148 | PSMOUSE_GOOD_DATA : PSMOUSE_BAD_DATA; |
| 149 | case 6: |
| 150 | if (((packet[5] & 0x30) << 2) != (packet[5] & 0xc0)) |
| 151 | return PSMOUSE_BAD_DATA; |
| 152 | if ((packet[5] & 0xc0) != (packet[1] & 0xc0)) |
| 153 | return PSMOUSE_BAD_DATA; |
| 154 | break; /* report data */ |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | if (relative_packet) { |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 159 | if (!dev2) |
| 160 | printk(KERN_WARNING "lifebook.c: got relative packet " |
| 161 | "but no relative device set up\n"); |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 162 | } else if (lifebook_use_6byte_proto) { |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 163 | input_report_abs(dev1, ABS_X, |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 164 | ((packet[1] & 0x3f) << 6) | (packet[2] & 0x3f)); |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 165 | input_report_abs(dev1, ABS_Y, |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 166 | 4096 - (((packet[4] & 0x3f) << 6) | (packet[5] & 0x3f))); |
| 167 | } else { |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 168 | input_report_abs(dev1, ABS_X, |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 169 | (packet[1] | ((packet[0] & 0x30) << 4))); |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 170 | input_report_abs(dev1, ABS_Y, |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 171 | 1024 - (packet[2] | ((packet[0] & 0xC0) << 2))); |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 172 | } |
| 173 | |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 174 | input_report_key(dev1, BTN_TOUCH, packet[0] & 0x04); |
| 175 | input_sync(dev1); |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 176 | |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 177 | if (dev2) { |
| 178 | if (relative_packet) { |
| 179 | input_report_rel(dev2, REL_X, |
| 180 | ((packet[0] & 0x10) ? packet[1] - 256 : packet[1])); |
| 181 | input_report_rel(dev2, REL_Y, |
| 182 | -(int)((packet[0] & 0x20) ? packet[2] - 256 : packet[2])); |
| 183 | } |
| 184 | input_report_key(dev2, BTN_LEFT, packet[0] & 0x01); |
| 185 | input_report_key(dev2, BTN_RIGHT, packet[0] & 0x02); |
| 186 | input_sync(dev2); |
| 187 | } |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 188 | |
| 189 | return PSMOUSE_FULL_PACKET; |
| 190 | } |
| 191 | |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 192 | static int lifebook_absolute_mode(struct psmouse *psmouse) |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 193 | { |
| 194 | struct ps2dev *ps2dev = &psmouse->ps2dev; |
| 195 | unsigned char param; |
| 196 | |
Dmitry Torokhov | 14e9414 | 2005-05-29 02:30:28 -0500 | [diff] [blame] | 197 | if (psmouse_reset(psmouse)) |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 198 | return -1; |
| 199 | |
Dmitry Torokhov | 14e9414 | 2005-05-29 02:30:28 -0500 | [diff] [blame] | 200 | /* |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 201 | Enable absolute output -- ps2_command fails always but if |
| 202 | you leave this call out the touchsreen will never send |
| 203 | absolute coordinates |
Dmitry Torokhov | 14e9414 | 2005-05-29 02:30:28 -0500 | [diff] [blame] | 204 | */ |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 205 | param = lifebook_use_6byte_proto ? 0x08 : 0x07; |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 206 | ps2_command(ps2dev, ¶m, PSMOUSE_CMD_SETRES); |
| 207 | |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 208 | return 0; |
| 209 | } |
| 210 | |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 211 | static void lifebook_relative_mode(struct psmouse *psmouse) |
| 212 | { |
| 213 | struct ps2dev *ps2dev = &psmouse->ps2dev; |
| 214 | unsigned char param = 0x06; |
| 215 | |
| 216 | ps2_command(ps2dev, ¶m, PSMOUSE_CMD_SETRES); |
| 217 | } |
| 218 | |
Dmitry Torokhov | a913829 | 2005-05-29 02:30:37 -0500 | [diff] [blame] | 219 | static void lifebook_set_resolution(struct psmouse *psmouse, unsigned int resolution) |
| 220 | { |
Helge Deller | e38de67 | 2006-09-10 21:54:39 -0400 | [diff] [blame] | 221 | static const unsigned char params[] = { 0, 1, 2, 2, 3 }; |
| 222 | unsigned char p; |
Dmitry Torokhov | a913829 | 2005-05-29 02:30:37 -0500 | [diff] [blame] | 223 | |
| 224 | if (resolution == 0 || resolution > 400) |
| 225 | resolution = 400; |
| 226 | |
Helge Deller | e38de67 | 2006-09-10 21:54:39 -0400 | [diff] [blame] | 227 | p = params[resolution / 100]; |
| 228 | ps2_command(&psmouse->ps2dev, &p, PSMOUSE_CMD_SETRES); |
| 229 | psmouse->resolution = 50 << p; |
Dmitry Torokhov | a913829 | 2005-05-29 02:30:37 -0500 | [diff] [blame] | 230 | } |
| 231 | |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 232 | static void lifebook_disconnect(struct psmouse *psmouse) |
| 233 | { |
Andres Salomon | 653e91d | 2008-01-17 12:01:51 -0500 | [diff] [blame] | 234 | struct lifebook_data *priv = psmouse->private; |
| 235 | |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 236 | psmouse_reset(psmouse); |
Andres Salomon | 653e91d | 2008-01-17 12:01:51 -0500 | [diff] [blame] | 237 | if (priv) { |
| 238 | input_unregister_device(priv->dev2); |
| 239 | kfree(priv); |
| 240 | } |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 241 | psmouse->private = NULL; |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 242 | } |
| 243 | |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 244 | int lifebook_detect(struct psmouse *psmouse, int set_properties) |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 245 | { |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 246 | if (!dmi_check_system(lifebook_dmi_table)) |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 247 | return -1; |
| 248 | |
Dmitry Torokhov | e7afcd1 | 2007-04-12 01:36:25 -0400 | [diff] [blame] | 249 | if (desired_serio_phys && |
| 250 | strcmp(psmouse->ps2dev.serio->phys, desired_serio_phys)) |
| 251 | return -1; |
| 252 | |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 253 | if (set_properties) { |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 254 | psmouse->vendor = "Fujitsu"; |
| 255 | psmouse->name = "Lifebook TouchScreen"; |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 256 | } |
| 257 | |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 258 | return 0; |
Kenan Esau | 02d7f58 | 2005-05-29 02:30:22 -0500 | [diff] [blame] | 259 | } |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 260 | |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 261 | static int lifebook_create_relative_device(struct psmouse *psmouse) |
| 262 | { |
| 263 | struct input_dev *dev2; |
| 264 | struct lifebook_data *priv; |
| 265 | int error = -ENOMEM; |
| 266 | |
| 267 | priv = kzalloc(sizeof(struct lifebook_data), GFP_KERNEL); |
| 268 | dev2 = input_allocate_device(); |
| 269 | if (!priv || !dev2) |
| 270 | goto err_out; |
| 271 | |
| 272 | priv->dev2 = dev2; |
| 273 | snprintf(priv->phys, sizeof(priv->phys), |
| 274 | "%s/input1", psmouse->ps2dev.serio->phys); |
| 275 | |
| 276 | dev2->phys = priv->phys; |
| 277 | dev2->name = "PS/2 Touchpad"; |
| 278 | dev2->id.bustype = BUS_I8042; |
| 279 | dev2->id.vendor = 0x0002; |
| 280 | dev2->id.product = PSMOUSE_LIFEBOOK; |
| 281 | dev2->id.version = 0x0000; |
| 282 | dev2->dev.parent = &psmouse->ps2dev.serio->dev; |
| 283 | |
Jiri Slaby | 7b19ada | 2007-10-18 23:40:32 -0700 | [diff] [blame] | 284 | dev2->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); |
| 285 | dev2->relbit[BIT_WORD(REL_X)] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); |
| 286 | dev2->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | |
| 287 | BIT_MASK(BTN_RIGHT); |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 288 | |
| 289 | error = input_register_device(priv->dev2); |
| 290 | if (error) |
| 291 | goto err_out; |
| 292 | |
| 293 | psmouse->private = priv; |
| 294 | return 0; |
| 295 | |
| 296 | err_out: |
| 297 | input_free_device(dev2); |
| 298 | kfree(priv); |
| 299 | return error; |
| 300 | } |
| 301 | |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 302 | int lifebook_init(struct psmouse *psmouse) |
| 303 | { |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 304 | struct input_dev *dev1 = psmouse->dev; |
Dmitry Torokhov | 62e729b | 2007-10-12 14:19:50 -0400 | [diff] [blame] | 305 | int max_coord = lifebook_use_6byte_proto ? 4096 : 1024; |
Dmitry Torokhov | 2e5b636 | 2005-09-15 02:01:44 -0500 | [diff] [blame] | 306 | |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 307 | if (lifebook_absolute_mode(psmouse)) |
| 308 | return -1; |
| 309 | |
Jiri Slaby | 7b19ada | 2007-10-18 23:40:32 -0700 | [diff] [blame] | 310 | dev1->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 311 | dev1->relbit[0] = 0; |
Jiri Slaby | 7b19ada | 2007-10-18 23:40:32 -0700 | [diff] [blame] | 312 | dev1->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 313 | input_set_abs_params(dev1, ABS_X, 0, max_coord, 0, 0); |
| 314 | input_set_abs_params(dev1, ABS_Y, 0, max_coord, 0, 0); |
| 315 | |
| 316 | if (!desired_serio_phys) { |
| 317 | if (lifebook_create_relative_device(psmouse)) { |
| 318 | lifebook_relative_mode(psmouse); |
| 319 | return -1; |
| 320 | } |
| 321 | } |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 322 | |
| 323 | psmouse->protocol_handler = lifebook_process_byte; |
Dmitry Torokhov | a913829 | 2005-05-29 02:30:37 -0500 | [diff] [blame] | 324 | psmouse->set_resolution = lifebook_set_resolution; |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 325 | psmouse->disconnect = lifebook_disconnect; |
| 326 | psmouse->reconnect = lifebook_absolute_mode; |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 327 | |
Dmitry Torokhov | 2ebdcc6 | 2007-04-25 00:39:53 -0400 | [diff] [blame] | 328 | psmouse->model = lifebook_use_6byte_proto ? 6 : 3; |
| 329 | |
Dmitry Torokhov | 1b11879 | 2007-04-12 01:36:34 -0400 | [diff] [blame] | 330 | /* |
| 331 | * Use packet size = 3 even when using 6-byte protocol because |
| 332 | * that's what POLL will return on Lifebooks (according to spec). |
| 333 | */ |
Dmitry Torokhov | a15d60f | 2005-05-29 02:30:32 -0500 | [diff] [blame] | 334 | psmouse->pktsize = 3; |
| 335 | |
| 336 | return 0; |
| 337 | } |
| 338 | |