summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorMatthias Fend <matthias.fend@wolfvision.net>2019-02-11 00:30:26 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-02-16 21:39:42 -0800
commit16ab4f43eb953277e915115c1d811d2a518d6bf2 (patch)
tree0d39f46f9a1c0f5612bc53feb2405fc8e8326042 /drivers/input
parent6b65189a2d09e0821c80581455b748c23c9342e9 (diff)
Input: st1232 - handle common DT bindings
This is required to specify generic touchscreen properties via DT. Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/st1232.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index 32819ee6ec4b..34923399ece4 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -20,6 +20,7 @@
#include <linux/pm_qos.h>
#include <linux/slab.h>
#include <linux/types.h>
+#include <linux/input/touchscreen.h>
#define ST1232_TS_NAME "st1232-ts"
#define ST1633_TS_NAME "st1633-ts"
@@ -43,6 +44,7 @@ struct st_chip_info {
struct st1232_ts_data {
struct i2c_client *client;
struct input_dev *input_dev;
+ struct touchscreen_properties prop;
struct dev_pm_qos_request low_latency_req;
struct gpio_desc *reset_gpio;
const struct st_chip_info *chip_info;
@@ -112,8 +114,8 @@ static irqreturn_t st1232_ts_irq_handler(int irq, void *dev_id)
input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR,
finger[i].t);
- input_report_abs(input_dev, ABS_MT_POSITION_X, finger[i].x);
- input_report_abs(input_dev, ABS_MT_POSITION_Y, finger[i].y);
+ touchscreen_report_pos(input_dev, &ts->prop,
+ finger[i].x, finger[i].y, true);
input_mt_sync(input_dev);
count++;
}
@@ -243,6 +245,8 @@ static int st1232_ts_probe(struct i2c_client *client,
input_set_abs_params(input_dev, ABS_MT_POSITION_Y,
0, ts->chip_info->max_y, 0, 0);
+ touchscreen_parse_properties(input_dev, true, &ts->prop);
+
error = devm_request_threaded_irq(&client->dev, client->irq,
NULL, st1232_ts_irq_handler,
IRQF_ONESHOT,