Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751531AbdCAHjK (ORCPT ); Wed, 1 Mar 2017 02:39:10 -0500 Received: from mail-co1nam03on0080.outbound.protection.outlook.com ([104.47.40.80]:19552 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751059AbdCAHjI (ORCPT ); Wed, 1 Mar 2017 02:39:08 -0500 Authentication-Results: spf=pass (sender IP is 137.71.25.55) smtp.mailfrom=analog.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=analog.com; Reply-To: Subject: Re: [PATCH 4/4] Input: ad7879 - do not manipulate capability bits directly References: <20170228220848.31185-1-dmitry.torokhov@gmail.com> <20170228220848.31185-4-dmitry.torokhov@gmail.com> To: Dmitry Torokhov CC: "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Michael Hennerich Organization: Analog Devices Inc. Message-ID: <109567db-75f3-cdd7-966b-f77967fe4092@analog.com> Date: Wed, 1 Mar 2017 08:37:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170228220848.31185-4-dmitry.torokhov@gmail.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.55;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(39860400002)(39850400002)(39410400002)(39840400002)(2980300002)(438002)(189002)(199003)(24454002)(86362001)(2906002)(6916009)(2950100002)(43066003)(305945005)(54906002)(53546006)(5660300001)(356003)(36756003)(4326008)(65826007)(626004)(6666003)(2870700001)(83506001)(7636002)(3450700001)(31696002)(23746002)(110136004)(65956001)(54356999)(64126003)(229853002)(39060400002)(8936002)(76176999)(47776003)(77096006)(6246003)(50986999)(31686004)(50466002)(65806001)(106466001)(4001350100001)(189998001)(8676002)(33646002)(38730400002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0848;H:nwd2mta1.analog.com;FPR:;SPF:Pass;MLV:ovrnspm;MX:1;A:1;PTR:nwd2mail10.analog.com;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD024;1:8pEwMH2INY4JCRfScC0wre2cyYJZcOrB2iXcrTBEj1ZCkDj911Bja6aQ68QovAL1RCYymuRmK0Sq/mb/1QPKjbpFlU0sKMgTKB6z4a9xShJgDq5oQIvyo6589Bs1CzQnn8bscSCxqftxMJzQwajlSQXffAPgHzaYoY+nyJ56THbwSdHkAxvpHz53qtu/e5mp52FjsQ5g1SgTsuT7J85YFTTEJSBFSTwiOwsypvAAyttnx55eYl8czD5qq7Eztm4K/l9OrSdu1nBYnsJFzZgTommcX3Uv7moJnuTmd49Nr+Xz/T1UXgyeApVPXmowJ8VGFr3kRhenQr3QTHNQoyBP74+y3NrCTF5ofL7XU8zbhItrbCdBVPKkRbCFigxObCzbWuKV47eOFSK5EcGWbZpENkOmPWqR1e+Qm9baZnqIVUg9ELyjNLcfpxpT8xxc7mYO2lV7VHD1/kkD8/yjRwi5/Gi/Lso+vh44OSavltwiiPts8qU9qWrFR4J87PXFGUt7mrutNrNPm9WrmZsH/3Jab9aK6elUt66WZySVshmDWi4= X-MS-Office365-Filtering-Correlation-Id: 86f30c6c-29bf-49f7-4fc6-08d46075af71 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:DM2PR0301MB0848; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0848;3:E1wp3Wjwzx21vptWZllMRH6zUzzmdaHyjIqtPriH/GPMh2hswfX+rDVYTQtIBXDMuB0KH+F0tL5i75P9RQmT8uhjn5pYbs6MXLqnKZAhHXZVPefOqDptj3raZkCEc76JB/2H7F/38NMuwwg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gRBL97zQSP+z542Innw34+dCorO4/eascHgZ1gZyiNRrxI85XiCrAd6FO23gx9K5sjoDFJj8BHWU1zqFiEXWXFsdXh9KOTEahsTG137r8c47LxQlr/D/JldU8paDFx/G2kO9e0jNqG1+h3DDBbj1Z+WTf496Tpdxmo0m27GwDo5byKRzKvhufN7LWma66Zv+7ms+6mcxugkMfQvYCdP+BMdoCAMVlip1HxziBkQuiwL+eHUsNH7tCPvIQubM/G/y3QOCFIOKSV80ORnLs5Wm6Juvy+ZhCBkjKUmjTyWPKh3uBoMC/zbuMjPNNpyivEq97cM0sDE+F7x+WXo77rVn1fJ6UcbptVspiFd5Qax6bFwuOqn7fT9B9gAgDkrxKzjhH/fdCrtc9ISYL5FthRb8QLxFJ0sb8zz27nOSjTtYVFoNFb4SrySv2Fs/xW3XuaUwrwzbXO8b5gIq+yEfFM/HkXLl+eRmUeMKArzOMLNSN2pveUm7BS6IF3iaM0d+2l2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(232431446821674); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(13017025)(13015025)(13023025)(13024025)(13018025)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(6072148);SRVR:DM2PR0301MB0848;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0848; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0848;4:qikdW1fhJjuQfVNvzQxvY0WHZZPUvd9kV0gz73v7WpMUQ+qHKcxV8Ajr/gBSUt5GxYqvzwM6AItWUt4eQBH0k/zZkCTaaYOmsS9k5k0Zep8tKvFPYGZnn+IpYFNs+qB/mFhyOOt9sIKQ0Ue3vWqxTyHg7UbCF5/MjVXc4wAMHI3enDvdwtKtmVeaBu1KixCeoGCIzYWwciJxH2tuBLupPbutck+hGo5aiuvsT7HUMWV9YArh4gLaclfsp1sKae1PKf1C8Kenff58qdZG3FjZkduIx2R84aXjydgwR1fcwWLyPFzC73fQzFkBH5OOkCcP4XGg3mOGH+zDvQkjMNJe82PGoNftvHFsIX1gm5SUHUiV1RLuFEJNOamsmRnxLQVDX7qZilM1sBXYAoxeBs12pq5ucTj3oLAuWAwQEZRyn59M20Rk38PTtpKk/DoYjB4GCm2wvGKcUhyNStr+xrSB7NWLbSy6mlr2XszARN8oyRlSWUoJZ497Y5RiR6MzkRYwVLn5/KMtgHMgfta76lPAPfhWJWiKU4Mk1zk2bPpK8R6T21cCNgRm0AJrUTGC/M7ybWfkzzuQZpbWXlBfe56GTfIfld2lCt0SJyTYFVg0gsWX49LqIbt21uqIn35XI8ThINU39cNtQ7CTvJeGHYWxwg4wNOMsIeWVGuPfo5gluJpzDpvRpi05v55OHRsoj8BXweVpqKSKB5xGIZV0eOtuV87ZQ2ycSL8VmC4NUCygV3fcMBttnc1XX4kgFIK8TBAV/HFSo/dnhqsoQi3FoxZhrg== X-Forefront-PRVS: 0233768B38 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DM2PR0301MB0848;23:Vp+oGcLZ2fm8s8kl5jMBL1Fda6uGkYYHM9X?= =?Windows-1252?Q?EEQci8+86+BgkT7hF3rGx+PKKr9H8EBHqZlgVNI5aB5u1XPi6OFyxN4l?= =?Windows-1252?Q?7mTNCyQxvYbNQ1O5oFQNec0LekbUwj2RwqtGD781eZNUKoSP3VakiUZO?= =?Windows-1252?Q?UMS4ZU5eatcQhB00cJtuoxiI7kCd2vxOqVwZ+JQwnDp2sLymwzkCWlMU?= =?Windows-1252?Q?id8b54AVeY7H6frCjSgdMAdVTJj/GiLyRWLUI0aPbMcj0QKwQxHoFS+W?= =?Windows-1252?Q?Jx3j7GVnbWH+cgYxAJw1wWX/XtiDuFjMN0lU3fvQDfSrvFXdX75LgnQq?= =?Windows-1252?Q?yrAj6Kz+K1Avm2TW4UjYnNffStBViFHbGU434Q2T+jz7mhMOLeHQVLIP?= =?Windows-1252?Q?3fvtm9QFqeJhzK6CpNu3T6+fyrADpUJgq1Y07cIU2gniI+XvEgb5/lva?= =?Windows-1252?Q?TrZtXuxEsTp0Shk8Z/e7iHXRfFawPuE5aNZhxMhS1ikbM6ks9mzphfTE?= =?Windows-1252?Q?WrajY33peY2mJYBh8ANK6+E2RsSO+MJAA9g+TUc0r+YQPnn/fX84KUyP?= =?Windows-1252?Q?eUowgrixqdn1nQpiafKA/zyobe2s1uKCAjuyO1pMvyqvrGMBc0zt+1kc?= =?Windows-1252?Q?F53ovZxspzdzflbOpn2KtV6MPjdqGZ0O+VqUxeyGT2avlHtjbEs+BJ0T?= =?Windows-1252?Q?cOTKCUjH6pYBjC6dG5gH1LdQL923GFdxWgA5Q1jLHvl00Hk8eFz0xeMk?= =?Windows-1252?Q?zDCQWlp+PCj4nHGpMwhTobkJVlaKEuGfMeVuNTqUFegTcBlUe+Ip8oBT?= =?Windows-1252?Q?7H+rfb14HERAjteCVLJifKTeunIgOjUe9V4S9BOibSnaTi5BpQRyR5jz?= =?Windows-1252?Q?q2WBOK3B1TWzDXQGKCckHJa34rNc1glNWjJ5OG7VdNAATCv9pudBMZzw?= =?Windows-1252?Q?8FNUJEtsytupxsYVuhIN7f8wS67NDsyN8/7K7+b5YdNSWCJ9UYUs9zgT?= =?Windows-1252?Q?zeGKUDXiQN30RkirMuPuSu0Zg14pS+o7rnr8uHYg1zNzzKardAM0IetS?= =?Windows-1252?Q?zPVS+GXCszXJoGwRU49PFzuxPuY+KETx0q/8PHb8iV24MI2QNOR1dKoH?= =?Windows-1252?Q?nRZzNuJwKxqkLGWvQkvi2ZYvpQqVbD+buVqDUr5U8iWrrhMTwXLvSuH6?= =?Windows-1252?Q?uSoax68d+S4q2p0e0o7vWG1P5Hm6Gg4luIZ06mlIAE5YALZfDVCZ6zrc?= =?Windows-1252?Q?Sl9HFs0dEyw/HOwps8/PamIWQ9dsUR8VQN8O7v2/5c2hdK+Q5nDoLwjm?= =?Windows-1252?Q?MkOwjpVV5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TO7ngssi/e1yCi8RwSpMpOVnA0IlhDWa/3n9eyIhDBZRivhhPnXnYCRtAt4AbyMCazSaFIaGCv/fz7hqqDU+h4CVMboX39S9dWJZBWHoTMT6xzRC7oUkc4jtXUDz4OGR2VYT++zO29xQR6vbTG+/0TEZGNcRAUtoyPGN5JTthV+fnfXjzEJBHCT6Sf1W4816rzWhETDOiHhlZf74OfFK0A45I7iPloMgA== X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 07:36:33.3997 (UTC) X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.55];Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0848 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1893 Lines: 53 On 28.02.2017 23:08, Dmitry Torokhov wrote: > Instead of manipulating capabilities bits of input device directly, let's > use input_set_capability() API. > > Also, stop setting ABS_X/Y bits explicitly as input_set_abs_params() does > this for us. > > Signed-off-by: Dmitry Torokhov Acked-by: Michael Hennerich > --- > drivers/input/touchscreen/ad7879.c | 9 ++------- > 1 file changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c > index c415614ada68..196028c45210 100644 > --- a/drivers/input/touchscreen/ad7879.c > +++ b/drivers/input/touchscreen/ad7879.c > @@ -590,13 +590,7 @@ int ad7879_probe(struct device *dev, struct regmap *regmap, > > input_set_drvdata(input_dev, ts); > > - __set_bit(EV_ABS, input_dev->evbit); > - __set_bit(ABS_X, input_dev->absbit); > - __set_bit(ABS_Y, input_dev->absbit); > - __set_bit(ABS_PRESSURE, input_dev->absbit); > - > - __set_bit(EV_KEY, input_dev->evbit); > - __set_bit(BTN_TOUCH, input_dev->keybit); > + input_set_capability(input_dev, EV_KEY, BTN_TOUCH); > > if (pdata) { > input_set_abs_params(input_dev, ABS_X, > @@ -614,6 +608,7 @@ int ad7879_probe(struct device *dev, struct regmap *regmap, > } else { > input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, 0, 0); > input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, 0, 0); > + input_set_capability(input_dev, EV_ABS, ABS_PRESSURE); > touchscreen_parse_properties(input_dev, false, NULL); > if (!input_abs_get_max(input_dev, ABS_PRESSURE)) { > dev_err(dev, "Touchscreen pressure is not specified\n"); > -- Greetings, Michael -- Analog Devices GmbH Otl-Aicher Strasse 60-64 80807 M?nchen Sitz der Gesellschaft M?nchen, Registergericht M?nchen HRB 40368, Gesch?ftsf?hrer: Peter Kolberg, Ali Raza Husain, Eileen Wynne