devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Matthias Fend <matthias.fend@wolfvision.net>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	martin.kepplinger@ginzinger.com
Subject: Re: [PATCH v2 2/2] Input: st1232 - handle common DT bindings
Date: Mon, 11 Feb 2019 00:42:25 -0800	[thread overview]
Message-ID: <20190211084225.GB95126@dtor-ws> (raw)
In-Reply-To: <1548758654-27153-2-git-send-email-matthias.fend@wolfvision.net>

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

  reply	other threads:[~2019-02-11  8:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-01-30 19:55 ` [PATCH v2 1/2] dt-bindings: input: touchscreen: st1232: reference " Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190211084225.GB95126@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=martin.kepplinger@ginzinger.com \
    --cc=matthias.fend@wolfvision.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).