mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Syna: Modify the ratio of the major and minor values
Modify the ratio of the major and minor values for FOD For racer: ratio = 1948/ 128 Change-Id: I09db7e5adf7998fc468b4258d76d6846f0eb908e Reviewed-on: https://gerrit.mot.com/1549735 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jialei Hao <haojl2@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
171fc53147
commit
658222e621
2 changed files with 7 additions and 4 deletions
|
|
@ -185,6 +185,9 @@ static int parse_dt(struct device *dev, struct syna_tcm_board_data *bdata)
|
|||
bdata->tpio_reset_gpio = -1;
|
||||
}
|
||||
|
||||
/* If multiple_factor not set in device_tree. Set as default value.
|
||||
* report major and minor value = raw value * size_to_pixel_multiple_factor / 128
|
||||
*/
|
||||
prop = of_find_property(np, "synaptics,size_to_pixel_multiple_factor", NULL);
|
||||
if (prop && prop->length) {
|
||||
retval = of_property_read_u32(np, "synaptics,size_to_pixel_multiple_factor",
|
||||
|
|
|
|||
|
|
@ -771,11 +771,11 @@ static void touch_report(void)
|
|||
x = object_data[idx].x_pos;
|
||||
y = object_data[idx].y_pos;
|
||||
if (object_data[idx].x_width > object_data[idx].y_width) {
|
||||
minor = object_data[idx].y_width * bdata->size_to_pixel_multiple_factor;
|
||||
major = object_data[idx].x_width * bdata->size_to_pixel_multiple_factor;
|
||||
minor = (object_data[idx].y_width * bdata->size_to_pixel_multiple_factor) >> 7;
|
||||
major = (object_data[idx].x_width * bdata->size_to_pixel_multiple_factor) >> 7;
|
||||
} else {
|
||||
minor = object_data[idx].x_width * bdata->size_to_pixel_multiple_factor;
|
||||
major = object_data[idx].y_width * bdata->size_to_pixel_multiple_factor;
|
||||
minor = (object_data[idx].x_width * bdata->size_to_pixel_multiple_factor) >> 7;
|
||||
major = (object_data[idx].y_width * bdata->size_to_pixel_multiple_factor) >> 7;
|
||||
}
|
||||
if (bdata->swap_axes) {
|
||||
temp = x;
|
||||
|
|
|
|||
Loading…
Reference in a new issue