Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Chanwoo Choi <cw00.choi@samsung.com>
Cc: rydberg@bitmath.org, andi.shyti@samsung.com, robh@kernel.org,
	arnd@arndb.de, chanwoo@kernel.org, inki.dae@samsung.com,
	sw0312.kim@samsung.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] Input: stmfts: Fix bug of ABS_MT_POSITION_* maximum size
Date: Wed, 18 Oct 2017 17:34:18 -0700	[thread overview]
Message-ID: <20171019003418.zwvuc2vd4kzqkcya@dtor-ws> (raw)
In-Reply-To: <1508323110-10061-1-git-send-email-cw00.choi@samsung.com>

On Wed, Oct 18, 2017 at 07:38:30PM +0900, Chanwoo Choi wrote:
> The commit 78bcac7b2ae1e ("Input: add support for the STMicroelectronics
> FingerTip touchscreen) used the 'touchscreen_parse_properties()' helper
> function in order to get the value of common properties.
> 
> But, commit 78bcac7b2ae1e didn't set the capability of ABS_MT_POSITION_*
> before calling touchscreen_parse_properties(). In result, the max_x and max_y
> of 'struct touchscreen_propeties' were not set. So, this patch fixes the bug
> to get the ABS_MT_POSITION_* maximum size.
> 
> Fixes: 78bcac7b2ae1e ("Input: add support for the STMicroelectronics FingerTip touchscreen")
> Cc: stable@vger.kernel.org
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

Applied, thank you.

> ---
>  drivers/input/touchscreen/stmfts.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen/stmfts.c
> index 157fdb4bb2e8..8c6c6178ec12 100644
> --- a/drivers/input/touchscreen/stmfts.c
> +++ b/drivers/input/touchscreen/stmfts.c
> @@ -663,12 +663,10 @@ static int stmfts_probe(struct i2c_client *client,
>  	sdata->input->open = stmfts_input_open;
>  	sdata->input->close = stmfts_input_close;
>  
> +	input_set_capability(sdata->input, EV_ABS, ABS_MT_POSITION_X);
> +	input_set_capability(sdata->input, EV_ABS, ABS_MT_POSITION_Y);
>  	touchscreen_parse_properties(sdata->input, true, &sdata->prop);
>  
> -	input_set_abs_params(sdata->input, ABS_MT_POSITION_X, 0,
> -						sdata->prop.max_x, 0, 0);
> -	input_set_abs_params(sdata->input, ABS_MT_POSITION_Y, 0,
> -						sdata->prop.max_y, 0, 0);
>  	input_set_abs_params(sdata->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
>  	input_set_abs_params(sdata->input, ABS_MT_TOUCH_MINOR, 0, 255, 0, 0);
>  	input_set_abs_params(sdata->input, ABS_MT_ORIENTATION, 0, 255, 0, 0);
> -- 
> 1.9.1
> 

-- 
Dmitry

      reply	other threads:[~2017-10-19  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171018103835epcas1p13ca5f794456313f91c427efdb17f8396@epcas1p1.samsung.com>
2017-10-18 10:38 ` [PATCH] Input: stmfts: Fix bug of ABS_MT_POSITION_* maximum size Chanwoo Choi
2017-10-19  0:34   ` Dmitry Torokhov [this message]

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=20171019003418.zwvuc2vd4kzqkcya@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=andi.shyti@samsung.com \
    --cc=arnd@arndb.de \
    --cc=chanwoo@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=inki.dae@samsung.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=stable@vger.kernel.org \
    --cc=sw0312.kim@samsung.com \
    /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