Input: of_touchscreen - add support for inverted / swapped axes
Extend touchscreen_parse_properties() with support for the touchscreen-inverted-x/y and touchscreen-swapped-x-y properties and add touchscreen_set_mt_pos() and touchscreen_report_pos() helper functions for storing coordinates into a input_mt_pos struct, or directly reporting them, taking these properties into account. This commit also modifies the existing callers of touchscreen_parse_properties() to pass in NULL for the new third argument, keeping the existing behavior. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:

committed by
Dmitry Torokhov

parent
345ded8ef4
commit
ed7c9870c9
@@ -515,7 +515,7 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client,
|
||||
} else {
|
||||
input_set_capability(input, EV_ABS, ABS_MT_POSITION_X);
|
||||
input_set_capability(input, EV_ABS, ABS_MT_POSITION_Y);
|
||||
touchscreen_parse_properties(input, true);
|
||||
touchscreen_parse_properties(input, true, NULL);
|
||||
if (!input_abs_get_max(input, ABS_MT_POSITION_X) ||
|
||||
!input_abs_get_max(input, ABS_MT_POSITION_Y)) {
|
||||
dev_err(dev, "Touchscreen size is not specified\n");
|
||||
|
Reference in New Issue
Block a user