All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference common DT bindings
@ 2019-01-29 10:44 Matthias Fend
  2019-01-29 10:44 ` [PATCH v2 2/2] Input: st1232 - handle " Matthias Fend
  2019-01-30 19:55 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference " Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Matthias Fend @ 2019-01-29 10:44 UTC (permalink / raw)
  To: linux-input, devicetree; +Cc: dmitry.torokhov, martin.kepplinger, Matthias Fend

Add a reference to common touchscreen bindings which are also partly
supported.

Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net>
---
 Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt b/Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt
index 64ad48b..f3046e7 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt
@@ -8,6 +8,8 @@ Required properties:
 Optional properties:
 - gpios: a phandle to the reset GPIO
 
+For additional optional properties see: touchscreen.txt
+
 Example:
 
 	i2c@00000000 {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] Input: st1232 - handle common DT bindings
  2019-01-29 10:44 [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference common DT bindings Matthias Fend
@ 2019-01-29 10:44 ` Matthias Fend
  2019-02-11  8:42   ` Dmitry Torokhov
  2019-01-30 19:55 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference " Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Matthias Fend @ 2019-01-29 10:44 UTC (permalink / raw)
  To: linux-input, devicetree; +Cc: dmitry.torokhov, martin.kepplinger, Matthias Fend

This is required to specify generic touchscreen properties via DT.

Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net>
---
 drivers/input/touchscreen/st1232.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index 11ff32c..6485936 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -21,6 +21,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"
 
@@ -41,6 +42,7 @@ struct st1232_ts_finger {
 struct st1232_ts_data {
 	struct i2c_client *client;
 	struct input_dev *input_dev;
+	struct touchscreen_properties prop;
 	struct st1232_ts_finger finger[MAX_FINGERS];
 	struct dev_pm_qos_request low_latency_req;
 	int reset_gpio;
@@ -109,8 +111,8 @@ static irqreturn_t st1232_ts_irq_handler(int irq, void *dev_id)
 			continue;
 
 		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++;
 	}
@@ -195,6 +197,7 @@ static int st1232_ts_probe(struct i2c_client *client,
 	input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, MAX_AREA, 0, 0);
 	input_set_abs_params(input_dev, ABS_MT_POSITION_X, MIN_X, MAX_X, 0, 0);
 	input_set_abs_params(input_dev, ABS_MT_POSITION_Y, MIN_Y, 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,
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference common DT bindings
  2019-01-29 10:44 [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference common DT bindings Matthias Fend
  2019-01-29 10:44 ` [PATCH v2 2/2] Input: st1232 - handle " Matthias Fend
@ 2019-01-30 19:55 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-01-30 19:55 UTC (permalink / raw)
  To: Matthias Fend; +Cc: linux-input, devicetree, dmitry.torokhov, martin.kepplinger

On Tue, 29 Jan 2019 11:44:13 +0100, Matthias Fend wrote:
> Add a reference to common touchscreen bindings which are also partly
> supported.
> 
> Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net>
> ---
>  Documentation/devicetree/bindings/input/touchscreen/sitronix-st1232.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/2] Input: st1232 - handle common DT bindings
  2019-01-29 10:44 ` [PATCH v2 2/2] Input: st1232 - handle " Matthias Fend
@ 2019-02-11  8:42   ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2019-02-11  8:42 UTC (permalink / raw)
  To: Matthias Fend; +Cc: linux-input, devicetree, martin.kepplinger

On Tue, Jan 29, 2019 at 11:44:14AM +0100, Matthias Fend wrote:
> This is required to specify generic touchscreen properties via DT.
> 
> Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net>

Applied, thank you.

> ---
>  drivers/input/touchscreen/st1232.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
> index 11ff32c..6485936 100644
> --- a/drivers/input/touchscreen/st1232.c
> +++ b/drivers/input/touchscreen/st1232.c
> @@ -21,6 +21,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"
>  
> @@ -41,6 +42,7 @@ struct st1232_ts_finger {
>  struct st1232_ts_data {
>  	struct i2c_client *client;
>  	struct input_dev *input_dev;
> +	struct touchscreen_properties prop;
>  	struct st1232_ts_finger finger[MAX_FINGERS];
>  	struct dev_pm_qos_request low_latency_req;
>  	int reset_gpio;
> @@ -109,8 +111,8 @@ static irqreturn_t st1232_ts_irq_handler(int irq, void *dev_id)
>  			continue;
>  
>  		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++;
>  	}
> @@ -195,6 +197,7 @@ static int st1232_ts_probe(struct i2c_client *client,
>  	input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, MAX_AREA, 0, 0);
>  	input_set_abs_params(input_dev, ABS_MT_POSITION_X, MIN_X, MAX_X, 0, 0);
>  	input_set_abs_params(input_dev, ABS_MT_POSITION_Y, MIN_Y, 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,
> -- 
> 2.7.4
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-11  8:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29 10:44 [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference common DT bindings Matthias Fend
2019-01-29 10:44 ` [PATCH v2 2/2] Input: st1232 - handle " Matthias Fend
2019-02-11  8:42   ` Dmitry Torokhov
2019-01-30 19:55 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference " Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.