Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: bcm5974 - adjust major/minor to scale

By visual inspection, the reported touch_major and touch_minor axes
are a factor of two too small. Presumably the device actually reports
the semi-major and semi-minor axes. Corrected with this patch.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Henrik Rydberg and committed by
Dmitry Torokhov
57157bec ba4d695a

+8 -4
+8 -4
drivers/input/mouse/bcm5974.c
··· 337 337 const struct bcm5974_config *cfg, 338 338 const struct tp_finger *f) 339 339 { 340 - input_report_abs(input, ABS_MT_TOUCH_MAJOR, raw2int(f->force_major)); 341 - input_report_abs(input, ABS_MT_TOUCH_MINOR, raw2int(f->force_minor)); 342 - input_report_abs(input, ABS_MT_WIDTH_MAJOR, raw2int(f->size_major)); 343 - input_report_abs(input, ABS_MT_WIDTH_MINOR, raw2int(f->size_minor)); 340 + input_report_abs(input, ABS_MT_TOUCH_MAJOR, 341 + raw2int(f->force_major) << 1); 342 + input_report_abs(input, ABS_MT_TOUCH_MINOR, 343 + raw2int(f->force_minor) << 1); 344 + input_report_abs(input, ABS_MT_WIDTH_MAJOR, 345 + raw2int(f->size_major) << 1); 346 + input_report_abs(input, ABS_MT_WIDTH_MINOR, 347 + raw2int(f->size_minor) << 1); 344 348 input_report_abs(input, ABS_MT_ORIENTATION, 345 349 MAX_FINGER_ORIENTATION - raw2int(f->orientation)); 346 350 input_report_abs(input, ABS_MT_POSITION_X, raw2int(f->abs_x));