From patchwork Tue Jan 3 17:58:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 13087782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D64BC53210 for ; Tue, 3 Jan 2023 17:59:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238138AbjACR7L (ORCPT ); Tue, 3 Jan 2023 12:59:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238620AbjACR7D (ORCPT ); Tue, 3 Jan 2023 12:59:03 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2067.outbound.protection.outlook.com [40.107.94.67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D10241182A for ; Tue, 3 Jan 2023 09:59:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ogxw/t6D+401Wd0PJ0ZJoqd1G2nzMMRL96BZ7c+VlSwo02BaeIzVbRmBybLqs4X4Srz1V93HgMZsAOt68KwmfXhhKHXERzgS9kw07/umz7VRidGJ6orj3CNnIa+i+9UcQee8mEShndOcbiEJ8Mr8d2DlgBaUmLE0fX6x6xM2rCcDyRjXkNISkAGw37fJfY26mqXujJH43sxTNJRnaSqzu8EKI3fb7x2/YEk4VTq71e2+afCRQUk7oNOpwqZK7fruh7aQc+jl4uDr11ofaEIWGhxZLmjHMdcHiY9TCEHMHTRs1gbfKGA7WkzjpDHfUSdmRIlUWMm1p+CQJu4ydUru8A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GiA3tzweHmkLit8EUfvaBKSCoh6vI7f/8oOHY7/tSQ4=; b=MhL1jv73uJIwkDC1kbXLx3SEd9MzJ6F7cMWSgh8y7Rzu7iExNUqx5fPMb/1j/gK6BTjprUv+xkJ1xm1MOjfOwJBXRvaXxA62cUHnkffFLYYXCfePBJC9K74RGmPSGw49cvFPXBARuu70i+lnw5IzqrWqFlJWQXtXd1fGCGyG/W4GVIekbJMm4Kpx2ZRJksPsdRI5kd0o7B3ZLyHNHoEtJUjm0POU4DQBn8qem3vRzXwHUEPNZmSK6dnboq7aIhlhjAIddBruJ7qGhWAuSmBbBUIX18E1KYIxg9DoYmKmHBCRV/n7wBIqZ46UQktOgHGLpV47jGYkVHJkHClF0UWeeg== 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=GiA3tzweHmkLit8EUfvaBKSCoh6vI7f/8oOHY7/tSQ4=; b=qY/qBKT52o9K6aJ00DeWj5n+IPeSn3G/zCHiuP8FGc+uCsddXP+sRIHuDn5SgQLCMZcrbODVCeOKZgLZDYGfu5cp/LIrRF3Q1meL1+tXun6EZAkyuc2ExL6nPdSszQelk/CuB37FVB0CGezJte40jggg0lVQo/8XQ5VkVEaoI0Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=labundy.com; Received: from SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) by SJ0PR08MB6592.namprd08.prod.outlook.com (2603:10b6:a03:2d0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Tue, 3 Jan 2023 17:59:00 +0000 Received: from SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ea42:ebaf:dd18:6a4c]) by SN4PR0801MB3774.namprd08.prod.outlook.com ([fe80::ea42:ebaf:dd18:6a4c%6]) with mapi id 15.20.5944.019; Tue, 3 Jan 2023 17:59:00 +0000 Date: Tue, 3 Jan 2023 11:58:59 -0600 From: Jeff LaBundy To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, jeff@labundy.com Subject: [PATCH v2 2/5] Input: iqs269a - increase interrupt handler return delay Message-ID: Content-Disposition: inline In-Reply-To: References: X-ClientProxiedBy: SA0PR11CA0056.namprd11.prod.outlook.com (2603:10b6:806:d0::31) To SN4PR0801MB3774.namprd08.prod.outlook.com (2603:10b6:803:43::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN4PR0801MB3774:EE_|SJ0PR08MB6592:EE_ X-MS-Office365-Filtering-Correlation-Id: fa36c2b3-144d-416d-c993-08daedb4313c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CC2LTWEISrtrKiLX5VeV2bZHCC7UH11lmdHrcMV2ewIWoKvQbkOs4raeLZ4V6QXNf4itfCm8rz9KD75d5D62ijrXNMKdiRehdkTt5Y3TaIr3Bs15CFxkCM0k0bgsTMhu3v5xpUZsdrAVrt+ixAHa/SVEtbcdqt+WW/vsez8mchEO20xW2yJVBAPFvZIWorgV3TGddswmb3UjKsICNo5xHV8N2qUUkxaTkXdECyAxLAu5VuPkpkRm4Y1DRElce07Vgekez3aGpJ5RphcjP+i+yzmgmka/+u4AzmeQaDkcyKt1mm92s4vt175DKcndjurHTiCY6axbHhZGA8EuN+7XN5m48y8qhstRAaaAp3Gcz9pKyOUDE1jExzOJcoV2wov/4VQfz5UYJtUYV17TmrWCEjefFZIU/ALQmZFFJTUYsmuPoPsgAOXS39/1OQIVv+yxhuA8mTyLBPhT8Tb5ga+RxjxjgIawcRUTcfE9uLy5+oJnHFcMBCRT5p4TzocNSAeaDKcTAZtnE8XTvYlAicHtMBXKeOIooTid0kSYjTQAg8iPy7R4K34SSI7OgAf5rXRyFAL8UFZm7ipkfagqZV5qYAojKtAD2tEj3iXWCojipz9+v3ZDKx5bJvl5MWYwqhZ0DDamnfFMj0bJAd56lA9G3mBt8pWzdZHDAlbExLb11cc77gaX1hjkqyOWX+MQEtqA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN4PR0801MB3774.namprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(7916004)(136003)(346002)(376002)(366004)(396003)(39830400003)(451199015)(186003)(26005)(6512007)(9686003)(83380400001)(86362001)(33716001)(38100700002)(316002)(6916009)(2906002)(4326008)(66946007)(41300700001)(8936002)(5660300002)(8676002)(66556008)(66476007)(478600001)(107886003)(6486002)(6506007)(22166006);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8u6rYU2PJjPY39seL7fY1OokQlcL3C1lmm/k0V1acen6Yfnxba5LTvAVjv8KJwvsJyrZyY0Gx5Bprw0YSn/XQPwbbl27M6/dKRmlmh/A4CEeh9NwIZ+NKAZhcdM3K7SMOKf7AJrxsQRBjuGYjegVpNVyKUcf2Tk/8HJePUdIZqtOW1+LQMtm+lUvJ4JtkosI4NC1r4tmXUWwoJc+nSdDBNvp/xwREqSJ7WYBb+uGqZphPXl+JWEtaswIwWOhCbgCFNjZ0sz7erh9jaLVlVckFa+MHbOWClE/jPh8YRINYfjNcelXbG9UA3IW9S9weLjBM1YYdQ3cageCissptf+6v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V8yQvI8VihIvPDIX8p1v+zJ/Vw4uUyn1S9DurgWs4yGsC3rz0gEhsiF2dWzoru2jmv6ynjSWfNSyxHWe0BI6q19Jrr2py2uyNiTzHhTub8iCCuDk5ZIOPs41mJCKgltx9QDGXRoB8GeAafgbgMko2oOjKbqEdZMRCbEWA361E/h+8r9l6vBBgnecofHOsmvw X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa36c2b3-144d-416d-c993-08daedb4313c X-MS-Exchange-CrossTenant-AuthSource: SN4PR0801MB3774.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2023 17:59:00.3403 (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: G0BpyijZ0bxEbFsK50fzkw0ELD+FZ84S3j3c+HperTEaKgUI3oe64wNaWP2Ktx+RXoi3R7sEsEyuiKGrlSrCeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR08MB6592 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The time the device takes to deassert its RDY output following an I2C stop condition scales with the core clock frequency. To prevent level-triggered interrupts from being reasserted after the interrupt handler returns, increase the time before returning to account for the worst-case delay (~140 us) plus margin. Fixes: 04e49867fad1 ("Input: add support for Azoteq IQS269A") Signed-off-by: Jeff LaBundy Reviewed-by: Mattijs Korpershoek --- Changes in v2: - Added Reviewed-by drivers/input/misc/iqs269a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/iqs269a.c b/drivers/input/misc/iqs269a.c index ea3c97c5f764..ea3401a1000f 100644 --- a/drivers/input/misc/iqs269a.c +++ b/drivers/input/misc/iqs269a.c @@ -153,7 +153,7 @@ #define IQS269_PWR_MODE_POLL_SLEEP_US IQS269_ATI_POLL_SLEEP_US #define IQS269_PWR_MODE_POLL_TIMEOUT_US IQS269_ATI_POLL_TIMEOUT_US -#define iqs269_irq_wait() usleep_range(100, 150) +#define iqs269_irq_wait() usleep_range(200, 250) enum iqs269_local_cap_size { IQS269_LOCAL_CAP_SIZE_0,