summaryrefslogtreecommitdiff
path: root/drivers/scsi/dc395x.h
diff options
context:
space:
mode:
authorMarcin Niestroj <m.niestroj@grinn-global.com>2018-01-26 11:08:59 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-01-31 14:44:40 -0800
commitfafef982c7353e8982b951e40573e990ccf0ed00 (patch)
treeac8aed03a26e7579f7fdb8ff7b95665f4d27d8dd /drivers/scsi/dc395x.h
parent13e945401a8dd5098ed07d242542e90be9f1c19d (diff)
Input: goodix - use generic touchscreen_properties
Use touchscreen_properties structure instead of implementing all properties by our own. It allows us to reuse generic code for parsing device-tree properties (which was implemented manually in the driver for now). Additionally, it allows us to report events using generic touchscreen_report_pos(), which automatically handles inverted and swapped axes. This fixes the issue with the custom code incorrectly handling case where ts->inverted_x and ts->swapped_x_y were true, but ts->inverted_y was false. Assuming we have 720x1280 touch panel, ts->abs_x_max == 1279 and ts->abs_y_max == 719 (because we inverted that in goodix_read_config()). Now let's assume that we received event from (0:0) position (in touch panel original coordinates). In function goodix_ts_report_touch() we calculate input_x as 1279, but after swapping input_y takes that value (which is more that maximum 719 value reported during initialization). Note that since touchscreen coordinates are 0-indexed, we now report touchscreen range as (0:size-1). Developed and tested on custom DT-based device with gt1151 touch panel. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> [dtor: fix endianness annotation reported by sparse, handle errors when initializing MT slots] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/scsi/dc395x.h')
0 files changed, 0 insertions, 0 deletions