From patchwork Wed Nov 16 07:44:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clark Wang X-Patchwork-Id: 625869 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 9F979C433FE for ; Wed, 16 Nov 2022 07:44:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232391AbiKPHok (ORCPT ); Wed, 16 Nov 2022 02:44:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiKPHoi (ORCPT ); Wed, 16 Nov 2022 02:44:38 -0500 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2082.outbound.protection.outlook.com [40.107.21.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ED2BD114; Tue, 15 Nov 2022 23:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fO3UoCa9b9jH4029lXtwsUhFyd0zRawTdE4TL0pnrlKN0SunPx7Q7KCAACEHtvwzzM3h6j5on2k83rx2ZZUVt6UKm4K/uiY8vlaaaVQDInoSa+a8UgT1gjFMy3zpsSq3NsYeIRZ4Lh+RGFgTYLytehq5tuD1hUnCq0Vi5vnvjwFScRrC/a6BcK7vnMUDakJ5JiBzI9JmMKublpsTRfufT3HVK+3BdDBFROEnF9gdHvjVwV1Zv4b2xhl5Ac4lp+pwvDrCTxUUN0xzJ7N1ee+2aC1A2HfTdT5urUI+YKH4YukyfdE0eLRmQ97f4cxOxXHy+zn5QtdlY+FGIYOJ8sh65Q== 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=JHtlLYxsunn5U9pLs01PyFml2e9tX964KBk5M1O9Ui0=; b=BnXDgAct7tDhw/BPvf5cAfC0tHmgbSRBDlbPLvttm9loYV5o4VuSicew1FtBEm7/d0Ljh493vrSU056vKO609x1kPYwzKFFSBQMX196tPCvs4z8ZvCX/QqDRVtoc3qQOLv4KgeEulDvsNv3XG4vTaS28PcmNXTulokTJgaDDxyk5ADmaBPJWztUpUrxKrJXbkf2+6+E93waCaAj7EEDpc0DtBMIxi2nZMqPZCEsrzlCG+ijyS20or3kxnNxdzSa4LADkgxFwG3SnMA/WXFkcsSRYkddy6J40pfSsrQ85iw1cPOXCxlPuzhFcJG3QPxraPB1lIL9Se/CH5ueRX4zuPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JHtlLYxsunn5U9pLs01PyFml2e9tX964KBk5M1O9Ui0=; b=jI9uMfuLN1Ph1lXxejSRPR8e08BjU3QVd5Ih2IE55sl+d0FKohpn36D5qlhWlplFXoCFfgeiX3fKZg7qNXN6M2y1v1dWrE0lkB/dKZUpOs22XNAsSiRWtzBWHorxzhTqMN/iRdKpjxKDh8Oppa5Pxp+LwfIPG6l5mGnfGT3x8Ho= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from HE1PR0402MB2939.eurprd04.prod.outlook.com (2603:10a6:3:db::18) by PAXPR04MB8318.eurprd04.prod.outlook.com (2603:10a6:102:1c0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Wed, 16 Nov 2022 07:44:34 +0000 Received: from HE1PR0402MB2939.eurprd04.prod.outlook.com ([fe80::d8b1:a777:e29:7a5a]) by HE1PR0402MB2939.eurprd04.prod.outlook.com ([fe80::d8b1:a777:e29:7a5a%10]) with mapi id 15.20.5813.018; Wed, 16 Nov 2022 07:44:34 +0000 From: Clark Wang To: linux@rempel-privat.de Cc: kernel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] i2c: imx: add irqf_no_suspend flag Date: Wed, 16 Nov 2022 15:44:31 +0800 Message-Id: <20221116074431.513214-1-xiaoning.wang@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2P153CA0012.APCP153.PROD.OUTLOOK.COM (2603:1096::22) To HE1PR0402MB2939.eurprd04.prod.outlook.com (2603:10a6:3:db::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0402MB2939:EE_|PAXPR04MB8318:EE_ X-MS-Office365-Filtering-Correlation-Id: 23ea7728-6259-4fd7-d113-08dac7a66658 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2gHtEA8Jl8y5WBpBWKfvJV0PhD3ySsFzXDb+lEqznyVKbCWDwgqK3YS21SFMtsIk2qZS0yIFlvDNv/Rs5W9X8DfAgNDPQN3R94/pwKsLzsIQER+Oa1+0sUG7cgrOOZuk8ArNt57Gg8y2qqNZjHNpuzgIJMfJvnPO8ThN0mJXDcBrpJ/jOyVKuqo4q4kSK9tFkg8EwBaJVMbJJbqEMujRcFydIwTzx57g1IupBB+EmtF5MX6Yd7aHggRQudSi0h8KR+Bi9a7IXeauD2sl5P+hvoFUUkcwnSS1mLk/Knyv9Ltve3TJmwt7k+M4qecfE9WEs3CPWdwNnYlVidKC7EHgEImkSjk6KPFA5NJWFceHNLMGO75NGwxNgyx/ZmKFHnxAW6ndUru+R6AnHvxxMHf5OtcS3yMJA2IQCvqTZYjxaS8qvQGPx3LY8b/PGh8tH/kkMpQ/0CLzXamAy0Rq+A8M6ZCNZCBLM5zsEXT+huoNe3lR1iU3M9hMkwmhk4otW0ZSy8tp1PN2i8z0+0T1rAP0+KggRMCAJOmUDwWDmoG1UkIbLbj10VfgWWCaniqn6RxCV8ACxPNTnTQO5Bns+hM6dguCwf0JtWkMTj0LPAGyWFVVn2+Y/JJCz7KsSmwpF0ICqeLXPb4eN26NZy786dXQrXxoiZIF3NFL2PV+vjlAiHvAR9Gh1SpQfnLya9Ddf5c885QOYk0Ds2G7mJoIsDcGBg6rqCXwwnEa60FeiO1zC1Y9y0/S2ykQKV6zds38vd2FpQhVv6agGB3uolhENV48+w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0402MB2939.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(39860400002)(366004)(396003)(376002)(346002)(451199015)(83380400001)(86362001)(38100700002)(38350700002)(8936002)(4744005)(2906002)(4326008)(66476007)(8676002)(41300700001)(5660300002)(66946007)(6666004)(6512007)(6506007)(52116002)(26005)(2616005)(1076003)(186003)(6916009)(316002)(478600001)(6486002)(66556008)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CnZl0jlpC/XPp7vToIiYMLskpIoUZq9JhIRRE3Z1qST3I/uZH1T2sYBoPBm4Q630nXVe4JER4aIE7l2lMDwSRpTg8WViWyt3vT+kT0JIFsKMTDnMIN+vMydZlD2QO/Qhx1D5gz3MsbSW0BJ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CnvJKGlq20u8ti2VdnBQx320bsPh5Q/pdrPzckOiw0c9QCzjrB+Q3QYDxsFgYQB9Vy8F1JnlUJMIGWTqMusnXs6SxbdQgauMN4XJYd56d4xFU1v2YnjFgKXba105drbAZ18fF5w5mbK9fdciY7OG6fdeOub8b+RhIUtX5HeqlNUYFxtOtcY9MSzJF1PUdnlk9qh4aw6tKM1SLh/zwg3cqAxbEZp38H0ulOZzJNa11/LY0Vz1vIHZZIUKqvhZlI7Yfk3wKAIwZstSfm6IStm1jfKmqbLhZ6iWSMDKGdvbUrH/zszeqwkaH9njaP8oJBwI2Eho1Bx09RpsikcPNiQ+HNOfF5OAyhhA2Juf3586WUmU5nStcS21DoWVggZHmzrfej51L82g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23ea7728-6259-4fd7-d113-08dac7a66658 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0402MB2939.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 07:44:34.5064 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vcnSUmVbwEGEKQ6RB8S2XUoP+bm6sbtyp8Or74l5p+gtrYcBkMBqZnpiTJhGmZySko+vLUKRY4kNTBmD6dGr/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8318 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The i2c irq is masked when user starts an i2c transfer process during noirq suspend stage. As a result, i2c transfer fails. To solve the problem, IRQF_NO_SUSPEND is added to i2c bus. Signed-off-by: Clark Wang --- drivers/i2c/busses/i2c-imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 1ce0cf7a323f..ba49b2f7a1d1 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1510,7 +1510,8 @@ static int i2c_imx_probe(struct platform_device *pdev) goto rpm_disable; /* Request IRQ */ - ret = request_threaded_irq(irq, i2c_imx_isr, NULL, IRQF_SHARED, + ret = request_threaded_irq(irq, i2c_imx_isr, NULL, + IRQF_SHARED | IRQF_NO_SUSPEND, pdev->name, i2c_imx); if (ret) { dev_err(&pdev->dev, "can't claim irq %d\n", irq);