Commit 57157bec authored by Henrik Rydberg's avatar Henrik Rydberg Committed by Dmitry Torokhov

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: default avatarHenrik Rydberg <rydberg@euromail.se>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent ba4d695a
...@@ -337,10 +337,14 @@ static void report_finger_data(struct input_dev *input, ...@@ -337,10 +337,14 @@ static void report_finger_data(struct input_dev *input,
const struct bcm5974_config *cfg, const struct bcm5974_config *cfg,
const struct tp_finger *f) const struct tp_finger *f)
{ {
input_report_abs(input, ABS_MT_TOUCH_MAJOR, raw2int(f->force_major)); input_report_abs(input, ABS_MT_TOUCH_MAJOR,
input_report_abs(input, ABS_MT_TOUCH_MINOR, raw2int(f->force_minor)); raw2int(f->force_major) << 1);
input_report_abs(input, ABS_MT_WIDTH_MAJOR, raw2int(f->size_major)); input_report_abs(input, ABS_MT_TOUCH_MINOR,
input_report_abs(input, ABS_MT_WIDTH_MINOR, raw2int(f->size_minor)); raw2int(f->force_minor) << 1);
input_report_abs(input, ABS_MT_WIDTH_MAJOR,
raw2int(f->size_major) << 1);
input_report_abs(input, ABS_MT_WIDTH_MINOR,
raw2int(f->size_minor) << 1);
input_report_abs(input, ABS_MT_ORIENTATION, input_report_abs(input, ABS_MT_ORIENTATION,
MAX_FINGER_ORIENTATION - raw2int(f->orientation)); MAX_FINGER_ORIENTATION - raw2int(f->orientation));
input_report_abs(input, ABS_MT_POSITION_X, raw2int(f->abs_x)); input_report_abs(input, ABS_MT_POSITION_X, raw2int(f->abs_x));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment