Input: edt-ft5x06 - add support for inverting / swapping axes
Add support for inverting / swapping axes using the new touchscreen_parse_properties() and touchscreen_report_pos() functionality. 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
ed7c9870c9
commit
ad368eb2da
@@ -86,6 +86,7 @@ struct edt_reg_addr {
|
|||||||
struct edt_ft5x06_ts_data {
|
struct edt_ft5x06_ts_data {
|
||||||
struct i2c_client *client;
|
struct i2c_client *client;
|
||||||
struct input_dev *input;
|
struct input_dev *input;
|
||||||
|
struct touchscreen_properties prop;
|
||||||
u16 num_x;
|
u16 num_x;
|
||||||
u16 num_y;
|
u16 num_y;
|
||||||
|
|
||||||
@@ -246,8 +247,8 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
|
|||||||
if (!down)
|
if (!down)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
input_report_abs(tsdata->input, ABS_MT_POSITION_X, x);
|
touchscreen_report_pos(tsdata->input, &tsdata->prop, x, y,
|
||||||
input_report_abs(tsdata->input, ABS_MT_POSITION_Y, y);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
input_mt_report_pointer_emulation(tsdata->input, true);
|
input_mt_report_pointer_emulation(tsdata->input, true);
|
||||||
@@ -972,7 +973,7 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
|
|||||||
input_set_abs_params(input, ABS_MT_POSITION_Y,
|
input_set_abs_params(input, ABS_MT_POSITION_Y,
|
||||||
0, tsdata->num_y * 64 - 1, 0, 0);
|
0, tsdata->num_y * 64 - 1, 0, 0);
|
||||||
|
|
||||||
touchscreen_parse_properties(input, true, NULL);
|
touchscreen_parse_properties(input, true, &tsdata->prop);
|
||||||
|
|
||||||
error = input_mt_init_slots(input, tsdata->max_support_points,
|
error = input_mt_init_slots(input, tsdata->max_support_points,
|
||||||
INPUT_MT_DIRECT);
|
INPUT_MT_DIRECT);
|
||||||
|
|||||||
Reference in New Issue
Block a user