diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2015-03-21 23:18:06 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-03-24 15:00:50 -0400 |
commit | 2c00559884e09398a6451672472b4ea7f4118291 (patch) | |
tree | b1bbb91fd5545456741ffe2f1d2ca29b225cbd3c /drivers/input/touchscreen | |
parent | 0a363a380954e10fece7cd9931b66056eeb07d56 (diff) |
Input: edt-ft5x06 - allow to setting the maximum axes value through the DT
Currently the driver relies on some obscure and undocumented register to set
the maximum axis value.
The reported value is way too high to be meaningful, which confuses some
userspace tools like QT's evdevtouch plugin which try to scale the reported
events to the maximum values.
Use the values from the DT to set meaningful values.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/edt-ft5x06.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index d4c24fb7704f..cd8a7472266b 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/gpio.h> | 37 | #include <linux/gpio.h> |
38 | #include <linux/of_gpio.h> | 38 | #include <linux/of_gpio.h> |
39 | #include <linux/input/mt.h> | 39 | #include <linux/input/mt.h> |
40 | #include <linux/input/touchscreen.h> | ||
40 | #include <linux/input/edt-ft5x06.h> | 41 | #include <linux/input/edt-ft5x06.h> |
41 | 42 | ||
42 | #define MAX_SUPPORT_POINTS 5 | 43 | #define MAX_SUPPORT_POINTS 5 |
@@ -1044,6 +1045,10 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, | |||
1044 | 0, tsdata->num_x * 64 - 1, 0, 0); | 1045 | 0, tsdata->num_x * 64 - 1, 0, 0); |
1045 | input_set_abs_params(input, ABS_MT_POSITION_Y, | 1046 | input_set_abs_params(input, ABS_MT_POSITION_Y, |
1046 | 0, tsdata->num_y * 64 - 1, 0, 0); | 1047 | 0, tsdata->num_y * 64 - 1, 0, 0); |
1048 | |||
1049 | if (!pdata) | ||
1050 | touchscreen_parse_of_params(input); | ||
1051 | |||
1047 | error = input_mt_init_slots(input, MAX_SUPPORT_POINTS, 0); | 1052 | error = input_mt_init_slots(input, MAX_SUPPORT_POINTS, 0); |
1048 | if (error) { | 1053 | if (error) { |
1049 | dev_err(&client->dev, "Unable to init MT slots.\n"); | 1054 | dev_err(&client->dev, "Unable to init MT slots.\n"); |