Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753997AbdCPX6n (ORCPT ); Thu, 16 Mar 2017 19:58:43 -0400 Received: from mail-bn3nam01on0055.outbound.protection.outlook.com ([104.47.33.55]:8389 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752193AbdCPX6j (ORCPT ); Thu, 16 Mar 2017 19:58:39 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=synaptics.com; From: Andrew Duggan To: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andrew Duggan , Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Cameron Gutman , Thorsten Leemhuis , Christopher Heiny , Nick Dyer Subject: [PATCH] Input: synaptics-rmi4 - Report slot as inactive when contact is a palm Date: Thu, 16 Mar 2017 16:56:31 -0700 Message-Id: <1489708591-4320-1-git-send-email-aduggan@synaptics.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.147.44.15] X-ClientProxiedBy: BN6PR13CA0030.namprd13.prod.outlook.com (10.171.172.16) To CY1PR0301MB2041.namprd03.prod.outlook.com (10.164.2.23) X-MS-Office365-Filtering-Correlation-Id: afa1b4a3-b46d-4c14-b74b-08d46cc81eb3 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR0301MB2041; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB2041;3:5KPR92VO0XgnHdHTOnRGTPKgnXoZAkzYMRLQYTcUyOcSaJbYaSmiKpZEu2pRH8aGkp4B0Ypa2QLSaWEvHKXnn+gmiy7KXDBW7wuhcogK2LadhHJquKV2xLVl9QTJb06f5GUzG5qGPU9zL7LjUpD+Ecw4D9SryubqnY3IJ+0V06fmqq0DST7HQ2/Urwc5EBg5EsCCw1QCntO5DZugRPEreZdG/acXV4zqd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2y7lkyVW7n2ByvkvbvtwCmzmHyxz63GL5YkBFDGb85VXR2bS+Vv/nxe1CjZ+uozBaeBpOOMX0/Yt/6KlxWAQGeQNv47hhiDxtl1deT2BYcdE+LuVQopWMqjK3mKnntepNbKK/56t1z4WjXe0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211171220733660); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123558025)(20161123555025)(6072148);SRVR:CY1PR0301MB2041;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB2041; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB2041;4:oLtBs5wlWoKhcJRMGIeCoi0IlyMPEsmYR2zBIb/wNBZblBglZ8B0pwuVqpNWpCXS33kEe8ZCuNmNI22nPsfSe8yuja6AJ4JKjZFD2scwpeMtbIFL//bzQoX8IhCq2epacC2+E9EdG69OedOu1984BawV02km6lPtObMNwLZt9tO4qeTA+0c+FTTjYZ4Zed+76tW1nY8Sa8O4WU7SEHFnZjDEIkPPyQ9u/kXwLxs+zjCGPa5iOS7L3sxmNzn/Nx74KMHvV/kaQ+sWyO/2pyn91JxoH6ksWFoCid2fZv0FvkXEd2GmoDVEJUp7Kzg2D52M+D+8zjrnajqmmGhZUD187WlekRk4go7QZ2KIRqJNQ5TV8yfHuAl6I3fNouI/OgeVtvCrrWqZJGAoDhUGw6TsJaN1/k3ksD7OA4tZtqjBJijKAPtCNPsVOLio4jQtUzDa0o4kpqqXMrUOevXSpOMgsiWxXYAixqWDKt2QhQMMr2yU6bD/4NKMT6YdWSTlYqi51MmV9N06yKG1TNki0GJ4oet0n6VuGrMdy/RBw7CNiyq0zAkqlKKRVgOqND/KLQZ8h2T2fTTB13g+ShCw4duTrnAaBehGBs5o5zPM0tR3LjhWAVCN3TJwXneCeQNHaTsvH8MNag7iex9OFgsTx6CYKA== X-Forefront-PRVS: 024847EE92 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(979002)(6009001)(39450400003)(305945005)(66066001)(47776003)(4326008)(38730400002)(7736002)(48376002)(50466002)(81166006)(50226002)(8676002)(110136004)(6116002)(3846002)(189998001)(53936002)(36756003)(54906002)(6512007)(42186005)(25786008)(5660300001)(86362001)(33646002)(6506006)(50986999)(5003940100001)(223583001)(2906002)(6486002)(6666003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB2041;H:noble.synaptics-inc.local;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB2041;23:j4nl0qNGkhVZ5Edw7tqEKPhK5cjI7xq5gIAZGOv?= =?us-ascii?Q?adQh+DIS3iZqxRmhx/QsQ2ZxhaJGEsMWcBucRP28SMdElZLTATnmLc49m21r?= =?us-ascii?Q?d4POPGcliBzpfiaj4qncGqV8gHCHRKFbx4uu8PRh5bo1gYQOV0tkI38cibeQ?= =?us-ascii?Q?93Z+nZ8OBjJT0IsrI34zdZpZC5WWyFAZbaVSo/f1BoGUxHct9k50Obzbyw8U?= =?us-ascii?Q?RqDi55TXW0lb5ixFGlmrS2wArp6YGme0mY1NeUjYacscfuV1r3b7xuTI356n?= =?us-ascii?Q?UrTY5XnzCfqPDL+0QjWdIXc9Q5g4M9cKz5SCxnFTC61tW6d73vfFVH1q7MEE?= =?us-ascii?Q?FV0W0GhkVKi7Rm/LOHjZKJRlAPY/3PRFQpvFQtBUjl25Rp0pCezIs3KFYgFM?= =?us-ascii?Q?9wGJyf2cQgnDJ4oDIpdTOUdvpBDvqoog+hmS57Zz12buLxgZoEN6a5HHM7D1?= =?us-ascii?Q?ZMM+aIM3DfPMQe2484Sh1oKCqXQ6K6hlGPt5hq1CULyhEd5RsorGWyGEU3X5?= =?us-ascii?Q?2+e+PsueCD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pcQBNSGgCW3sFh+vM5UEH4H+4GcCZT+DCgC9R6nBWetSLhyb6iYE7WbN36I09kwcToQ==;24:8BTPL5USNrrDpO4pLFak1VEeKTrNPaiKbz3FfnRgqwu9omkGEaVFGRL6Jt4hIytcpr6Z6PPqiubD47xvFNKlwpFro/vWdmj8XgKLlFuSoKs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB2041;7:vysvb5FqzUniru1ZbCNj1iNs0/ZNJL79ThFW51ow8eqCGuYyuxg15dZqwzeQR3zRfrdbXMgMQfTt/8G4na3ntYOSnKMdEL4fc5b59/dPOQ6Ro3fUYSJU+P6U05CHTUC13QxjplxM0f2NdwiNFaDJKfPz5bga+r4DaFAlmDzJ2jOhQjj8AQXUM9HKN5a51+FB8zpocSndLNfqmijdzSneOW3rKF+ZQWiK1L6jYI/ulENl3OvHwP1YVU5LwNKJA2cguH1/JW45/AZflHiEJbx8G/cVwNGsnvjLIzZmgxdeJmkV7QawuxwMEEhATr3R+XeTZmZ9OUbV8U2Bu4ARSSRnkw== X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2017 23:56:51.6997 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB2041 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 29 When the firmware identifies a contact as a palm the driver sets the tool type to MT_TOOL_PALM, but sets the slot state as active. Reporting the palm as active results in userspace input libraries considering the palm as a valid contact. Touchpads which previously were using hid-multitouch are now not suppressing palms when switching to the RMI4 driver. This change fixes palm rejection when using the RMI4 driver. Signed-off-by: Andrew Duggan Tested-by: Cameron Gutman --- drivers/input/rmi4/rmi_2d_sensor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/rmi4/rmi_2d_sensor.c b/drivers/input/rmi4/rmi_2d_sensor.c index 8bb866c..8d1f295 100644 --- a/drivers/input/rmi4/rmi_2d_sensor.c +++ b/drivers/input/rmi4/rmi_2d_sensor.c @@ -80,7 +80,8 @@ void rmi_2d_sensor_abs_report(struct rmi_2d_sensor *sensor, input_mt_slot(input, slot); input_mt_report_slot_state(input, obj->mt_tool, - obj->type != RMI_2D_OBJECT_NONE); + (obj->type != RMI_2D_OBJECT_NONE) + && (obj->type != RMI_2D_OBJECT_PALM)); if (obj->type != RMI_2D_OBJECT_NONE) { obj->x = sensor->tracking_pos[slot].x; -- 2.7.4