From patchwork Mon Nov 13 02:32:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 164331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp962794vqg; Sun, 12 Nov 2023 18:33:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsbXQwFga2/5wGbS8ow5jZKHNeCzYMxuyhgdH0HDptHRozdOEToLIU/6ymzxzadzl+H/dy X-Received: by 2002:a05:6808:20aa:b0:3b6:d1cc:4c5 with SMTP id s42-20020a05680820aa00b003b6d1cc04c5mr8896363oiw.33.1699842792721; Sun, 12 Nov 2023 18:33:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699842792; cv=none; d=google.com; s=arc-20160816; b=kbBY8YOuvldJkJWYYFZ7OLDHKPPDyxwGJtxD4ki51lZA5BMyflSnKNvVmKmhfXvT5k cv9NLnMVLyd+cuJl4cQ3kr2L1gUkh2rpp9sCvvkNfgka9GjmDBeTNV3nlRjKsya9mLO6 WWwmJkE+2l17u+wkgKfIgEBFatzXZh/0inU+oYVRvYlzKwHzUvtgIs39sFduTQWBswxA NdnJVvzA9jOQBTwsPcmmSlo0vYHeLHZvMH/07axUMhnhkf2DAxY1mTN/saaVk28mYQvC q0Kr7wD0zknHxzfbIVp2hyVfBDlOef8PUO6XO6J0DrikUW7/jFBnt3lFf+J8dZq+nxs1 MBaw== 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=JRTOkQAIxvqqyHp7IwShDoodnSKUTwTjnZNRiFS76Wk=; fh=MAZhbkhRwmt75a9FRGMgGCSoA1A29RNlcP3b2E3+wT0=; b=L+ZXzu7bvPhThwEZOslXA0jy2R/5n2sQ5p5UaySy29fvDPdnT+Uig0EQPN9eIPgNRD KvSBG57wf/hAF8NM0dYLixZOnEQhxV08Eb5pb0PFIC8QHxM4ZkPPY+shLdd/HKS4Zg6Q SafD+UtlaIzfdq+TOgGQBoTOweTWHKvDIGhL2n6y5YC3KzE1QqfB2aNCkG2BNw05SpRA 6xPgubShkRnO2U4O+eVJQAx9Re3lwnixrtkLpbSvVCnbUJe5uM+fXdRivoXkyRGyfXXx /8y3Q5NZoGEJ5Ckxy68Ba7B0tkRolMr1K81A2jLvLQ7wLDYDal7a8iFCtvrNbVOZx9L8 0NpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ZgnGRdwV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id c128-20020a633586000000b005be3117805esi4793036pga.327.2023.11.12.18.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 18:33:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ZgnGRdwV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 841BD8058C62; Sun, 12 Nov 2023 18:33:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232900AbjKMCc4 (ORCPT + 30 others); Sun, 12 Nov 2023 21:32:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232584AbjKMCcy (ORCPT ); Sun, 12 Nov 2023 21:32:54 -0500 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A65FAB8 for ; Sun, 12 Nov 2023 18:32:51 -0800 (PST) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-5bf5d6eaf60so40565987b3.2 for ; Sun, 12 Nov 2023 18:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1699842771; x=1700447571; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JRTOkQAIxvqqyHp7IwShDoodnSKUTwTjnZNRiFS76Wk=; b=ZgnGRdwVxoipjMYHh/D2bfcvbYeUbUCHiPwnZBZshXoe6HhfYC9+9eXhABTNeCzP59 ieY03kI0mt+0zK3oPcBSdLPa8F2yMDXGdWZeTn9nrS9b+S2CXgMLpyEjJCSwdq+qf9YL hp+tZ1nP0YcbKwJM3n0LF3RU02N8c7G3I4IzlWdC3d8WzGhLOEO9s70xPTCVGB6oBzin G/uPwQmz5UqsjhWsCk1WJo+oTUlHkBaz4953AiR2CUGmnDPHTNnrhViLGKpcv3MjkuMr eNL0NIcyubmJ6q2Nb9/mMqqytl9ZGC84znJsM4IMWsQft7I7Zl5huXXrp4NfnTISTdRr JLyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699842771; x=1700447571; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JRTOkQAIxvqqyHp7IwShDoodnSKUTwTjnZNRiFS76Wk=; b=onJnqmU+qG6Ow3l9vN+1ibSZLZoSIaC057ACoXRmSjOZSdefd52dJkHN8YFnMZT3Gg IMO7QcNZzVOIhYCgJkAQVr4t1XucNrGaBtktyzbQ4oPIdDATscQ6J1XG1KLUmdFCNPa9 EQ2vkBVopSARNUAmfn0gKODqKESSmmUsp47A5IERPq67msK1i8JBRs8xe2vAG1Hd2Fyc 2IKc47c9fJmP1Rz6Z3bHmkNAXoHtLDP8EoUmTV/fnkY7diLolE9UwUNlUZPmsnugVd5W BK68zSXXlz7wHNcc9yI84Lw7b8eGd+QlZNLqGu9V5Ij86QQ+rszd/bMO4/V+AmWEzeYc GcWg== X-Gm-Message-State: AOJu0YygSEBSyDZ0zzHJC77q2rSNmlhrqK5iYYlt8gTqtVc1ojcC4EA7 t5Drzhpd0vH8HyMc+/Q4WeZ3NQ== X-Received: by 2002:a81:4113:0:b0:5a8:277f:b378 with SMTP id o19-20020a814113000000b005a8277fb378mr2806271ywa.1.1699842770781; Sun, 12 Nov 2023 18:32:50 -0800 (PST) Received: from sw06.internal.sifive.com ([4.53.31.132]) by smtp.gmail.com with ESMTPSA id n10-20020a056a000d4a00b006b725b2158bsm3026399pfv.41.2023.11.12.18.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 18:32:50 -0800 (PST) From: Samuel Holland To: Peter Korsgaard , Andrew Lunn Cc: Samuel Holland , Andi Shyti , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] i2c: ocores: Move system PM hooks to the NOIRQ phase Date: Sun, 12 Nov 2023 18:32:45 -0800 Message-ID: <20231113023249.1185682-1-samuel.holland@sifive.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 12 Nov 2023 18:33:10 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782414356078119401 X-GMAIL-MSGID: 1782414356078119401 When an I2C device contains a wake IRQ subordinate to a regmap-irq chip, the regmap-irq code must be able to perform I2C transactions during suspend_device_irqs() and resume_device_irqs(). Therefore, the bus must be suspended/resumed during the NOIRQ phase. Signed-off-by: Samuel Holland Acked-by: Peter Korsgaard --- Changes in v2: - Rebase on v6.7-rc1 drivers/i2c/busses/i2c-ocores.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index 041a76f71a49..e106af83cef4 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c @@ -771,8 +771,8 @@ static int ocores_i2c_resume(struct device *dev) return ocores_init(dev, i2c); } -static DEFINE_SIMPLE_DEV_PM_OPS(ocores_i2c_pm, - ocores_i2c_suspend, ocores_i2c_resume); +static DEFINE_NOIRQ_DEV_PM_OPS(ocores_i2c_pm, + ocores_i2c_suspend, ocores_i2c_resume); static struct platform_driver ocores_i2c_driver = { .probe = ocores_i2c_probe,