diff options
| -rw-r--r-- | CHANGES | 6 | ||||
| -rw-r--r-- | bcm5974-dkms-mkdeb/debian/changelog | 3 | ||||
| -rw-r--r-- | bcm5974.c | 46 | ||||
| -rw-r--r-- | dkms.conf | 2 |
4 files changed, 36 insertions, 21 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | bcm5974 (0.61) unstable; urgency=low | ||
| 2 | |||
| 3 | * Smoother motion in mouse interface | ||
| 4 | |||
| 5 | -- Henrik Rydberg <rydberg@euromail.se> Mon, 01 Sep 2008 21:01:24 +0200 | ||
| 6 | |||
| 1 | bcm5974 (0.60) unstable; urgency=low | 7 | bcm5974 (0.60) unstable; urgency=low |
| 2 | 8 | ||
| 3 | * New default mouse driver mode | 9 | * New default mouse driver mode |
diff --git a/bcm5974-dkms-mkdeb/debian/changelog b/bcm5974-dkms-mkdeb/debian/changelog index aff6ab4..1ab2521 100644 --- a/bcm5974-dkms-mkdeb/debian/changelog +++ b/bcm5974-dkms-mkdeb/debian/changelog | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | MODULE_NAME-dkms (MODULE_VERSION) unstable; urgency=low | 1 | MODULE_NAME-dkms (MODULE_VERSION) unstable; urgency=low |
| 2 | 2 | ||
| 3 | * New default mouse driver mode | 3 | * Smoother motion in mouse interface |
| 4 | * Mouse configuration parameters | ||
| 5 | 4 | ||
| 6 | -- Henrik Rydberg <rydberg@euromail.se> DATE_STAMP | 5 | -- Henrik Rydberg <rydberg@euromail.se> DATE_STAMP |
| @@ -172,8 +172,10 @@ struct bcm5974_config { | |||
| 172 | /* mouse driver state */ | 172 | /* mouse driver state */ |
| 173 | struct bcm5974_mouse_state { | 173 | struct bcm5974_mouse_state { |
| 174 | int fingers; /* number of fingers on trackpad */ | 174 | int fingers; /* number of fingers on trackpad */ |
| 175 | int wheel; /* vertical wheel counter */ | 175 | int rel_x; /* horizontal relative counter */ |
| 176 | int hwheel; /* horizontal wheel counter */ | 176 | int rel_y; /* vertical relative counter */ |
| 177 | int wheel_x; /* horizontal wheel counter */ | ||
| 178 | int wheel_y; /* vertical wheel counter */ | ||
| 177 | }; | 179 | }; |
| 178 | 180 | ||
| 179 | /* logical device structure */ | 181 | /* logical device structure */ |
| @@ -276,8 +278,8 @@ static void setup_events_to_report(struct input_dev *input_dev, | |||
| 276 | __set_bit(EV_REL, input_dev->evbit); | 278 | __set_bit(EV_REL, input_dev->evbit); |
| 277 | __set_bit(REL_X, input_dev->relbit); | 279 | __set_bit(REL_X, input_dev->relbit); |
| 278 | __set_bit(REL_Y, input_dev->relbit); | 280 | __set_bit(REL_Y, input_dev->relbit); |
| 279 | __set_bit(REL_WHEEL, input_dev->relbit); | ||
| 280 | __set_bit(REL_HWHEEL, input_dev->relbit); | 281 | __set_bit(REL_HWHEEL, input_dev->relbit); |
| 282 | __set_bit(REL_WHEEL, input_dev->relbit); | ||
| 281 | __set_bit(BTN_MIDDLE, input_dev->keybit); | 283 | __set_bit(BTN_MIDDLE, input_dev->keybit); |
| 282 | __set_bit(BTN_RIGHT, input_dev->keybit); | 284 | __set_bit(BTN_RIGHT, input_dev->keybit); |
| 283 | break; | 285 | break; |
| @@ -363,7 +365,7 @@ static void update_tp_mouse_state(struct input_dev *dev, | |||
| 363 | const struct tp_finger *f, | 365 | const struct tp_finger *f, |
| 364 | int p, int n) | 366 | int p, int n) |
| 365 | { | 367 | { |
| 366 | int dx = 0, dy = 0, sx = 0, sy = 0, sw = 0, shw = 0; | 368 | int dx = 0, dy = 0, sx = 0, sy = 0, swx = 0, swy = 0; |
| 367 | 369 | ||
| 368 | if (f) { | 370 | if (f) { |
| 369 | dx = raw2int(f->rel_x); | 371 | dx = raw2int(f->rel_x); |
| @@ -376,30 +378,38 @@ static void update_tp_mouse_state(struct input_dev *dev, | |||
| 376 | 378 | ||
| 377 | if (n >= 3) { | 379 | if (n >= 3) { |
| 378 | /* swipe */ | 380 | /* swipe */ |
| 379 | ms->wheel = 0; | 381 | ms->rel_x = 0; |
| 380 | ms->hwheel += int2scale(&c->x, dx); | 382 | ms->rel_y = 0; |
| 381 | shw = ms->hwheel / mouse_hwheel_damping; | 383 | ms->wheel_x += int2scale(&c->x, dx); |
| 382 | ms->hwheel -= shw * mouse_hwheel_damping; | 384 | ms->wheel_y = 0; |
| 385 | swx = ms->wheel_x / mouse_hwheel_damping; | ||
| 386 | ms->wheel_x -= swx * mouse_hwheel_damping; | ||
| 383 | } else if (n == 2) { | 387 | } else if (n == 2) { |
| 384 | /* scroll */ | 388 | /* scroll */ |
| 385 | ms->wheel += int2scale(&c->y, dy); | 389 | ms->rel_x = 0; |
| 386 | ms->hwheel = 0; | 390 | ms->rel_y = 0; |
| 387 | sw = ms->wheel / mouse_wheel_damping; | 391 | ms->wheel_x = 0; |
| 388 | ms->wheel -= sw * mouse_wheel_damping; | 392 | ms->wheel_y += int2scale(&c->y, dy); |
| 393 | swy = ms->wheel_y / mouse_wheel_damping; | ||
| 394 | ms->wheel_y -= swy * mouse_wheel_damping; | ||
| 389 | } else { | 395 | } else { |
| 390 | /* pointer */ | 396 | /* pointer */ |
| 391 | ms->wheel = 0; | 397 | ms->rel_x += int2scale(&c->x, dx); |
| 392 | ms->hwheel = 0; | 398 | ms->rel_y += int2scale(&c->y, -dy); |
| 393 | sx = int2scale(&c->x, dx) / mouse_motion_damping; | 399 | ms->wheel_x = 0; |
| 394 | sy = int2scale(&c->y, -dy) / mouse_motion_damping; | 400 | ms->wheel_y = 0; |
| 401 | sx = ms->rel_x / mouse_motion_damping; | ||
| 402 | sy = ms->rel_y / mouse_motion_damping; | ||
| 403 | ms->rel_x -= sx * mouse_motion_damping; | ||
| 404 | ms->rel_y -= sy * mouse_motion_damping; | ||
| 395 | } | 405 | } |
| 396 | 406 | ||
| 397 | ms->fingers = n; | 407 | ms->fingers = n; |
| 398 | 408 | ||
| 399 | input_report_rel(dev, REL_X, sx); | 409 | input_report_rel(dev, REL_X, sx); |
| 400 | input_report_rel(dev, REL_Y, sy); | 410 | input_report_rel(dev, REL_Y, sy); |
| 401 | input_report_rel(dev, REL_WHEEL, sw); | 411 | input_report_rel(dev, REL_HWHEEL, swx); |
| 402 | input_report_rel(dev, REL_HWHEEL, shw); | 412 | input_report_rel(dev, REL_WHEEL, swy); |
| 403 | } | 413 | } |
| 404 | 414 | ||
| 405 | /* update logical touchpad state */ | 415 | /* update logical touchpad state */ |
| @@ -1,5 +1,5 @@ | |||
| 1 | PACKAGE_NAME="bcm5974" | 1 | PACKAGE_NAME="bcm5974" |
| 2 | PACKAGE_VERSION="0.60" | 2 | PACKAGE_VERSION="0.61" |
| 3 | MAKE[0]="make -C ${kernel_source_dir} | 3 | MAKE[0]="make -C ${kernel_source_dir} |
| 4 | SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build modules" | 4 | SUBDIRS=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build modules" |
| 5 | BUILT_MODULE_NAME[0]="bcm5974" | 5 | BUILT_MODULE_NAME[0]="bcm5974" |
