Message ID | 20241223034343.544002-1-carlos.song@nxp.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1D2FE7718B for <linux-arm-kernel@archiver.kernel.org>; Mon, 23 Dec 2024 03:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=wXYopqj56IbSRtEE9ccZtkfmaJ/ykG+YT3BHbCiMas0=; b=TJqVBkMh3jIlnjh6ZMtxWW9ANH ENr0gUFkeL7VeLbkj27gvOu0MBnnhe333HRP7YrpJ1bzeTAJCiYLGYxaMCbG4YIFujlthcX6vLgCS rCy0OARlUsjlYSnUT1EDH4At6zfSuMyFv3+COl02CJDJRLStgtv+GOJPRq5c8/x7kQFeWoC5F9idM LvZq6d5lPud4TSpvbKel/AsgaQSoXBEiMfFR4g28MRcc0HFDZEvnomJrjsgETb88ye6WlGvU1UMOs MUUGjinQfRcUO5M8J+yWBhjHcdT3GXwCrRCUfincqlI0srEVJewKaQ1Pe1BhrWICUZrChN6xt4mGC GHNJ+meQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tPZCs-00000009GXV-3Goj; Mon, 23 Dec 2024 03:34:10 +0000 Received: from mail-am0eur02on20627.outbound.protection.outlook.com ([2a01:111:f403:2606::627] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tPZBg-00000009GOu-3Uf1 for linux-arm-kernel@lists.infradead.org; Mon, 23 Dec 2024 03:32:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ON0lSRpoW6270Q4n7yrpNK9kGnbkOh7AqLMD+zYc8zBn4xKlRVIR1/UHo4HA9r7baroWfHBSVnyM1cKmtMqyfi4so54XIvshtfzF3lNrmByFlminuhO42DwSVCtUj4IBPdZegJt0IiahQVUuFAQXzvq7lT+50Iz6CjwHBeEUmt/h8BTwLI6ZJLx8CT0ZDFlZnYariuq32B4ytXQEwYHQmZ7g87IrwO/kSJTBIx/hFGEZoiMALgeh4vLHri7QYzuTy39EkZZggeoj5Uq+IdqcyVSvh8vlEEuqt5KB72E6R3M+moDfB/XFzfzjEEZc8ht2NULtsgLeCnxQmHXx5nEA+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=wXYopqj56IbSRtEE9ccZtkfmaJ/ykG+YT3BHbCiMas0=; b=AAc9FHN2tdUgHv4rpWpyJlgeiBK79ogYA+s7+sdrCg4Tqg52wX3k9WVM75kd2tG9VuqIqopmbnZkSYWl6/4QOqpLvDYNzDFY6D0fjEicwEfUUtmFLZNiUEE0w7Io9X5ySyltJ7vRqUTFu+Mu+pLcB9AQIVgsR1FU/ruTxh46qbJLFxp+al0G7E/HSPcwjxJPfdfyH+6CXn5CssjU0BzwhDNxxmYX2pGZm1uNdL++x04btuPrFygVo3VtqDvr7hg1jOqrlybWkrfBC6v1T+siEsPCx7Uq/XQ1shyYnq/fQUjC1me2CaXP8DaUTR09qNv9ay+qs08VPKo5NOFombVe7Q== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wXYopqj56IbSRtEE9ccZtkfmaJ/ykG+YT3BHbCiMas0=; b=ii129ahY6yKRIQz9GHRr0XXR+EXqjznyfmof41tbWC4Vm8aNE3qL8XOYMFrzfgQew4n8/iLiXvARjIqevwlUyKPEJOfWUvUBaFzBIkCHcDo1riQo07IuQBZGsjUsFe/xYgUfcqCDkRYeiD0oJQ78t8F5/nyVhDMMo9wl2hzpx650r8sZjIgXYdImUQ5rZTtPFKJiETIDea+fqDPTz8QcIV5ivbmn8OrhJn1jI8jhmXb5S5xIvs/GH/d4NXxhCHlkwOG3qhWJboah4UKrN1+c/TAcE9peaEt04uTZaVCpD5A+CXiBTJCjNbGHBfxb2cleFQ+NUgsbZPbyuwM8soIjyQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR0402MB3937.eurprd04.prod.outlook.com (2603:10a6:208:5::22) by AM9PR04MB8905.eurprd04.prod.outlook.com (2603:10a6:20b:408::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.20; Mon, 23 Dec 2024 03:32:47 +0000 Received: from AM0PR0402MB3937.eurprd04.prod.outlook.com ([fe80::4e37:f56b:8a3e:bff0]) by AM0PR0402MB3937.eurprd04.prod.outlook.com ([fe80::4e37:f56b:8a3e:bff0%5]) with mapi id 15.20.8272.013; Mon, 23 Dec 2024 03:32:47 +0000 From: Carlos Song <carlos.song@nxp.com> To: o.rempel@pengutronix.de, kernel@pengutronix.de, andi.shyti@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com Cc: linux-i2c@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Carlos Song <carlos.song@nxp.com>, Frank Li <Frank.Li@nxp.com> Subject: [PATCH v3] i2c: imx: switch different pinctrl state in different system power status Date: Mon, 23 Dec 2024 11:43:43 +0800 Message-Id: <20241223034343.544002-1-carlos.song@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0048.apcprd01.prod.exchangelabs.com (2603:1096:4:193::17) To AM0PR0402MB3937.eurprd04.prod.outlook.com (2603:10a6:208:5::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR0402MB3937:EE_|AM9PR04MB8905:EE_ X-MS-Office365-Filtering-Correlation-Id: 19431c15-b2dd-49dc-43c2-08dd2302785a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: AyaY01S42qf398aE/bQTR9FMdNlv0KsYxsNAuQT+vSGyujScGhY+17p5I5C7Ra0MMLWWigpxz9uRgBhsZs46/29txII7AJzTK1FNx07DecBAt9XAnJUpr5mxzXlbQwcjafcvavtlX7uZ72Tn78bHryP0YkhhlBVHMA0WJvIGGTAroI/dLsNNCzJPm4iil2ouQ4YLv/Ln2hCzYEpOwiyX6g9rs9nASpdZPDREN1HUd9YAA/TNTdkm2oM0ZR1qaOOCmBGWebMjJu/wY/4F+Y7urqYidQLX7EJvbwm0Yq1HcMm5W+/iQNmcYXUJKeAik/7xiRobThcgDlMOLZxsOleBEsAJc2SMUSq2DfGM3V6aRCGPlS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dQR5B+rA1tjEgstwbkYHgYoRdC7wYF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR0402MB3937.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OlFJPraRGWqn1UZlS1om/Sxs0CwmxkEm2aXsfpbvbFIQUacY0zjNs6rbiF56iETSVklmvzu0PEJKSEh/3dj3etjtVV50SunyeGALgjlMqMMKg4MuuwvHk/5VQ+5QC5C74s9YwCyfr9zwOEnHDdLkrCJEXiYKveEXLUKzFMQNzU/WvZBPqDDQgXmI5rwOi1VecfePE/m5OdOgk+KzwwQQ7CX6I0RzESpArKE8fNhVjtOIBF6ITsBxmgQmdtyGP8STGSuegJDxNQGnZNCcC8Mq9gfIz6bDHlGHhEQG4MWSPrm9FJDSq3Z0R2XM6TsZbJ0xwqiGDa/QEnpNTIAW4nxckPWz3csQ9KEe4TpI4sGw2RV6hhc0JoCko6Eq/IK6nRYLdqv0Qu46li/60fknO0+FfiXo6XscYidPWnL3VaW5exfKk2LWNbOU1Zlp4kdXTl+NIb6b6vMFT6E5xFbD0ZACZvV0JK7JS4px8rGwGMMX4PXzjf4NDfUyxtXZxatdro0iCrK7bdp0D6+Bo094uptP+vfWUtJQefcDE5qV6zXE6p3+p6jXzXp4p0GO09APB0lZlDnUtUofTNviMVZsQrzbYK5C5AvnCqNpQkcjMCowGC4ELFS1/EhDVzqXEzkXDM5mD5lOUQllP/Pfs8iyJu1+sQAr8UGl3dHoPGiAeELlVjblxkOs54hBP62fdx1cTBhy25nIClIGtAjtgygAV2cTgXPJMGW5H3cRFsvGUmeRyEC+yaB+WREZEQvJiin33pQ06koiXIOEJqnZhvmA4TxmhhDg67kTppk/KLu0gPP+Ax0eMuIHQRttkOrryri3/2bnOnYII5+4OUBwyyeFzHpLKSA2Ig6+5Zp6AAcRy3i2i6Pz53LuQH0PGprnepiAK0j6RQYawOxCijko8NcyYN9uI/5k4XcBdNsH03HK5gJDlw8ZHjH3LDzlgKEd5rl4Qvy1TOqIKdGLdXpjCvVM5q5AT3hUTY9m0bvxdQ5CRj1SaZYx+zKU/zHs+S4v5dv0e2uBj45UbJl9KWRCPB4sLgZkddJRjjUntOzKabDCdC9rbBsm0OIpb139Jkz167U8X1xwjHqkqoDDS74e3nNTB7kwhXA4vCO6VcAD5iRpKCI9dfK/U5IGNsIX1xTzPniPlbQ/llq/bJaZoU2uQXCGp67YcIORQQaZiq5OwJpaYN+3WgdezahLGPyt+kj/WZ/dx6qJPpMKDUCeuzEIJwtY57rUf6BN+tPhAW6HpxgoiKkbayNfkoWFDOpkDFxYBxkFnp10pCfKf7lBCZMWXr8qpQQC/7EZYm7VC/T+n36KphKqEUDYGgw7rICIUYrltRkcmpW6rTGJZ/fndoqhgshRcyQk2Toxxsl8BseVD6RrNo1/sx4ctU4fDT/660EhHUHpinu4CJv7Cp0Coj+QO36PdqJKdRNzTw84KYgQMuToAwY6Wr0nLsXNomrHcQsS9u8yHn4vfuoMNmU+NW9AutXDRjcxyx61D/RuVLYxdLdtk00FPz0Jk0j1ctunPL4SkZMxu6QQX39hvxb5ZiPujkMEzh6/062oHTeGsXRRjyLz7Z2Gqa1dD5m9nhGGsV+yGRBxlrx3 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19431c15-b2dd-49dc-43c2-08dd2302785a X-MS-Exchange-CrossTenant-AuthSource: AM0PR0402MB3937.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2024 03:32:47.5647 (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: X4WGW511m6gDBC+iFzJXIyXgidyQsclQP5dt9mdaKjProZpbphCWKck/azJQemaTs+jgafDyRuOUDr8qjE2MBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8905 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241222_193256_931723_9DB64AA5 X-CRM114-Status: GOOD ( 10.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[v3] i2c: imx: switch different pinctrl state in different system power status
|
expand
|
On Mon, Dec 23, 2024 at 11:43:43AM +0800, Carlos Song wrote: > Switch different pinctrl state in different system power status. > > Signed-off-by: Carlos Song <carlos.song@nxp.com> > Reviewed-by: Frank Li <Frank.Li@nxp.com> Acked-by: Oleksij Rempel <o.rempel@pengutronix.de> Thank you!
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 6fb496a92817..d0cfb8eac580 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -1869,8 +1869,7 @@ static int i2c_imx_runtime_suspend(struct device *dev) struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev); clk_disable(i2c_imx->clk); - - return 0; + return pinctrl_pm_select_sleep_state(dev); } static int i2c_imx_runtime_resume(struct device *dev) @@ -1878,6 +1877,10 @@ static int i2c_imx_runtime_resume(struct device *dev) struct imx_i2c_struct *i2c_imx = dev_get_drvdata(dev); int ret; + ret = pinctrl_pm_select_default_state(dev); + if (ret) + return ret; + ret = clk_enable(i2c_imx->clk); if (ret) dev_err(dev, "can't enable I2C clock, ret=%d\n", ret);