From patchwork Sun Aug 16 21:14:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 11716215 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 95F1214F6 for ; Sun, 16 Aug 2020 21:15:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 787FA2078D for ; Sun, 16 Aug 2020 21:15:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=NETORG5796793.onmicrosoft.com header.i=@NETORG5796793.onmicrosoft.com header.b="SfJJTRcr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728984AbgHPVPG (ORCPT ); Sun, 16 Aug 2020 17:15:06 -0400 Received: from mail-dm6nam10on2059.outbound.protection.outlook.com ([40.107.93.59]:32963 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726331AbgHPVPF (ORCPT ); Sun, 16 Aug 2020 17:15:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UJzXbQBR/3Uc/RZvonJ79keMYr9PtgH3rrx3QWjEBoFancLc6CSilNFkzSjTXdhf79c5wnLahBDpq5Uy+0tZ++fjyA75Uq9KVS1e9ofQfJFLyLAuUxBM8I0yNy6x8CPNWnU4JbjaXhtsgDIWLwe7AfM5xAiqFNCfJnxTCqiA4P0lc3BVsXUT1VXLXzurFVx73oi2HJqAyXXS/lDeb6obZDQxPVcn0pc0txHRZcwNdhvJajGmVk3WUvZ0vWuqyEhWbqHT/czwcltrL+TqAdLpDbU3NdD4/cbTMMbV80CiAJg6DQ+I5BOFMwjYztJcTQtdUaIucf3uGalb/aMs6bOffg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ys8qGZuCkJQq+Fvfp3QROd8s8RMA2dIsbBXjErkIA3o=; b=Si2YkGQz58fgXT1FK5VY26ulBC4/vE7jibIbczsNhL4zZZJUzSEXj3mUx7kzO1FyhTHa+303fME3suIrBHKuxKxUHPPPoVy2qaxDcrug7LJQsFpbyxd0shJv/5hjp6PI+VVqd4arfZ9DXVieQrW4gYKS3nB1yHuAK2yUVhc453KLekgJ1Bg5MEiRxRRpC79P9ZolOBpBR4XadsfT+Z4wv7pKtzMWCxFJ0+7MnsrcZJAy/ke8g8YvpWwiZ8n+im/NLQ/NVgA201r1Hu8CVRgGwgj5rq4MpP9JZ/W+Q4PM31vQRBrpymHRNn/wFOKzCl7LaAcOjH7HAhf0eBfN/3AInA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ys8qGZuCkJQq+Fvfp3QROd8s8RMA2dIsbBXjErkIA3o=; b=SfJJTRcrMoSLPBcEqbcoLhkty75slY1VIQaV8oTQA+aM1Zs4kZOClVWRmvvUDaJ10zyKU96R8NZkQMLkEpoKmqsF6lfG9nB6SyrwRePzjWMaRI76v3w6U4FJZajSSQe59H7GoX4UY4typwDfGiaifEVom0wcw4v6JQ1b4cBJy1I= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=labundy.com; Received: from SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) by SN6PR08MB5631.namprd08.prod.outlook.com (2603:10b6:805:fb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Sun, 16 Aug 2020 21:15:03 +0000 Received: from SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875]) by SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875%6]) with mapi id 15.20.3283.027; Sun, 16 Aug 2020 21:15:03 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 1/6] dt-bindings: input: iqs269a: Add bindings for slider gestures Date: Sun, 16 Aug 2020 16:14:22 -0500 Message-Id: <1597612467-15093-2-git-send-email-jeff@labundy.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597612467-15093-1-git-send-email-jeff@labundy.com> References: <1597612467-15093-1-git-send-email-jeff@labundy.com> X-ClientProxiedBy: SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) To SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (136.49.227.119) by SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3283.27 via Frontend Transport; Sun, 16 Aug 2020 21:15:02 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [136.49.227.119] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 515d1faf-201c-4767-a455-08d84229710c X-MS-TrafficTypeDiagnostic: SN6PR08MB5631: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kgStnqI4LR6Nu2Sroos4zeK6DHlXiXwBv2ll1TPDrNAKGElol17pa0lD/pLpktUNml2YFDgtuLaf9FQ9Wb6+zsTbpGUqto1yRZaQaAMD6ssdg8h4Vt1GkWUFzzmhV+PhrdlKOmqqTLPF0Pvi4+U0/Apcmlo8i0J5up2/Ro4SWo/vVHhiV2NgofJQ0GDAnrlypDtMJZ3uN/lgBH8b7DLDO+lMyVOJTKhwl6gurqpuvCettl0Hxz8vNo+o8J4k7pc67cl130ojFgHBN9TFV5InwKS4Gq4j1vLm+xdu+leNDfFghfOW+nP22/fhqi/uPf++fwWf+tVvAq8zpwiH1SHK3X6SBT6R+YWe4RJPrXYT/FN4HbSeoVJkmN0K99s4f4pu X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR08MB5517.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(39830400003)(136003)(366004)(396003)(376002)(346002)(66476007)(6666004)(66556008)(69590400007)(36756003)(4326008)(86362001)(107886003)(2616005)(956004)(316002)(16526019)(8676002)(83380400001)(6506007)(8936002)(52116002)(6512007)(2906002)(478600001)(5660300002)(66946007)(26005)(186003)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: odvYUVrEI9rB/0Khjlkj+y5/pphAHLxorndIjvQVZuXEO+Ng5q6RscDISNj3ymZAPi+X9s+2DgIsn7lzk5CgLU2jaPXgTEyVwnP0cUK5Tx62Raz5QJQgfYv86mFEdF4dgGQGwvrA9savxKFnKnozRUqwZV5Zc5+Cffpd5piOqdAhmphRSh+gm2p+Xk/xpv9OOVgGdN/E3ePWrIP4yXiVOYX8g/s7EILA9hKf1NDKg8nLKzRXJ7LpOEG/skofuXIib+Fu6bWAFiGYB/QVpois/Ye5WOCTk2FiGUb713OFFjr9XOksubaUx5cucvMMmZzmmo1BwIsiTdTQjWISaW2f17G/o5TvPBtPqF/J3IxXcXUZxn1tr+l6HWI9uJG4NpYSs3iVZSNgLMVMTudJhcw2ZN4XeM9HTUpiLIE/fKwxH5HE1mULKsfvP13VMOEqAzJ3J9n0PJV/tlrZnNs9cW4dqG8Nr4+UX4nXDIyLCwoR6C3Bd9tjKyEIzd8VBzkOLSNzywhlOEq4cDMbpv5n/4mPMcXs8xB9W/XV+9JKAI2TtnwsdrKC0kc4dViKGOtqJSBixURYyDbQ2rijbDuaTX43LZiNP2rryrMEolYieFwb8p+O06UGBZskJM5J9/zN61HMdwCgR8bSOyZkNy/xF2JW4A== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 515d1faf-201c-4767-a455-08d84229710c X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5517.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2020 21:15:03.2100 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RzgJ5fBO1BYh48wTk94xleimLPCt7sZWWfN6N/bkewWZ4qh0uW346mnS45W03Xfp64rt7jEr2ZcDLWmG/rBhtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB5631 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This patch adds bindings for slider gestures that can be expressed by the device. Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring --- .../devicetree/bindings/input/iqs269a.yaml | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/Documentation/devicetree/bindings/input/iqs269a.yaml b/Documentation/devicetree/bindings/input/iqs269a.yaml index 9c154e5..e13812d 100644 --- a/Documentation/devicetree/bindings/input/iqs269a.yaml +++ b/Documentation/devicetree/bindings/input/iqs269a.yaml @@ -61,6 +61,12 @@ properties: default: 3 description: Specifies the ultra-low-power mode update rate. + azoteq,slider-swipe: + type: boolean + description: + Directs the device to interpret axial gestures as a swipe (finger remains + on slider) instead of a flick (finger leaves slider). + azoteq,reseed-offset: type: boolean description: @@ -204,6 +210,57 @@ properties: default: 1 description: Specifies the slider coordinate filter strength. + linux,keycodes: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 1 + maxItems: 8 + description: | + Specifies the numeric keycodes associated with each available gesture in + the following order (enter 0 for unused gestures): + 0: Slider 0 tap + 1: Slider 0 hold + 2: Slider 0 positive flick or swipe + 3: Slider 0 negative flick or swipe + 4: Slider 1 tap + 5: Slider 1 hold + 6: Slider 1 positive flick or swipe + 7: Slider 1 negative flick or swipe + + azoteq,timeout-tap-ms: + multipleOf: 16 + minimum: 0 + maximum: 4080 + default: 400 + description: + Specifies the length of time (in ms) within which a slider touch must be + released in order to be interpreted as a tap. Default and maximum values + as well as step size are reduced by a factor of 4 with device version 2. + + azoteq,timeout-swipe-ms: + multipleOf: 16 + minimum: 0 + maximum: 4080 + default: 2000 + description: + Specifies the length of time (in ms) within which an axial gesture must be + completed in order to be interpreted as a flick or swipe. Default and max- + imum values as well as step size are reduced by a factor of 4 with device + version 2. + + azoteq,thresh-swipe: + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 255 + default: 128 + description: + Specifies the number of points across which an axial gesture must travel + in order to be interpreted as a flick or swipe. + +dependencies: + azoteq,timeout-tap-ms: ["linux,keycodes"] + azoteq,timeout-swipe-ms: ["linux,keycodes"] + azoteq,thresh-swipe: ["linux,keycodes"] + patternProperties: "^channel@[0-7]$": type: object @@ -487,6 +544,14 @@ examples: azoteq,hall-enable; azoteq,suspend-mode = <2>; + linux,keycodes = , + , + , + ; + + azoteq,timeout-tap-ms = <400>; + azoteq,timeout-swipe-ms = <800>; + channel@0 { reg = <0x0>; From patchwork Sun Aug 16 21:14:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 11716217 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA60314F6 for ; Sun, 16 Aug 2020 21:15:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A94A620866 for ; Sun, 16 Aug 2020 21:15:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=NETORG5796793.onmicrosoft.com header.i=@NETORG5796793.onmicrosoft.com header.b="F0eaG0xr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729100AbgHPVPR (ORCPT ); Sun, 16 Aug 2020 17:15:17 -0400 Received: from mail-dm6nam10on2076.outbound.protection.outlook.com ([40.107.93.76]:55009 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726331AbgHPVPL (ORCPT ); Sun, 16 Aug 2020 17:15:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eh7p2MM0K5a1XRvjQyzFH2pIAVMzKS4Gc+JhuXmtcD+0o7GqNi+khQ+IFGvWBrHB+h9dUkaT6xdMGEm1m1Yg5+0KTUVlgo3ZlUqJPqU4mAwaxxmP18t4sBemqekPHhCeZIWDSabnP5Vtv+sb5MZnbM2DM0IS0HQOyodykC0XHHfbtHZYMfcPIxUcLojZRo36A6RVCAgJkxLdKca/z8yR/i+bMW2W7H7ofgRMpyrytdbZeiCXI4VPj0K7ATMDyJJa692LgGyyNOmR0MAOUUVylJ9WaNs8kNz6qxrmdHnw2IAI4atIBhek6AGI+A5LZHSPhq3+qkcBW8GFFlYuZmVihQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R03ZvJREaA94tS0/myDWnxx/ECNuojaXDIyBGhfRplo=; b=KkWeE/nLAQwD2ATSQY/rSYvfuMserVwQLzKMYMXzuOXN1bYHBJUeiDC3MQWOIumnvC6vxjMJvPU7IgNFd+IjqtvS1eD5eWiA6HdzH1qPNJTlzmgc7S8IfRJOwYFLFkITwRfmzCs0g3MKienzrpRN3bQehXpaBMvyNKL47ptXwPpS+ezY/LiWs216eq7x/++kzWdFiAMm+JF/Xeo8OyGaKN2MFtGRar+ebF/VXvm59bROvGJVFj2EkjqspWTnfdJJpE5q4PW3jDCUQyTY2FemRH9SS7JPi8Cg49MvlmwLLMQt83pRLrosSDmVWoK+PpCnSq/YXa4d0GhAaauBv2q+2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=R03ZvJREaA94tS0/myDWnxx/ECNuojaXDIyBGhfRplo=; b=F0eaG0xrji4aMi68Ib+7brkX+Q7BHWBTSZJwBK5YUd82hkmUt7rKsLLArFbS5c3k963n+IfdXVXO4QiMmGlWTYqLv4VZYKkgU8qFw3EPxAmjWULqkg0tQF+/S0aRO28JSRkqTIRRwtR5pIoDO9YacSoVzeFUHqpUqKVqON1hsiE= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=labundy.com; Received: from SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) by SN6PR08MB5631.namprd08.prod.outlook.com (2603:10b6:805:fb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Sun, 16 Aug 2020 21:15:07 +0000 Received: from SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875]) by SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875%6]) with mapi id 15.20.3283.027; Sun, 16 Aug 2020 21:15:07 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 2/6] input: iqs269a: Add support for slider gestures Date: Sun, 16 Aug 2020 16:14:23 -0500 Message-Id: <1597612467-15093-3-git-send-email-jeff@labundy.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597612467-15093-1-git-send-email-jeff@labundy.com> References: <1597612467-15093-1-git-send-email-jeff@labundy.com> X-ClientProxiedBy: SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) To SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (136.49.227.119) by SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3283.27 via Frontend Transport; Sun, 16 Aug 2020 21:15:06 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [136.49.227.119] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2abbe40d-61b9-44f2-7ee0-08d842297353 X-MS-TrafficTypeDiagnostic: SN6PR08MB5631: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3aDPD81+p6rPAdnfHinpqCxv6l7VN/bxGBgoqlOPCJJN7/HQDpd9Q+XxZTP29vu6VxL+6cDEE2JmfzqjquebjV86hfYf+4FvPv/E5p6Wsx7pKyDXWk2Cz842H7bjD6XTW5r3sZOeQ1r7+qvYPxK0b9GryIYE+S81a+oWDd1fG5g45fkmqZeya8rPFTFjLEU+GMcGKCvF8BuYC+kjzbJZ2Nkv9g7aW9+dGYR9uK4NmjhOSIEqtAaTU3UEkkilDqdWNmBiEgerDUtLgf2nWoNadxksHmlRjUfqA2n/Mth5Yb1daMmqn9R7/IS+/ABbFpj7821t9J4hKEI/gFbJlS/A09zL6Ix/by9yeu8f10MaYbvvBxoqRMMuPxMsw8XW0qm6 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR08MB5517.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(39830400003)(136003)(366004)(396003)(376002)(346002)(66476007)(6666004)(66556008)(69590400007)(36756003)(4326008)(86362001)(107886003)(2616005)(956004)(316002)(16526019)(8676002)(83380400001)(30864003)(6506007)(8936002)(52116002)(6512007)(2906002)(478600001)(5660300002)(66946007)(26005)(186003)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Vy9HzJbfMvBW/4feVYI2d4ovNYMs8htLIsmIv8roOWyBmcIfUVoOEBZCPcSUuJlHcDyceIhcKBNUv9WI6yCvWVnbkNhciPfgm/sLnU2OxyqlIgFalx1O2d2qLjHWIBhXGeUZ40o6pOfySajTcdVurVD71xb3mRWGywV0580OqyjySe5/5R6gyHy5LgwgPdAbFJHl2EKisncGXL5AxbNFvzbYhyimn0zLwU4cMYzSjfiqhdQNo6oYegx0btxveV64otnfO/wyyW3u3pL4ffEqD+AnaxTU9E1HT1+nNRVLhHSqoNz2JXl0/6NRI5aYm884nkC1KNSy4heORs6AijCqa+QjPO4XJTCqJZVleRZW5lLcXDdzyDx5Hx7tzxppgiakRXzzGLAJom3eQ31xqFnpSb39GYc48C2N9I2gKd9Yt/c5ueAS2nsyEij/9oeaabtqrUYDVQm8cwGTn4vzOrKg0UyCW3+i761XOc2o+2Bw9529xuH4kvMP67ytJShw+BANz4Djq0NsjNbHVdiVbhl+om7yaE3qDM85Ikg7iPg2txAzSoF7ZtkxN53/YGsCNM06l2CoEt1ki9B3riCGxogUtamsb4WUB00vovV0Qhdd8eI+jMI5dyPM9vWxtHhYOaWHP5YOJFnm/PEDxKqfm6+KEA== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2abbe40d-61b9-44f2-7ee0-08d842297353 X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5517.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2020 21:15:07.0728 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1/mMA5kjRjO6gYfZ/FpZtsvAbZsgx9wpYFeenHzNs1/w+m7XuMt4CNV5K5mddojbgwtJtzN0iW1UWrVZfCi1GA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB5631 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This patch adds support for slider gestures that can be expressed by the device. Each gesture (e.g. tap or hold) can be mapped to a unique keycode for either slider 0 or 1. With this change, raw slider coordinates are reported only if the slider has no keycodes defined. This prevents unwanted mouse cur- sor movement when expressing axial gestures (e.g. swipe) and also eliminates some unnecessary I2C traffic. Different revisions of silicon use different tap and swipe timeout step sizes. Apply an appropriate scaling factor depending on which revision is found. To facilitate this change, store the iqs269_ver_info struct in the driver's private data so that other functions can use it after the driver has probed. Last but not least, a former reserved field in iqs269_ver_info now contains useful information; give it a name (fw_num). Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs269a.c | 219 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 190 insertions(+), 29 deletions(-) diff --git a/drivers/input/misc/iqs269a.c b/drivers/input/misc/iqs269a.c index a348247..095e5d5 100644 --- a/drivers/input/misc/iqs269a.c +++ b/drivers/input/misc/iqs269a.c @@ -25,6 +25,8 @@ #define IQS269_VER_INFO 0x00 #define IQS269_VER_INFO_PROD_NUM 0x4F +#define IQS269_VER_INFO_FW_NUM_2 0x03 +#define IQS269_VER_INFO_FW_NUM_3 0x10 #define IQS269_SYS_FLAGS 0x02 #define IQS269_SYS_FLAGS_SHOW_RESET BIT(15) @@ -52,6 +54,7 @@ #define IQS269_SYS_SETTINGS_ULP_UPDATE_MASK GENMASK(10, 8) #define IQS269_SYS_SETTINGS_ULP_UPDATE_SHIFT 8 #define IQS269_SYS_SETTINGS_ULP_UPDATE_MAX 7 +#define IQS269_SYS_SETTINGS_SLIDER_SWIPE BIT(7) #define IQS269_SYS_SETTINGS_RESEED_OFFSET BIT(6) #define IQS269_SYS_SETTINGS_EVENT_MODE BIT(5) #define IQS269_SYS_SETTINGS_EVENT_MODE_LP BIT(4) @@ -68,6 +71,7 @@ #define IQS269_FILT_STR_MAX 3 #define IQS269_EVENT_MASK_SYS BIT(6) +#define IQS269_EVENT_MASK_GESTURE BIT(3) #define IQS269_EVENT_MASK_DEEP BIT(2) #define IQS269_EVENT_MASK_TOUCH BIT(1) #define IQS269_EVENT_MASK_PROX BIT(0) @@ -96,6 +100,10 @@ #define IQS269_MISC_B_TRACKING_UI_ENABLE BIT(4) #define IQS269_MISC_B_FILT_STR_SLIDER GENMASK(1, 0) +#define IQS269_TIMEOUT_TAP_MS_MAX 4080 +#define IQS269_TIMEOUT_SWIPE_MS_MAX 4080 +#define IQS269_THRESH_SWIPE_MAX 255 + #define IQS269_CHx_SETTINGS 0x8C #define IQS269_CHx_ENG_A_MEAS_CAP_SIZE BIT(15) @@ -183,6 +191,20 @@ enum iqs269_event_id { IQS269_EVENT_DEEP_UP, }; +enum iqs269_slider_id { + IQS269_SLIDER_NONE, + IQS269_SLIDER_KEY, + IQS269_SLIDER_RAW, +}; + +enum iqs269_gesture_id { + IQS269_GESTURE_TAP, + IQS269_GESTURE_HOLD, + IQS269_GESTURE_FLKP, + IQS269_GESTURE_FLKN, + IQS269_NUM_GESTURES, +}; + struct iqs269_switch_desc { unsigned int code; bool enabled; @@ -242,7 +264,7 @@ struct iqs269_ver_info { u8 prod_num; u8 sw_num; u8 hw_num; - u8 padding; + u8 fw_num; } __packed; struct iqs269_sys_reg { @@ -294,9 +316,11 @@ struct iqs269_private { struct iqs269_switch_desc switches[ARRAY_SIZE(iqs269_events)]; struct iqs269_ch_reg ch_reg[IQS269_NUM_CH]; struct iqs269_sys_reg sys_reg; + struct iqs269_ver_info ver_info; struct input_dev *keypad; struct input_dev *slider[IQS269_NUM_SL]; unsigned int keycode[ARRAY_SIZE(iqs269_events) * IQS269_NUM_CH]; + unsigned int gs_code[IQS269_NUM_SL][IQS269_NUM_GESTURES]; unsigned int suspend_mode; unsigned int delay_mult; unsigned int ch_num; @@ -304,6 +328,21 @@ struct iqs269_private { bool ati_current; }; +static enum iqs269_slider_id iqs269_slider_type(struct iqs269_private *iqs269, + int slider_num) +{ + int i; + + if (!iqs269->sys_reg.slider_select[slider_num]) + return IQS269_SLIDER_NONE; + + for (i = 0; i < IQS269_NUM_GESTURES; i++) + if (iqs269->gs_code[slider_num][i] != KEY_RESERVED) + return IQS269_SLIDER_KEY; + + return IQS269_SLIDER_RAW; +} + static int iqs269_ati_mode_set(struct iqs269_private *iqs269, unsigned int ch_num, unsigned int mode) { @@ -978,6 +1017,72 @@ static int iqs269_parse_prop(struct iqs269_private *iqs269) */ sys_reg->redo_ati = sys_reg->active; + if (device_property_present(&client->dev, "linux,keycodes")) { + int scale = 1; + int count = device_property_count_u32(&client->dev, + "linux,keycodes"); + if (count > IQS269_NUM_GESTURES * IQS269_NUM_SL) { + dev_err(&client->dev, "Too many keycodes present\n"); + return -EINVAL; + } else if (count < 0) { + dev_err(&client->dev, "Failed to count keycodes: %d\n", + count); + return count; + } + + error = device_property_read_u32_array(&client->dev, + "linux,keycodes", + *iqs269->gs_code, count); + if (error) { + dev_err(&client->dev, "Failed to read keycodes: %d\n", + error); + return error; + } + + /* + * Early revisions of silicon use a more granular step size for + * tap and swipe gesture timeouts; scale them appropriately. + */ + if (iqs269->ver_info.fw_num < IQS269_VER_INFO_FW_NUM_3) + scale = 4; + + if (!device_property_read_u32(&client->dev, + "azoteq,timeout-tap-ms", &val)) { + if (val > IQS269_TIMEOUT_TAP_MS_MAX / scale) { + dev_err(&client->dev, "Invalid timeout: %u\n", + val); + return -EINVAL; + } + + sys_reg->timeout_tap = val / (16 / scale); + } + + if (!device_property_read_u32(&client->dev, + "azoteq,timeout-swipe-ms", + &val)) { + if (val > IQS269_TIMEOUT_SWIPE_MS_MAX / scale) { + dev_err(&client->dev, "Invalid timeout: %u\n", + val); + return -EINVAL; + } + + sys_reg->timeout_swipe = val / (16 / scale); + } + + if (!device_property_read_u32(&client->dev, + "azoteq,thresh-swipe", &val)) { + if (val > IQS269_THRESH_SWIPE_MAX) { + dev_err(&client->dev, "Invalid threshold: %u\n", + val); + return -EINVAL; + } + + sys_reg->thresh_swipe = val; + } + + sys_reg->event_mask &= ~IQS269_EVENT_MASK_GESTURE; + } + general = be16_to_cpu(sys_reg->general); if (device_property_present(&client->dev, "azoteq,clk-div")) { @@ -1008,6 +1113,10 @@ static int iqs269_parse_prop(struct iqs269_private *iqs269) general |= (val << IQS269_SYS_SETTINGS_ULP_UPDATE_SHIFT); } + general &= ~IQS269_SYS_SETTINGS_SLIDER_SWIPE; + if (device_property_present(&client->dev, "azoteq,slider-swipe")) + general |= IQS269_SYS_SETTINGS_SLIDER_SWIPE; + general &= ~IQS269_SYS_SETTINGS_RESEED_OFFSET; if (device_property_present(&client->dev, "azoteq,reseed-offset")) general |= IQS269_SYS_SETTINGS_RESEED_OFFSET; @@ -1016,10 +1125,11 @@ static int iqs269_parse_prop(struct iqs269_private *iqs269) /* * As per the datasheet, enable streaming during normal-power mode if - * either slider is in use. In that case, the device returns to event - * mode during low-power mode. + * raw coordinates will be read from either slider. In that case, the + * device returns to event mode during low-power mode. */ - if (sys_reg->slider_select[0] || sys_reg->slider_select[1]) + if (iqs269_slider_type(iqs269, 0) == IQS269_SLIDER_RAW || + iqs269_slider_type(iqs269, 1) == IQS269_SLIDER_RAW) general |= IQS269_SYS_SETTINGS_EVENT_MODE_LP; general |= IQS269_SYS_SETTINGS_REDO_ATI; @@ -1164,19 +1274,37 @@ static int iqs269_input_init(struct iqs269_private *iqs269) } for (i = 0; i < IQS269_NUM_SL; i++) { - if (!iqs269->sys_reg.slider_select[i]) + if (iqs269_slider_type(iqs269, i) == IQS269_SLIDER_NONE) continue; iqs269->slider[i] = devm_input_allocate_device(&client->dev); if (!iqs269->slider[i]) return -ENOMEM; + iqs269->slider[i]->keycodemax = ARRAY_SIZE(iqs269->gs_code[i]); + iqs269->slider[i]->keycode = iqs269->gs_code[i]; + iqs269->slider[i]->keycodesize = sizeof(**iqs269->gs_code); + iqs269->slider[i]->name = i ? "iqs269a_slider_1" : "iqs269a_slider_0"; iqs269->slider[i]->id.bustype = BUS_I2C; - input_set_capability(iqs269->slider[i], EV_KEY, BTN_TOUCH); - input_set_abs_params(iqs269->slider[i], ABS_X, 0, 255, 0, 0); + for (j = 0; j < IQS269_NUM_GESTURES; j++) + if (iqs269->gs_code[i][j] != KEY_RESERVED) + input_set_capability(iqs269->slider[i], EV_KEY, + iqs269->gs_code[i][j]); + + /* + * Present the slider as a narrow trackpad if one or more chan- + * nels have been selected to participate, but no gestures have + * been mapped to a keycode. + */ + if (iqs269_slider_type(iqs269, i) == IQS269_SLIDER_RAW) { + input_set_capability(iqs269->slider[i], + EV_KEY, BTN_TOUCH); + input_set_abs_params(iqs269->slider[i], + ABS_X, 0, 255, 0, 0); + } error = input_register_device(iqs269->slider[i]); if (error) { @@ -1222,28 +1350,62 @@ static int iqs269_report(struct iqs269_private *iqs269) return error; } - error = regmap_raw_read(iqs269->regmap, IQS269_SLIDER_X, slider_x, - sizeof(slider_x)); - if (error) { - dev_err(&client->dev, "Failed to read slider position: %d\n", - error); - return error; + if (iqs269_slider_type(iqs269, 0) == IQS269_SLIDER_RAW || + iqs269_slider_type(iqs269, 1) == IQS269_SLIDER_RAW) { + error = regmap_raw_read(iqs269->regmap, IQS269_SLIDER_X, + slider_x, sizeof(slider_x)); + if (error) { + dev_err(&client->dev, + "Failed to read slider position: %d\n", error); + return error; + } } for (i = 0; i < IQS269_NUM_SL; i++) { - if (!iqs269->sys_reg.slider_select[i]) + flags.gesture >>= (i * IQS269_NUM_GESTURES); + + switch (iqs269_slider_type(iqs269, i)) { + case IQS269_SLIDER_NONE: continue; - /* - * Report BTN_TOUCH if any channel that participates in the - * slider is in a state of touch. - */ - if (flags.states[IQS269_ST_OFFS_TOUCH] & - iqs269->sys_reg.slider_select[i]) { - input_report_key(iqs269->slider[i], BTN_TOUCH, 1); - input_report_abs(iqs269->slider[i], ABS_X, slider_x[i]); - } else { - input_report_key(iqs269->slider[i], BTN_TOUCH, 0); + case IQS269_SLIDER_KEY: + for (j = 0; j < IQS269_NUM_GESTURES; j++) + input_report_key(iqs269->slider[i], + iqs269->gs_code[i][j], + flags.gesture & BIT(j)); + + if (!(flags.gesture & (BIT(IQS269_GESTURE_FLKN) | + BIT(IQS269_GESTURE_FLKP) | + BIT(IQS269_GESTURE_TAP)))) + break; + + input_sync(iqs269->slider[i]); + + /* + * Momentary gestures are followed by a complementary + * release cycle so as to emulate a full keystroke. + */ + for (j = 0; j < IQS269_NUM_GESTURES; j++) + if (j != IQS269_GESTURE_HOLD) + input_report_key(iqs269->slider[i], + iqs269->gs_code[i][j], + 0); + break; + + case IQS269_SLIDER_RAW: + /* + * The slider is considered to be in a state of touch + * if any selected channels are in a state of touch. + */ + state = flags.states[IQS269_ST_OFFS_TOUCH]; + state &= iqs269->sys_reg.slider_select[i]; + + input_report_key(iqs269->slider[i], BTN_TOUCH, state); + + if (state) + input_report_abs(iqs269->slider[i], + ABS_X, slider_x[i]); + break; } input_sync(iqs269->slider[i]); @@ -1635,7 +1797,6 @@ static const struct regmap_config iqs269_regmap_config = { static int iqs269_probe(struct i2c_client *client) { - struct iqs269_ver_info ver_info; struct iqs269_private *iqs269; int error; @@ -1656,14 +1817,14 @@ static int iqs269_probe(struct i2c_client *client) mutex_init(&iqs269->lock); - error = regmap_raw_read(iqs269->regmap, IQS269_VER_INFO, &ver_info, - sizeof(ver_info)); + error = regmap_raw_read(iqs269->regmap, IQS269_VER_INFO, + &iqs269->ver_info, sizeof(iqs269->ver_info)); if (error) return error; - if (ver_info.prod_num != IQS269_VER_INFO_PROD_NUM) { + if (iqs269->ver_info.prod_num != IQS269_VER_INFO_PROD_NUM) { dev_err(&client->dev, "Unrecognized product number: 0x%02X\n", - ver_info.prod_num); + iqs269->ver_info.prod_num); return -EINVAL; } From patchwork Sun Aug 16 21:14:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 11716219 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7652014F6 for ; Sun, 16 Aug 2020 21:15:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59B7C20866 for ; Sun, 16 Aug 2020 21:15:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=NETORG5796793.onmicrosoft.com header.i=@NETORG5796793.onmicrosoft.com header.b="f+q6nGEo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729117AbgHPVPT (ORCPT ); Sun, 16 Aug 2020 17:15:19 -0400 Received: from mail-dm6nam10on2076.outbound.protection.outlook.com ([40.107.93.76]:55009 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729072AbgHPVPS (ORCPT ); Sun, 16 Aug 2020 17:15:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L9GLX41exIZ8P3B5n/hbQKqWES18KMLuSaSSL0ptm8rCuy1f33OstT9qqiwYvuXdaURiCHLDarHx4RsRnSH0mVOfdD5Cnm7jPOUlrJWw422A+tzSWfHijH1layYBYy3x3F89xd78mdTqRnF7rU3jwvBIhcE1OT3pfbgB8Ercb9oeNUCQTJhhqEZtXJLZujXAW0KIqP7WKa48Y6NADCWI0uGLIqxq88VT/WBkuWm98d23BlfwAvz/tajJLCQi60QTPIobpWAYtd801vDHRcrVSqRywAT6kDv8Zi2fBdiW35BcKatX4zlHrhIwyAEM6XLQ0Id6SsniYLDZSfVPpEbasQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qs/YKVRBtzFOL/l2mOlWeUZkN1r6qiWQgA8WjHabqes=; b=gS4CIZAPVFgcYTrpQzNF+VbZYvQ3TlXsXetv6hGBI5NbwHcLeBVQt7t82S/L5gm+hOe5NE4RMdGPUGOfNaWHCBo/rboJSYfIhJYJ3f4sqUhCBcuv8/D1+HQ5yuxAe4wccG/NSMe4B8X1a/+k3bOIqcc+g9vHuLTJhljPigYEzkjaqNSW1YyWI0SmgLYtIQCiKbcYMU8Pd4HdgmER5lSFE57jEvX48f0uxRIyzpgZAKDYFE1tj46lmC9IJL/gSMDtyvKPW762fGdot3VfUAblEJL2U9+Q/T0u6uC8PnwyrzFmobe92OvSjDTpZ8OPMseauLbjBvnd/oeA5jBuOAxnhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qs/YKVRBtzFOL/l2mOlWeUZkN1r6qiWQgA8WjHabqes=; b=f+q6nGEo8QtKYpqnSHlutVhXksnIKgV3sexLMtF/JIQPQMUyZp+GajGQBZN1BulFVKa+jzDA9tw/SfBMDYimg0NjgP+PXSXSSNzGwapGhL+gisCRQzeDyK0WNmWuUvqxnbERgaPJbrVTlNTJ9jq5fzcblVX5WOogWINx24O6iyU= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=labundy.com; Received: from SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) by SN6PR08MB5631.namprd08.prod.outlook.com (2603:10b6:805:fb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Sun, 16 Aug 2020 21:15:09 +0000 Received: from SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875]) by SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875%6]) with mapi id 15.20.3283.027; Sun, 16 Aug 2020 21:15:09 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 3/6] dt-bindings: input: iqs269a: Add bindings for OTP variants Date: Sun, 16 Aug 2020 16:14:24 -0500 Message-Id: <1597612467-15093-4-git-send-email-jeff@labundy.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597612467-15093-1-git-send-email-jeff@labundy.com> References: <1597612467-15093-1-git-send-email-jeff@labundy.com> X-ClientProxiedBy: SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) To SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (136.49.227.119) by SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3283.27 via Frontend Transport; Sun, 16 Aug 2020 21:15:09 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [136.49.227.119] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ecf66025-e5a2-491d-2c13-08d842297500 X-MS-TrafficTypeDiagnostic: SN6PR08MB5631: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jrj8oJ8MGhMvW5nCBO9wDjSuzuBm8kltvPw71LAZ2X93E3v6brRn71aOp6Vc2c+dLWy4J+R7bgqqBfxiXR8STRAxMYV+NO1webLV3LTTbSh26ye+Aw+8IlON1G2ZaraBqpABehNbShVZ06iRiA8T428oRgpYt3ICEQgesZlYrLW/sX71g2EDwTRQ5KhPCTz/wgFF/unNSTDA4TuMdnMFsIqH/5vOm+1s5YW+TyEGSwpT2jeU/2+/IklhFtSxllxGI5SJWgTGeXXdLjxPolCjB4pSRFwuvk2FPPoPzg0f3mPwYF4UutqOQDzXbXyJC8E8g5OpoEaIPUehJcm36L4Fgg8NVvLR3bzibvxSazTXBWd2jScA1jfib3mIRK0+HdHM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR08MB5517.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(39830400003)(136003)(366004)(396003)(376002)(346002)(66476007)(6666004)(66556008)(69590400007)(36756003)(4326008)(86362001)(107886003)(2616005)(956004)(316002)(16526019)(8676002)(83380400001)(6506007)(8936002)(52116002)(6512007)(2906002)(478600001)(5660300002)(66946007)(26005)(186003)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: gtd6tR0b/8tpyGYkWPIK3rO1zW0O+fw3zitSlOrqpOGOx8X5HOJt6o0kfgIm+TJHMLWRMWI+dls96K2gI5mtHlNv6nBQlvYENPFNEWctaIDNxMl3HPr3xRazfVu6sdm3Bgd/C9Mdp5wuDJ+wWoWeVUluJzsRFUbzCN51GewPlfgmsyJg959JYvRl0q+5Z1COa3OfSK8e2j2/o004Wrml4Ep005+9MhpMJCPc1gWwlzCmykKrsdXqo7MlJ6GFd/N0yNvadwUMWCoy3BVsQC4GebkJva/8tYKFY5kwffTJ0YY1d0E7mKH/QymnxV5+iuQvbgfhTha0k2vs4v8pKok+GQwDlnqz7bsR2/M1d4u7vAyUu6CrKinoPvKgU+rrw9vrNEQeHcgoFEyQcBRy3UUbL3S6L4Sx1XJEumxB8elf99mwuANE5pnU8uCUAK/LNulqeQrIernyFGFxm675RP8p80IR8LdzoSboPu8TT0FsJTNJx8FCyWkzoj7dlNasfYJ68pf6QRz10pcUPJ/rBLfbR7zi3CIl4LxGcVQcLMrhKpOUMOJZlILtwvFTPcMPg5DWouTGH7e6owLiaG+AL05RyDkLW7CHEJ1DHuT6Bqa3K9RxZ5N+tOzk9/tnLteVuT4MweeKUP/AE/pEqD9nkahyJg== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: ecf66025-e5a2-491d-2c13-08d842297500 X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5517.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2020 21:15:09.8392 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JNVVi40FGGlwJcMr1wgWvMGQ/laHK31mgI/+lvHe/t99F4f1ecqGgNF6a7qc01kXfWuTqUGCWH6+qWhaDuZpNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB5631 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This patch adds bindings for the D0 order code of the device. This order code represents an OTP variant that enables a touch-and-hold function in place of slider 1. Also included is the ability to specify the 00 order code (default option with no OTP customization) explicitly. Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring --- .../devicetree/bindings/input/iqs269a.yaml | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/input/iqs269a.yaml b/Documentation/devicetree/bindings/input/iqs269a.yaml index e13812d..56a628e 100644 --- a/Documentation/devicetree/bindings/input/iqs269a.yaml +++ b/Documentation/devicetree/bindings/input/iqs269a.yaml @@ -17,7 +17,10 @@ description: | properties: compatible: - const: azoteq,iqs269a + enum: + - azoteq,iqs269a + - azoteq,iqs269a-00 + - azoteq,iqs269a-d0 reg: maxItems: 1 @@ -210,6 +213,16 @@ properties: default: 1 description: Specifies the slider coordinate filter strength. + azoteq,touch-hold-ms: + multipleOf: 256 + minimum: 256 + maximum: 65280 + default: 5120 + description: + Specifies the length of time (in ms) for which the channel selected by + 'azoteq,gpio3-select' must be held in a state of touch in order for an + approximately 60-ms pulse to be asserted on the GPIO4 pin. + linux,keycodes: $ref: /schemas/types.yaml#/definitions/uint32-array minItems: 1 @@ -514,6 +527,21 @@ patternProperties: additionalProperties: false +if: + properties: + compatible: + contains: + enum: + - azoteq,iqs269a-d0 +then: + patternProperties: + "^channel@[0-7]$": + properties: + azoteq,slider1-select: false +else: + properties: + azoteq,touch-hold-ms: false + required: - compatible - reg From patchwork Sun Aug 16 21:14:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 11716221 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F670739 for ; Sun, 16 Aug 2020 21:15:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31D7920829 for ; Sun, 16 Aug 2020 21:15:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=NETORG5796793.onmicrosoft.com header.i=@NETORG5796793.onmicrosoft.com header.b="jlqzPD16" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729121AbgHPVPY (ORCPT ); Sun, 16 Aug 2020 17:15:24 -0400 Received: from mail-dm6nam10on2076.outbound.protection.outlook.com ([40.107.93.76]:55009 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726331AbgHPVPW (ORCPT ); Sun, 16 Aug 2020 17:15:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a8/X5pZbz6SWIX5JoN1ejJTQl0ChaA4TGsSxiTYoNh8iWOWOjo56FjIYSi5fxVlJ2bt70SPWtDfklDvZzkCfjxfBirNEsMjfKCU6hES3rfRSuPMGxnRAxWxERd59KVFWRcCm/D8upCBvFlttnLECow/hy9kYMMKKfULhJhkyEHwW7TYddyyZsOrGwtTr5fzTugbxZ75tPcQEQz1URoXb8yAMg0NE/4uoi60beShIN1OpSZGuMlEyHV6shR0JWWc6MShi1bbEax7hCbFUiiWi0zJBeOcUkqik5ZoQ02VJY00ezCwZkQUYo0qcTLRP6z7/mPiuOUYy22udPLFWf5BHNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lPfxuwLTmK+GkStKq+86hSwgk8J+FX39rElhUysleFA=; b=HkTCrk1hb+bDD23HkHBqao51ZscLbsnULI13w1VrQUgy793wI0I3DoEfrufFb1VxlfvkUvbzz24AGf9PnXJwYYedO/XcmKFy7R4sbCBRtnv6iJy611ZZb5wrF9We76NsuD1YN6ACpuRMJEK8P4RiT+SLWuX5yAA1kMzMfhmx8lADCEkqYz7VTfrliUwaiPHxsp2+QMGa/NmxauWZERaBFlkvNpzG69UhxOa7GWV9QBocpqD8tHqf1rs0D4arJA5Df2+ElKLymi1/S9DL54HR8vlnsad0cjHf7VVh4HJVrHPwqS2EkExA2r/He1S1z98edH1aWv5emdJ1chL8uRllJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lPfxuwLTmK+GkStKq+86hSwgk8J+FX39rElhUysleFA=; b=jlqzPD16o02S+VGYXtYR4bpgJzFVlqLceOq8mXRPiGOk+UN/DPRLblgefnY9uaezbG8+2F81K46zqd2n+Zosjzw6Zd6KBSlZFyg6XBic/kDgJhkcXdSt34g/SCzAuUxuKMbZmN4gcHzjhVfvo5VvmkIx84kn/doSwmUZ2SCBm5E= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=labundy.com; Received: from SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) by SN6PR08MB5631.namprd08.prod.outlook.com (2603:10b6:805:fb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Sun, 16 Aug 2020 21:15:12 +0000 Received: from SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875]) by SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875%6]) with mapi id 15.20.3283.027; Sun, 16 Aug 2020 21:15:12 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 4/6] input: iqs269a: Add support for OTP variants Date: Sun, 16 Aug 2020 16:14:25 -0500 Message-Id: <1597612467-15093-5-git-send-email-jeff@labundy.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597612467-15093-1-git-send-email-jeff@labundy.com> References: <1597612467-15093-1-git-send-email-jeff@labundy.com> X-ClientProxiedBy: SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) To SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (136.49.227.119) by SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3283.27 via Frontend Transport; Sun, 16 Aug 2020 21:15:12 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [136.49.227.119] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 49469f8d-fee2-429c-64c8-08d8422976a3 X-MS-TrafficTypeDiagnostic: SN6PR08MB5631: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gu4xswXGVRvAVvlnTBnoA2RZfA/XJFKoz2GtpRltqk/lz8KQuVnOya1DUHLT1s8De/9/CtjPyZ8CXWb98q4Af4GC6TVqY/Aksihf++0ET878UGxGWNUURGuzO4RI0lnsBixGV/g5B7o70s7+QgfYWPAvnd7l1xkUqtwV8r9AD52VSXK/nepSaaELN6u2iyru9KU4TIVj471/ct4MhNPCiL4oPPHjbqZiHss90sBm+bp6Ja3MHywDcQ2OkJTdJpQjWmaQ1HNRWThR2ZHvvEcnGKAkMUXorsxp+GMAASQiaKKSXIcONOQymeLD4XY6GrStjXy5wg/HEi+g0weEGrItvqq6qRG+/xoU1ubQ5T6M6whM8YcDd9/D0TtmXdgIrxLz X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR08MB5517.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(39830400003)(136003)(366004)(396003)(376002)(346002)(66476007)(6666004)(66556008)(69590400007)(36756003)(4326008)(86362001)(107886003)(2616005)(956004)(316002)(16526019)(8676002)(83380400001)(6506007)(8936002)(52116002)(6512007)(2906002)(478600001)(5660300002)(66946007)(26005)(186003)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: SaITfDwijlFJEJE+4tI3Zb8veBTSsYNz1Cd+501HdjgPkvb1UrZ6PII3gS68gEWAH6QUnr0jPc5hp6i/JqvmgoJG/cOzol0amR2Qu5sw7M8JGTtM7S1cICbZD1ZDOb7yPu4z6BC0T2fhm0fs77RT/C3b31aF0ffr80vELJ53/k2DIQNskBUBcUqC8F5lrL9AOq64bTUh1q8Kvd4vigKB4DpVLZpVL+FF8L7aJudQ9hZn+0jVaXD6WVUqwTPznQHQ63FAdKa8V4AwZpAwJebIyFNGefYfWbZYeQA7mzAsj2IJ9QdUuYdlM/7PmUk97PSfQczoaV2nwom/PqmyhPiKE3WzDz5gud0HmeBKsPCkpLOZ3iV+/fswFf5zCPNHZpVZE/7zppPioU7JDB3n++5Ts+ivegE8cbL9FSvvXstRSq2cJcre/DMi4bFrbZszzA/JBC0jMngBiIh63PAxsyvLRyHZ4z9TaFMtn+hHcrLSddzKf/DTuFZzMFxqrTCECIk0cBOAXLIMI9pq3fi53d1QP1FFKz5hZh78OvWlZL3eFnU4Fh9jaUvZiXasqrR4rCmd7hBFuj4VmaDYvsCR6wokXypP/9gcvJnIcr9QNiggdk/lEoXgU8BFwyLekunbbCweV/r+0Kj6qb6te4ilfBOSyQ== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49469f8d-fee2-429c-64c8-08d8422976a3 X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5517.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2020 21:15:12.5936 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Rp0cZKMtRI4LmEk9rn9tnVfxaVzj+RqOnvy0mMHgGerJk7/gxj4SETZeVbPUjeRBq7dMl+iKccdckKn4e3rxlQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB5631 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This patch adds support for each available OTP variant of the device. The OTP configuration cannot be read over I2C, so it is derived from a compatible string instead. Early revisions of the D0 order code require their OTP-enabled func- tionality to be manually restored following a soft reset; this patch works around this erratum as well. Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs269a.c | 94 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/iqs269a.c b/drivers/input/misc/iqs269a.c index 095e5d5..04947f1 100644 --- a/drivers/input/misc/iqs269a.c +++ b/drivers/input/misc/iqs269a.c @@ -100,6 +100,11 @@ #define IQS269_MISC_B_TRACKING_UI_ENABLE BIT(4) #define IQS269_MISC_B_FILT_STR_SLIDER GENMASK(1, 0) +#define IQS269_TOUCH_HOLD_SLIDER_SEL 0x89 +#define IQS269_TOUCH_HOLD_DEFAULT 0x14 +#define IQS269_TOUCH_HOLD_MS_MIN 256 +#define IQS269_TOUCH_HOLD_MS_MAX 65280 + #define IQS269_TIMEOUT_TAP_MS_MAX 4080 #define IQS269_TIMEOUT_SWIPE_MS_MAX 4080 #define IQS269_THRESH_SWIPE_MAX 255 @@ -142,6 +147,10 @@ #define IQS269_CHx_HALL_INACTIVE 6 #define IQS269_CHx_HALL_ACTIVE 7 +#define IQS269_OTP_OPTION_DEFAULT 0x00 +#define IQS269_OTP_OPTION_TWS 0xD0 +#define IQS269_OTP_OPTION_HOLD BIT(7) + #define IQS269_HALL_PAD_R BIT(0) #define IQS269_HALL_PAD_L BIT(1) #define IQS269_HALL_PAD_INV BIT(6) @@ -322,6 +331,7 @@ struct iqs269_private { unsigned int keycode[ARRAY_SIZE(iqs269_events) * IQS269_NUM_CH]; unsigned int gs_code[IQS269_NUM_SL][IQS269_NUM_GESTURES]; unsigned int suspend_mode; + unsigned int otp_option; unsigned int delay_mult; unsigned int ch_num; bool hall_enable; @@ -333,6 +343,14 @@ static enum iqs269_slider_id iqs269_slider_type(struct iqs269_private *iqs269, { int i; + /* + * Slider 1 is unavailable if the touch-and-hold option is enabled via + * OTP. In that case, the channel selection register is repurposed for + * the touch-and-hold timer ceiling. + */ + if (slider_num && (iqs269->otp_option & IQS269_OTP_OPTION_HOLD)) + return IQS269_SLIDER_NONE; + if (!iqs269->sys_reg.slider_select[slider_num]) return IQS269_SLIDER_NONE; @@ -567,7 +585,8 @@ static int iqs269_parse_chan(struct iqs269_private *iqs269, if (fwnode_property_present(ch_node, "azoteq,slider0-select")) iqs269->sys_reg.slider_select[0] |= BIT(reg); - if (fwnode_property_present(ch_node, "azoteq,slider1-select")) + if (fwnode_property_present(ch_node, "azoteq,slider1-select") && + !(iqs269->otp_option & IQS269_OTP_OPTION_HOLD)) iqs269->sys_reg.slider_select[1] |= BIT(reg); ch_reg = &iqs269->ch_reg[reg]; @@ -999,7 +1018,43 @@ static int iqs269_parse_prop(struct iqs269_private *iqs269) sys_reg->blocking = 0; sys_reg->slider_select[0] = 0; - sys_reg->slider_select[1] = 0; + + /* + * If configured via OTP to do so, the device asserts a pulse on the + * GPIO4 pin for approximately 60 ms once a selected channel is held + * in a state of touch for a configurable length of time. + * + * In that case, the register used for slider 1 channel selection is + * repurposed for the touch-and-hold timer ceiling. + */ + if (iqs269->otp_option & IQS269_OTP_OPTION_HOLD) { + if (!device_property_read_u32(&client->dev, + "azoteq,touch-hold-ms", &val)) { + if (val < IQS269_TOUCH_HOLD_MS_MIN || + val > IQS269_TOUCH_HOLD_MS_MAX) { + dev_err(&client->dev, + "Invalid touch-and-hold ceiling: %u\n", + val); + return -EINVAL; + } + + sys_reg->slider_select[1] = val / 256; + } else if (iqs269->ver_info.fw_num < IQS269_VER_INFO_FW_NUM_3) { + /* + * The default touch-and-hold timer ceiling initially + * read from early revisions of silicon is invalid if + * the device experienced a soft reset between power- + * on and the read operation. + * + * To protect against this case, explicitly cache the + * default value so that it is restored each time the + * device is re-initialized. + */ + sys_reg->slider_select[1] = IQS269_TOUCH_HOLD_DEFAULT; + } + } else { + sys_reg->slider_select[1] = 0; + } sys_reg->event_mask = ~((u8)IQS269_EVENT_MASK_SYS); @@ -1140,6 +1195,12 @@ static int iqs269_parse_prop(struct iqs269_private *iqs269) return 0; } +static const struct reg_sequence iqs269_tws_init[] = { + { IQS269_TOUCH_HOLD_SLIDER_SEL, IQS269_TOUCH_HOLD_DEFAULT }, + { 0xF0, 0x580F }, + { 0xF0, 0x59EF }, +}; + static int iqs269_dev_init(struct iqs269_private *iqs269) { struct iqs269_sys_reg *sys_reg = &iqs269->sys_reg; @@ -1149,6 +1210,18 @@ static int iqs269_dev_init(struct iqs269_private *iqs269) mutex_lock(&iqs269->lock); + /* + * Early revisions of silicon require the following workaround in order + * to restore any OTP-enabled functionality after a soft reset. + */ + if (iqs269->otp_option == IQS269_OTP_OPTION_TWS && + iqs269->ver_info.fw_num < IQS269_VER_INFO_FW_NUM_3) { + error = regmap_multi_reg_write(iqs269->regmap, iqs269_tws_init, + ARRAY_SIZE(iqs269_tws_init)); + if (error) + goto err_mutex; + } + error = regmap_update_bits(iqs269->regmap, IQS269_HALL_UI, IQS269_HALL_UI_ENABLE, iqs269->hall_enable ? ~0 : 0); @@ -1807,6 +1880,10 @@ static int iqs269_probe(struct i2c_client *client) i2c_set_clientdata(client, iqs269); iqs269->client = client; + if (client->dev.of_node) + iqs269->otp_option = (uintptr_t) + of_device_get_match_data(&client->dev); + iqs269->regmap = devm_regmap_init_i2c(client, &iqs269_regmap_config); if (IS_ERR(iqs269->regmap)) { error = PTR_ERR(iqs269->regmap); @@ -1967,7 +2044,18 @@ static int __maybe_unused iqs269_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(iqs269_pm, iqs269_suspend, iqs269_resume); static const struct of_device_id iqs269_of_match[] = { - { .compatible = "azoteq,iqs269a" }, + { + .compatible = "azoteq,iqs269a", + .data = (void *)IQS269_OTP_OPTION_DEFAULT, + }, + { + .compatible = "azoteq,iqs269a-00", + .data = (void *)IQS269_OTP_OPTION_DEFAULT, + }, + { + .compatible = "azoteq,iqs269a-d0", + .data = (void *)IQS269_OTP_OPTION_TWS, + }, { } }; MODULE_DEVICE_TABLE(of, iqs269_of_match); From patchwork Sun Aug 16 21:14:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 11716223 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F4C7739 for ; Sun, 16 Aug 2020 21:15:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26F7720855 for ; Sun, 16 Aug 2020 21:15:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=NETORG5796793.onmicrosoft.com header.i=@NETORG5796793.onmicrosoft.com header.b="qU1JyO5Z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729172AbgHPVP2 (ORCPT ); Sun, 16 Aug 2020 17:15:28 -0400 Received: from mail-dm6nam10on2076.outbound.protection.outlook.com ([40.107.93.76]:55009 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729072AbgHPVP0 (ORCPT ); Sun, 16 Aug 2020 17:15:26 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LlDtyH8F/KXERVUI2JjUVLPJF9NahCmwJA0RYcuGAuaMS+jx7R+E+npaLk2md6/vS7FspvCMvXOpJTv6flO0nypzOQ3rHzMv3x5ZNN+4lHRwOGJuDPMpROPy3coxIQGtmXI3kVTzt80n/Q4tt18URqW1/Gsdtd3Q0xO4PWbMLsROTuk2oLlSZCe/1MtgzinSDxE7drWdkNg4fuFStEz0hcXENKt83mEMzdpnmvi+nsZrDCF3w2tirtaCHDx9TWmGwFR2PUgKkXytLKSj5etMTi41zt1ITac8O1l9zYDVV0vqJbFVnspUufWgH+q3poZOJVeTgwJWydmEfUcu8KqCpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eZOS9QNE92oxGWSPhUfAu6jraI0qXSySjYhObHDbUcA=; b=GOguSVJBxBGO/rqlJlzFeSTVaT+HnC7lfjYMMbNFXoof6M75F6INkWHGlVYKia/9jdRQq4vBnzyrViSie4LC8Ujiw9YnAR3pm6dGO98dw9wHH20yUnYf3dUPImmjim/JeXZS4WifQG9Uwq7iTT7to7B4ok7PbamzCDL4D2MaU6YAHG3LRDwMlCeD8xWMr/+6qkJCdmrVqk8y1z4vjsmO8/GhEFpq2Q927paAOEczNvI5rTof5HYv2pmphNyHz33OHemjNV6arE8YqjnmAwPmdaCH2PWyPtEFAtRTg8u2xKasX2MzXIT0aEirFZTIx6w6BTtkFp2Qq5fmgvv9G1gG+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eZOS9QNE92oxGWSPhUfAu6jraI0qXSySjYhObHDbUcA=; b=qU1JyO5Z4Bl4x3hVsDligHDq/5XdRjaikO/Xq+03LujYanJK1Vu1DeK3SE2LuCaXRMwftYqk3RTFJrS9f78rPLmP6nyOVyq21bkHVtlNTsfDdhJo7vY4JxRNd/zUMNFOomu2JH+AiWTp3iGVI1uuyLJVB54hGNJy4GNMgPtw5Hs= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=labundy.com; Received: from SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) by SN6PR08MB5631.namprd08.prod.outlook.com (2603:10b6:805:fb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Sun, 16 Aug 2020 21:15:15 +0000 Received: from SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875]) by SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875%6]) with mapi id 15.20.3283.027; Sun, 16 Aug 2020 21:15:15 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 5/6] input: iqs269a: Make sliders two-dimensional Date: Sun, 16 Aug 2020 16:14:26 -0500 Message-Id: <1597612467-15093-6-git-send-email-jeff@labundy.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597612467-15093-1-git-send-email-jeff@labundy.com> References: <1597612467-15093-1-git-send-email-jeff@labundy.com> X-ClientProxiedBy: SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) To SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (136.49.227.119) by SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3283.27 via Frontend Transport; Sun, 16 Aug 2020 21:15:14 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [136.49.227.119] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c770b67-8125-4d25-7f7e-08d842297805 X-MS-TrafficTypeDiagnostic: SN6PR08MB5631: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RAQ3Ok9OJ+AQuQqAxRsx0uA2EVq7madAdEvmdoGeA43BIrVj+sUNqZlTLEYqUHYBKVgJp8kck2YZ0mZCSXOnggkwOi60uNpmV/pGBvn2i1ASgVXgn7Wd8Jm8P/8E1jVatYwZ8IfMqddR19TUAlRhc26WxoVt+XsD5620ugF+LsrSEe0tg2xDbCS/umsM+iuB3LLrOgGB4PvlsB1nUsSom3iWgxuby4/Dy84J5zBiIr7rz6Z3uxsFgKLJ5BXuq8ycuXcymrXO/rHzeY69Iblf+530jHK2Rei+RHtXxJKKJd2dgOPAA3wKNu0v4amP+D5uCOTycqSSyG/8szt4jZYW2UktU7FAto6PzFO0pu9LSr87EXuAdjyCIiBaXP9InT3F X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR08MB5517.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(39830400003)(136003)(366004)(396003)(376002)(346002)(66476007)(6666004)(66556008)(69590400007)(36756003)(4326008)(86362001)(107886003)(2616005)(956004)(316002)(16526019)(8676002)(4744005)(6506007)(8936002)(52116002)(6512007)(2906002)(478600001)(5660300002)(66946007)(26005)(186003)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6tTJl16iEY2Go9od6QXwc4aZwKlGx3nUtLv02MH4KmphqpTKQGMVxrKjlvEgbKC8iU3P4WsmQGT4CWA3EJcIvAYfdj7lkQYQpzvNWZLrUJtoFhiSvC+UnGbw7j339PAkwezEc1HA+b8ACRdeQDmlaxjwvlfTRF+9r3QZUkM7ksyEHlRdMTtnlJWa2xsEq/furIp3e0WpCaTTm9cOeGUMkyfTwmmMCHBum95jBGXGnfMr7JRxDjkfxLRrgZUzERBtLdambyFImDlbAoNBtqgmesbDvFI6iK5MQVeM0bzCuoxRWLSMR0srBfZEmaJNYhYI9XKi5lJtlw7TAcfl0Vs28BPRXBr+XpZ89UJSymkfoQrLUGOedD+xEuhGBZYwZvXfxDmXVFpCQLtNzzJBoeM6JPjrAYqL8f1GPpHy7us8uGW5CLukxG7s/oxnqrTt2noxTgg6Z81WhrTRReyFd9qDiscmy3enqGnDGmXvjtqIHVE461b4QkjX7u5joxvjB/390fw/3vok4ezUY7WCqoKXULjDQyqPFdhzVawbrgtQKAH9ge8ZPpgwy3NaS12a77NoRnliMtfiWJLjFMPcZZxy3+R34/3wfo22efsfdh1SYNVCrjq2GONc3fa6jbZ7GduMJw1Lun7QV/Ng9EYFzQMFBA== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c770b67-8125-4d25-7f7e-08d842297805 X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5517.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2020 21:15:14.8983 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CTGcvUwYeZAq4vxQjct66KkyNrvGcxxRpGog5q5NN84m32b0gyn7hsnEp9ifHR+1iaApGYN++4oecP8wYN42Qg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB5631 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org libinput rejects devices that define one axis without the orthogonal axis, as well as devices for which either axis's resolution is zero. To solve this problem, present a thin y-axis with a resolution equal to one. Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs269a.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/misc/iqs269a.c b/drivers/input/misc/iqs269a.c index 04947f1..4a0e4ec 100644 --- a/drivers/input/misc/iqs269a.c +++ b/drivers/input/misc/iqs269a.c @@ -1377,6 +1377,8 @@ static int iqs269_input_init(struct iqs269_private *iqs269) EV_KEY, BTN_TOUCH); input_set_abs_params(iqs269->slider[i], ABS_X, 0, 255, 0, 0); + input_set_abs_params(iqs269->slider[i], + ABS_Y, 0, 1, 0, 0); } error = input_register_device(iqs269->slider[i]); From patchwork Sun Aug 16 21:14:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 11716225 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C74FC14F6 for ; Sun, 16 Aug 2020 21:15:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF90220855 for ; Sun, 16 Aug 2020 21:15:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=NETORG5796793.onmicrosoft.com header.i=@NETORG5796793.onmicrosoft.com header.b="KbT2hdn4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729072AbgHPVPb (ORCPT ); Sun, 16 Aug 2020 17:15:31 -0400 Received: from mail-dm6nam10on2076.outbound.protection.outlook.com ([40.107.93.76]:55009 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726331AbgHPVPa (ORCPT ); Sun, 16 Aug 2020 17:15:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=df0qRSBleGQchBZWTfhJ095d/ZIngtyi/gNYzUmiMPYiIAMuDokEJuwhbS+7xbuvlcuQWiNgp6UKlckU3sYCWy1vbpFt72Z7pKrWXSE10cKnMkLbLx57+NceuZ13W8+p++XRojp6QiFUuw/ObU1Z78I1gVPHXZlgDnYQ/TcF1+hX34iy9gi+FKR6yYvvxOz39fP3pupxfbQYIqjxDd6ESTuUbnqsk0/M4b0AzNUVqwLjJEMi2z8+9mwnn3tYom4bWS90pA8lYXbsASj4tks8o6GCYYizp0JRDt/cyifetifnnMYK2Vqa+ji/174HKcqauf2G57rnp0KY9JwwU+YX9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p3lAYRk7Xnd3eGubOeZNlLpuFpEiaC+e6zQfleKeurE=; b=gB0cPcDFYE57eoUWm2fDDIBI28tP5zjGkhk2Y8FoGAyz2aUJ/h13YMEyuQEWFnBlbO1t/KsrL0Nt5dLFeJFvjQamMBBMyBmKDWRfq4SIMnfIbvzye5y6uAUuN4QMf1N7wVIcMFN02lSzjalbarN1/0ebK7MetF0aP6XTN31sk1cpSt33agvZWY2jTmJvAuTV72bXeS2yOD1oNGBVcPBqQnBGrDBbnoqp7BSCnSzS8dA1SrgotgTSmnakVNXH5hm0tSAQr/t6lnyNfpdbc0ckfhN37S2Nq8Na7xvyeXROt6lYbgZibxeQDxPxrGJ4CzHnHHg3s0e4FK7OlUPlRwAZEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p3lAYRk7Xnd3eGubOeZNlLpuFpEiaC+e6zQfleKeurE=; b=KbT2hdn4OfinnhpbagrAjAAtta0ySg6AAtZPTFhIfZo/cN/IbJw7pXyLW2PAXuWXEdXuwYuIIj4o2w7jXcTt/ZUlctWOwLcyxGALvDXnpjNXtuOof4ToRJATNHzQWM5FV+HACTb/8MJpkPxYY+xTFII9QK/twJCZs+A8kffrktg= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=labundy.com; Received: from SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) by SN6PR08MB5631.namprd08.prod.outlook.com (2603:10b6:805:fb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.20; Sun, 16 Aug 2020 21:15:17 +0000 Received: from SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875]) by SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::2ca3:f294:d154:6875%6]) with mapi id 15.20.3283.027; Sun, 16 Aug 2020 21:15:17 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH 6/6] input: iqs269a: Disable channels before configuring them Date: Sun, 16 Aug 2020 16:14:27 -0500 Message-Id: <1597612467-15093-7-git-send-email-jeff@labundy.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597612467-15093-1-git-send-email-jeff@labundy.com> References: <1597612467-15093-1-git-send-email-jeff@labundy.com> X-ClientProxiedBy: SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) To SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (136.49.227.119) by SA9PR03CA0006.namprd03.prod.outlook.com (2603:10b6:806:20::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3283.27 via Frontend Transport; Sun, 16 Aug 2020 21:15:17 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [136.49.227.119] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cf60ac42-a447-40b8-ab70-08d8422979a5 X-MS-TrafficTypeDiagnostic: SN6PR08MB5631: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VqFweYbqhPWNI2Eekta+P+pyZHS/o77+8X+RgrJlupxK5FozB996SwohzS9O0eMEl5Msj9MODcOySPRCOKwqNc6ceoa0A0RBLfvZu3+Bua3bTp2yqSAj/vSMCFdf0MqzpoUjg2HknbVhZRDijsg1AAOrIaS3Rue86SmcwrdB4t3wAzWWpiLue44nM9JsKn7e5n1r+Kk2+VlIyjgqXzQgoS857MllVzYvZQD4oc5gzJekoALMZftvzgXSqKe6HGlwOIDsxgBmMX6xgkpogZGv2NILJRCn0KuIi/ERJB56x0L3yHZNqiXK1XY3CrDENGRgbSo2i8+DZKZWYj909FPpiReBQIvLIxPIAC9DnJqy4AZ6oZw2jb8I3HXW/eqG5UBk X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR08MB5517.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(39830400003)(136003)(366004)(396003)(376002)(346002)(66476007)(6666004)(66556008)(69590400007)(36756003)(4326008)(86362001)(107886003)(2616005)(956004)(316002)(16526019)(8676002)(83380400001)(6506007)(8936002)(52116002)(6512007)(2906002)(478600001)(5660300002)(66946007)(26005)(186003)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BFG+rjzWDk0L8PGyY7M85rkjTTrl60jwJgb3nQjShhtY+Fdve46uu9CZ9JV1trW6ShK6YHyjw2hz8KQopH0YHbOzfK6Bo0KNdfi3vTOEb3aZ2Yy7P8a/RRvLG8whb819c/4mXM6TPDV+S6rL5VlQ/H4XRwvF7GHcdsQJqsqVMsAJpdpj77hktip1GaJwWTcd0Y9SY5ORgSfMMKGJXdECDmt8RBmA5xLOUEHT9zeLJtCVcq9N74/BpDSWcq+Bfs+wEL+haJgcl3WRWHor6bURixItzuHBZdG39oM0C8AkF+UOh33nL5ZvqgGDdeklfRW5/bU+bK6goRbMCWUv4xCAkxVajAhT5DxwpMDLp/VZjujWwUlGEDA/+8XfCtdQQMVwKO/6EUDlhtSgs+N3Ey+jCn+dQDJttnvxjrdFKrbGz+SwSS8MvZBuNZU5zN47D3Px7u8CSlmMYQYR5AQ72TlZuCmHP0NAV7v/Q0qQTIQ0YwIjSjViq3zYeyqEJcezQxC/li2qyYGmASb3QvfcdghqTuQN1LjhgtF2VUQU05rg0LxqVJh7/R10nwp7XdSpzEev636h2QvyzJrJjLS5H+aUHl/hlD0z6K4J/kkFTSJVZsmGEcb3DFpn8niGzg6L4zXJdngONLMts1h4JfaYhN0krA== X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf60ac42-a447-40b8-ab70-08d8422979a5 X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5517.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2020 21:15:17.6267 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8bo1eUbsu4tineAoDgHoMOPcFZ2kf6PR2O3x/8+EF5t4CZGXjx2rrPv1a57x6UxtCKD6XL37OtMgyztO3OW0RQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR08MB5631 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Unless it is being done as part of servicing a soft reset interrupt, configuring channels on-the-fly (as is the case when writing to the ati_trigger attribute) may cause GPIO3 (which reflects the state of touch for a selected channel) to be inadvertently asserted. To solve this problem, disable all channels before configuring them. The desired channels are subsequently re-enabled as part of running calibration (ATI). Signed-off-by: Jeff LaBundy --- drivers/input/misc/iqs269a.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/input/misc/iqs269a.c b/drivers/input/misc/iqs269a.c index 4a0e4ec..cb2773a 100644 --- a/drivers/input/misc/iqs269a.c +++ b/drivers/input/misc/iqs269a.c @@ -61,6 +61,7 @@ #define IQS269_SYS_SETTINGS_REDO_ATI BIT(2) #define IQS269_SYS_SETTINGS_ACK_RESET BIT(0) +#define IQS269_FILT_STR_ACTIVE_CH 0x81 #define IQS269_FILT_STR_LP_LTA_MASK GENMASK(7, 6) #define IQS269_FILT_STR_LP_LTA_SHIFT 6 #define IQS269_FILT_STR_LP_CNT_MASK GENMASK(5, 4) @@ -1222,6 +1223,15 @@ static int iqs269_dev_init(struct iqs269_private *iqs269) goto err_mutex; } + /* + * Temporarily disable all channels to prevent the GPIO3 pin from being + * asserted during subsequent register writes in case this function was + * not preceded by a soft reset. + */ + error = regmap_write(iqs269->regmap, IQS269_FILT_STR_ACTIVE_CH, 0); + if (error) + goto err_mutex; + error = regmap_update_bits(iqs269->regmap, IQS269_HALL_UI, IQS269_HALL_UI_ENABLE, iqs269->hall_enable ? ~0 : 0);