Message ID | 20230601101036.1499612-1-ckeepax@opensource.cirrus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp199475vqr; Thu, 1 Jun 2023 03:29:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vuKvboI/xI00PH895BVJRCaQN8muTIEETvu2VtwGnbUaw10mt7ZgkTcBlJ9tCXMw/TPqQ X-Received: by 2002:a17:902:ea0c:b0:1ac:84dd:6d1f with SMTP id s12-20020a170902ea0c00b001ac84dd6d1fmr9493900plg.1.1685615380055; Thu, 01 Jun 2023 03:29:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685615380; cv=none; d=google.com; s=arc-20160816; b=eRzAyBkIJpUdGuCPSkS1YB9ntiBo4kibeHSwaMozi1cHYM2JN3QEgUHOCNY6veAM3T bppz00wx4hTktmPJ5e3c63NApsr/zEXmStQWXcPOINhC7bSSsTL/djmdROmY0hXls9PE 0DQRwHmNB3PMHh2doiwzhcjURId3QfELQfVHUeT1LzErXihwDZxXWsB1Z7jKgClRgDAV QH3mc4XpdM0Px2mHwrs0WtFeFdWh9TCaivxy3C2XDV2Ny4EDJW72TvgOG0CEMFSgxcei bgG/hRjjJuY5vVWP4vzOne6xa0MRot5PAVEuiPmz84Bnz6wY4VzDv6noCLp3qtx98cO7 4vqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=n57MVcye861vqpd+7cbgKBm9G0JBu/LE6whTKr7WxlI=; b=hcoldOUJW8BvBMPboSMadWb86vzRcspraQBH9hKliTdDoaU8XlQ32S4bZMsgQWD/x0 c64OYjGw7+HSa9jxEVGkbs0XLMRHaujZw+6zrQ7+pJWcA1WBxmfVLqvzOwpgcsY/ghzt TqkO6UA4co7T8b/sFiHqZkD2K2tVallh8fdp/17sd2rW70PZCzB3HsG0/wBsKzp/YSSW HaBqXrg0Z6d5A/sU9Y8vijldC62ICJQ6MvZZ8azOeoSuVW/YoiGSpbCLQ+ySfKGw1QcP cLXOc7eBIjcE9eokmpRAyaO/E4g+Hltxt+YzbBR8wt6Q9I4BBucUh6zStWqw/HolGGh7 KLIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=UNuynko4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x16-20020a170902ec9000b001adec0d4391si2650503plg.48.2023.06.01.03.29.25; Thu, 01 Jun 2023 03:29:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=UNuynko4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232935AbjFAKMj (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Thu, 1 Jun 2023 06:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233349AbjFAKLe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 1 Jun 2023 06:11:34 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8A12E48 for <linux-kernel@vger.kernel.org>; Thu, 1 Jun 2023 03:10:49 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3515qxE9012309; Thu, 1 Jun 2023 05:10:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=n57MVcye861vqpd+7cbgKBm9G0JBu/LE6whTKr7WxlI=; b=UNuynko4ERYwUnoyhTmu23SbFs+TOrLsUcnyHY2urE1DaxYQHLyQ/gqNu1SZ70ma+yYT Ah8tA7198JwlbhUkSmut63pmUZQZmo69dsL3IGhagO35M6mC2nHBdqjdEM5rcA3l4AUd a1hV+rjD8OizS5TCvCFYyLB3LI0lhKV+9DODTGZ1Up7ljXPOqBPhubLGV5rbcDZcuhu0 LDbHfKmvilWv1/qf5BBWCFw2iSmInRXzxzYsYegYrfpY0Wo3UjXln260Opq4x+GuaJbE gD8+51+oyLhd4Zng2s79MmF2Ur8DPLiXyqdp6OEOCeuS4rUQA5kb4gor+xGffY3N2iJZ 2g== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3quf90wqub-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Jun 2023 05:10:45 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 1 Jun 2023 11:10:36 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 1 Jun 2023 11:10:36 +0100 Received: from algalon.ad.cirrus.com (algalon.ad.cirrus.com [198.90.251.122]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 110B745; Thu, 1 Jun 2023 10:10:36 +0000 (UTC) From: Charles Keepax <ckeepax@opensource.cirrus.com> To: <broonie@kernel.org> CC: <gregkh@linuxfoundation.org>, <rafael@kernel.org>, <patches@opensource.cirrus.com>, <linux-kernel@vger.kernel.org> Subject: [PATCH 1/2] regmap: regmap-irq: Move handle_post_irq to before pm_runtime_put Date: Thu, 1 Jun 2023 11:10:35 +0100 Message-ID: <20230601101036.1499612-1-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: LnamJCVghHxhPaqopfmDgt0U0VSt30OO X-Proofpoint-ORIG-GUID: LnamJCVghHxhPaqopfmDgt0U0VSt30OO X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767495832678345483?= X-GMAIL-MSGID: =?utf-8?q?1767495832678345483?= |
Series |
[1/2] regmap: regmap-irq: Move handle_post_irq to before pm_runtime_put
|
|
Commit Message
Charles Keepax
June 1, 2023, 10:10 a.m. UTC
Typically handle_post_irq is going to be used to manage some
additional chip specific hardware operations required on each IRQ,
these are very likely to want the chip to be resumed. For example the
current in tree user max77620 uses this to toggle a global mask bit,
which would obviously want the device resumed. It is worth noting this
device does not specify the runtime_pm flag in regmap_irq_chip, so
there is no actual issue.
Move the callback to before the pm_runtime_put, so it will be called
whilst the device is still resumed.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
drivers/base/regmap/regmap-irq.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Thu, 01 Jun 2023 11:10:35 +0100, Charles Keepax wrote: > Typically handle_post_irq is going to be used to manage some > additional chip specific hardware operations required on each IRQ, > these are very likely to want the chip to be resumed. For example the > current in tree user max77620 uses this to toggle a global mask bit, > which would obviously want the device resumed. It is worth noting this > device does not specify the runtime_pm flag in regmap_irq_chip, so > there is no actual issue. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next Thanks! [1/2] regmap: regmap-irq: Move handle_post_irq to before pm_runtime_put commit: 02534c8e967b51940ae7c0cd99befe216f1c2c8d [2/2] regmap: Add missing cache_only checks commit: 99e8dd39f34333d745e6c220be5d166e85214e6c All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 330da5d6c8c3a..ced0dcf86e0bf 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -502,12 +502,12 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) } exit: - if (chip->runtime_pm) - pm_runtime_put(map->dev); - if (chip->handle_post_irq) chip->handle_post_irq(chip->irq_drv_data); + if (chip->runtime_pm) + pm_runtime_put(map->dev); + if (handled) return IRQ_HANDLED; else