From patchwork Mon Mar 7 14:36:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alifer Moraes X-Patchwork-Id: 549914 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 AAB50C433EF for ; Mon, 7 Mar 2022 14:37:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237180AbiCGOhr (ORCPT ); Mon, 7 Mar 2022 09:37:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243299AbiCGOhq (ORCPT ); Mon, 7 Mar 2022 09:37:46 -0500 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130058.outbound.protection.outlook.com [40.107.13.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD6358EB58; Mon, 7 Mar 2022 06:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=au9m9QsSphPB54LZgseN8j9NyUBK27I9+UWlfBinEMYCUfhXJc+i5M32ZyUfALCR3onTc3vSMLvwQxFI0jUCp/fFEZtoMtbkK/vOlQIsp0rFAK/WLTfXJZkrkQBmBoVmz/RdVp//3n7QgPwNF2tnnG2RVb64SxURwG88nta2ms3Sgz0ISBtnF2AI+BtAzviQzvE7DAVA0gXDVLeSXHCnch7fvo2reszE3gm7vriYLNtFWWvLN0glxYWLG643Opw6MgqT+7h1DXy4Nd81pWMgFVuVhikCfbwi5Kpwe6DVRwQFb3pecOeCBIUHSXOPSPV11hw93i/SYtuxg4IMIYxR2g== 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=2aIDEB8QD/DdQSyTeBW4Q0gGXaXcgl4YQEkDDykEmQ4=; b=nRdEaQ5hsqHFusmJ7NeQsVcEISz6cOgc95c9lbrT0XiZSQ7XrpSmpj5bohWH+ycVrI2RIOOMtCRs1j5H9dKmfjuC8Hm1EjSDpVOwm+YRbl8vg1F66UMv2bIGnlj8MImes5GkBHyipKYdeVqFEHajMUMGeRQoQsjuLk8njEb/TOcglhQAoA98/jQwgEL/ObUIlmrpxVqBFJfcZNecyP2gBD43cn4T95cWUSCcyvdbQnQuyrW1wICSf3wCuEZ9UmPU7umI1y96rjjH0Hcc5wfEoGrfJqaZGxP6isFA5LggieWRGwS2cGkIkaqYiz7vfph8WX5tkzy+jtJPsEeKK3Ew/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=variscite.com; dmarc=pass action=none header.from=variscite.com; dkim=pass header.d=variscite.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=variscite.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2aIDEB8QD/DdQSyTeBW4Q0gGXaXcgl4YQEkDDykEmQ4=; b=dfDhYGVxl0SaO1ARnogpOVMRHmOPHN/Rw7Vclk9L+Pb73+qYKrly/NOPqgJAWAag37RNSthvViOJ+iUmnJG5uZlcXvAsGTejpDMFWmk6/UOrgbHnE85mvHSbN1FjhiwSXOZyrZwuceu5fx3W1x3QfSNLh8M/e9GmiIvRe7dmd12/ypnm8C7EGmeRsWxwaBvz42QC3TzbHFRuvUodPpAAqqLUmr4/6Gow47KPnS8BUd28Q9r2amtn4q+JIFPcENuSAY1ctn2cMqQb3SRfZ5GVCgP5l9Wt1IFzHw0a0826aD3QVec6IUTylImKfYoCB+3Mda99phFQvdAS7zG3NM03hA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=variscite.com; Received: from AM9PR08MB6999.eurprd08.prod.outlook.com (2603:10a6:20b:41a::7) by PR3PR08MB5787.eurprd08.prod.outlook.com (2603:10a6:102:90::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.16; Mon, 7 Mar 2022 14:36:49 +0000 Received: from AM9PR08MB6999.eurprd08.prod.outlook.com ([fe80::784c:5631:d38f:9a63]) by AM9PR08MB6999.eurprd08.prod.outlook.com ([fe80::784c:5631:d38f:9a63%6]) with mapi id 15.20.5038.027; Mon, 7 Mar 2022 14:36:49 +0000 From: Alifer Moraes To: linux-kernel@vger.kernel.org Cc: eran.m@variscite.com, festevam@gmail.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-i2c@vger.kernel.org, linux@rempel-privat.de, pierluigi.p@variscite.com, s.hauer@pengutronix.de, shawnguo@kernel.org, gaopan , Fugang Duan , Vipul Kumar Subject: [PATCH] i2c: imx: add irqf_no_suspend Date: Mon, 7 Mar 2022 11:36:30 -0300 Message-Id: <20220307143630.28697-1-alifer.m@variscite.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: CP3P284CA0108.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:6f::23) To AM9PR08MB6999.eurprd08.prod.outlook.com (2603:10a6:20b:41a::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 90f968bc-165d-4abd-e82d-08da0047e986 X-MS-TrafficTypeDiagnostic: PR3PR08MB5787:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IP4w20tcM1M8BphI9zrCOhJjZsAT6YxPQglI9aL1GST013E4g1+n8WjXN6gJ8JeDpv/CIVz2fhZJ3Qd8/EGyZNmL69a6vrkdCmAWY9+p4sVXS/8x7WUHOBFpYxaKsa8uS9JV416fVNKbHOX+YLQjff6p43Po+6ATaHH334gELwCAP9ShZ92MqAhq2scoJRf3/NgnZ/yfPtm6cFdMLenQxk3OvLa9r0WRpRomLtgubaSl+15Hv6f/6+CRYPC1S1dyXnDveTP16NLIlubm/VBT2H5413V2UER3ijzu/fo6JzRXsVhFoKhrDC7G9RJ1gzqFPgGizcZ/Veh3YH7PwHZ/SoVCs12gAvy7VLRX0Ze4fJ1Y7e6oXl/atodbvvP1ARDJxVKGr5gp0bULf39W2kUr4lzRfobJbhrL2Py28zqt2bp9ROcKSZeygxhSfbJdQiyY3HOgj6EvB6Zo0HufEye0UEQaiA8zdvbujb3Gm6+hU9jJRWdnbDp7JXy6jUwiGzLwtf0JYsphSzaQtgXDtb3N9FKsc1dT3ajqbLGtnp/EVc/+XHXdlZwEz3qsVmuase4uFzItUH3BH+BfcxBnQvXP+wINnsGJeiDsheOtiGyak3M0lvGQxEJpzCwwvuUNmqn4X1PJhi8ZyYURn0Ul8WpYK/PyUkrNT03nx+P9vGb5ImY8wsm/8L/UEREjyNdlIf0zBtNdWRjoiX2B0MmjZhVEJw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR08MB6999.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(346002)(366004)(38350700002)(83380400001)(186003)(26005)(1076003)(38100700002)(54906003)(2616005)(6916009)(36756003)(6666004)(52116002)(2906002)(6506007)(6512007)(86362001)(66476007)(66556008)(7416002)(8936002)(5660300002)(4744005)(6486002)(508600001)(4326008)(8676002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nl7SoX3TacsjUo5QeEmzNi34oLRMeFQpHh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Grxc2gxXIKFYykmyMlryRg1vc0KTvc4wl+WvE2FlexQjKyDZr208zZkdN8m4uhAczeulFjY8FQ2uJFMxJwQUoD0nnjd5ZiOgb/wM8GN+pRArlRJY5m6efUY03kml1pmY7xS7IXoxOd6F4BNsKJWYXb3qngIK2F0xEN1hrpVPsufIwnnV4k+CDjqNGc+CRbn6dSGddhncn4d5bRThYjlhU+0dq+kzRAU1KhUJgqQdDmIXanLDxl+nWgludvdLqn0wjE9F05XtxuM1wPjmFznMCXZYc0qjxybnDXuARCWxdGBE4Dymr9TRQY3MRVtQT/yXmmg3Wx31QtXdafTggjAx00Bvlho0VeV+Fc4Sch+WKCRPUnX6Qx5X9A9gUumH4BIngHXV075XNNNhnazmKd6QH1dIAL39XOLeMQFFNM5RZGv81oI+zpE70/wRykrED4TwHPOCTYO1WMZFIEbAcWfzeHw05HUITHBLR9fgFPrZfuwF2YCEkBUKuBgavQnpXjBYR3H4dJ6uGv7u9B4Gs= X-OriginatorOrg: variscite.com X-MS-Exchange-CrossTenant-Network-Message-Id: 90f968bc-165d-4abd-e82d-08da0047e986 X-MS-Exchange-CrossTenant-AuthSource: AM9PR08MB6999.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2022 14:36:49.0550 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 399ae6ac-38f4-4ef0-94a8-440b0ad581de X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fxmgr304JkBKi82PZYeW7u8DB9MZoC2ovr408CGDKx2t8jtzzuDRT19ZL5VMD5N817uh5QzL4gRw58lt+l6JhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5787 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org From: gaopan The i2c irq is masked when pcie starts a 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: Gao Pan Signed-off-by: Fugang Duan Signed-off-by: Vipul Kumar Reviewed-by: Oleksij Rempel --- 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 27f969b3dc07..fcc09a1e7f44 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1478,7 +1478,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);