From patchwork Wed Oct 18 10:38:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 10014321 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 742EF60215 for ; Wed, 18 Oct 2017 10:38:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67B5C28B0E for ; Wed, 18 Oct 2017 10:38:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C3CA28B1B; Wed, 18 Oct 2017 10:38:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA3AC28B0E for ; Wed, 18 Oct 2017 10:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937940AbdJRKil (ORCPT ); Wed, 18 Oct 2017 06:38:41 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:34499 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937935AbdJRKii (ORCPT ); Wed, 18 Oct 2017 06:38:38 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20171018103836epoutp014ae8ebef437fe5e10a31a88752d7bbd0~uo_Inqz762800828008epoutp018; Wed, 18 Oct 2017 10:38:36 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.40.69]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20171018103836epcas1p199469f2e748c08380e1a8e18eb2254a1~uo_IAfdXa1968019680epcas1p1_; Wed, 18 Oct 2017 10:38:36 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 7A.95.04388.C2F27E95; Wed, 18 Oct 2017 19:38:36 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20171018103835epcas1p13ca5f794456313f91c427efdb17f8396~uo_HrnVVn1968019680epcas1p17; Wed, 18 Oct 2017 10:38:35 +0000 (GMT) X-AuditID: b6c32a38-d71ff70000001124-5c-59e72f2c1836 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 5A.02.06995.B2F27E95; Wed, 18 Oct 2017 19:38:35 +0900 (KST) Received: from localhost.localdomain ([10.113.62.212]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OY0005X4LKBNOB0@mmp1.samsung.com>; Wed, 18 Oct 2017 19:38:35 +0900 (KST) From: Chanwoo Choi To: dmitry.torokhov@gmail.com Cc: rydberg@bitmath.org, andi.shyti@samsung.com, robh@kernel.org, arnd@arndb.de, cw00.choi@samsung.com, 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: [PATCH] Input: stmfts: Fix bug of ABS_MT_POSITION_* maximum size Date: Wed, 18 Oct 2017 19:38:30 +0900 Message-id: <1508323110-10061-1-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPKsWRmVeSWpSXmKPExsWy7bCmvq6O/vNIgy8/uSy2H3nGavF30jF2 i4k3rrBYXP/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hNvXGGxuP7lOavF4UUvGC0m3Z/AYnHz0zdWi8u75rBZzDi/j8ni/54d7BYnvk1jsliw8RGj xYzJL9kceD1+/5rE6PF51StWj52z7rJ7bFrVyebRt2UVUGyTXABbFJdNSmpOZllqkb5dAlfG p6sP2Qse81b0f5/N1sD4i7uLkYNDQsBEYurHsC5GLg4hgZ2MEvs2v2GDcH4wSuz4Oo2xi5GT g01AS2L/ixtsILaIgKxEx/FZzCA2s8AyJonLj1xBbGEBT4nV8/+D1bAIqEpcP36bBWQBr4Cr xL5mBZCwhICcxIc9j9gnMHItYGRYxSiZWlCcm55bbFRgmJdarlecmFtcmpeul5yfu4kRGFjb Dmv17WC8vyT+EKMAB6MSD+8PxWeRQqyJZcWVuYcYJTiYlUR4mT8ChXhTEiurUovy44tKc1KL DzFKc7AoifPezjsWKSSQnliSmp2aWpBaBJNl4uCUamAUlz3BcPa1ZE+qyiwHtRXJOzv2vdIw X7P+ubCgQ2zTkR1NEw7Enp3KauzKfm1dgfCfVjcJz62LSwqYV91c2rpWtLZ2Y+jHBb16HkL6 /xNeBkrmaeSeX8d1f39Bqautjs2txkN8rHaLlS6+U7aQOBgzd3/W3exvHRsvuIk+KVn6cGES b7pN0R0lluKMREMt5qLiRAAe9BcTKAIAAA== X-CMS-MailID: 20171018103835epcas1p13ca5f794456313f91c427efdb17f8396 X-Msg-Generator: CA X-Sender-IP: 182.195.42.142 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20171018103835epcas1p13ca5f794456313f91c427efdb17f8396 X-RootMTR: 20171018103835epcas1p13ca5f794456313f91c427efdb17f8396 References: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);