Message ID | 20241014060130.1162629-5-haibo.chen@nxp.com (mailing list archive) |
---|---|
State | New, archived |
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 24F99CF2590 for <linux-arm-kernel@archiver.kernel.org>; Mon, 14 Oct 2024 06:02:32 +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:References:In-Reply-To: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:List-Owner; bh=MEW+ck023C1R0wEnHSWTj2drmMrl5/32Ipeta6xg2yI=; b=eTK6zlFSfzbcdFYVdHdQs4QaOx W7qBOXjGgLmK2GkjFIwcIxDzjLq7rUHw/XoKyLp08Ut51/FqE2LlrtJNi61iJ38q5Tj0iIdw68CiT fUClGdP8a9NErQB50FLKjgjRSPKxpN3d4igSNGcEh/28N3OUADGxzQFAhXaQIj7N/4zWTW1wsOk71 TElEIrRm8UAuhiTk7nvzPG3ZbCiQxCCveO50Dxt6G2X0S6ozWuSuZCrxNXQowRWViUWbve2tlvZPC oRQ2f9E1/gZfNeuMHHVwtKyDMSmNoY4BwyQUUAt06iVRx4eG8GjeDqf61M5KhtkyxPegl4I+CBlci jO2khyJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0E9r-00000003pKP-0Bkf; Mon, 14 Oct 2024 06:02:19 +0000 Received: from mail-am6eur05on20610.outbound.protection.outlook.com ([2a01:111:f403:2612::610] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0E8L-00000003otT-2n5f for linux-arm-kernel@lists.infradead.org; Mon, 14 Oct 2024 06:00:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=g9DKM2PAGoc5EH2GdnHRh++0qG33L42K06XGYjHIkL/rp3ktuIxX5abyLCDVx+lbRkjxKOLVxr1ZLtPw3nO+bfE0wtE35z6yMPWaYlAj8VN3Gv/zmSNO7759+RLaQKbnrbo4kfrqyL4BqVx/+DaitZCJzwFgwbAagtBkH2/u+OqXtq1nxQn6nlMrg6Xxoc7BrEUVPpcOgy+JM7VxIE+GKsq9g4l8sKC1StvlG4BPWAAWkJXAAb+D0fkjozhPOLO8LflALzeZ49s3ClltaI1tOXKBOgIQGa8Qcm6uszw7jvPlXqCfzdz7ep6UAu3JgJUmZqUwcQoyZleBKSLiuiUPlg== 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=MEW+ck023C1R0wEnHSWTj2drmMrl5/32Ipeta6xg2yI=; b=I3pLm0aunJeFADpFkZOYyWPvPpUss9Ric9fK5PTJdwM6DCjtqVlQmZ0QaDWKnw4LDwxvujKSSlyThZNmPu4sNJE1GQbm0cTUbCGbDhOVBCdJKgY+Nr9C3L9Njo9cACNvWGaOShdp17MpwAn6L8Pbbsou0nhPQqkaoJHAY7ObU+9p+vPRNVyM7oh8eolaykD9BGtJ4zuWj0ad4EKIi77m2h5vb71PP5zzZXkzxwfER3mrUsaZddX9fVIWEcX/Rcw6Dfe/1SdEe30ua9YQm/gV0s2GjHlo9GZvpG3+uqWDJUwe+Uqov6PspIpzvVBE0qbd+cZQionGGSpNqL9OUCMjnA== 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=MEW+ck023C1R0wEnHSWTj2drmMrl5/32Ipeta6xg2yI=; b=DrXeqW4yozTMksFF1jwxVdPOjw2QEiRxybyWmi0SBk2In/IWcJsmwttCQi2rzrxQREuzezLYuhSuyxfGcSpfJ2E80HQvBL7OIhTSxCSf3cEOlXuqx5K08QpCkx24UG63uFmbUN2Xt+wMmbOmwItmC0V/84GTMnyPuNBNNg3CFNYgUVyalDN4RGay1DtIcwp068DLNHzjJrmntVeUfllQlhcRrQUoKj85fe071VF5MCx5GWRY6sWU6BJ0YF71vJ1LEZKxiIFvN3DAeqYb1R3OIC1+3aOyhkymbgcU8ZzTfglVGFcsHIzPWk/MBBzrfip0Zel10+Y9ERmiS+9t56RV0A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU0PR04MB9496.eurprd04.prod.outlook.com (2603:10a6:10:32d::19) by PAXPR04MB8224.eurprd04.prod.outlook.com (2603:10a6:102:1cb::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.26; Mon, 14 Oct 2024 06:00:40 +0000 Received: from DU0PR04MB9496.eurprd04.prod.outlook.com ([fe80::4fa3:7420:14ed:5334]) by DU0PR04MB9496.eurprd04.prod.outlook.com ([fe80::4fa3:7420:14ed:5334%7]) with mapi id 15.20.8048.020; Mon, 14 Oct 2024 06:00:40 +0000 From: haibo.chen@nxp.com To: adrian.hunter@intel.com, ulf.hansson@linaro.org, linux-mmc@vger.kernel.org Cc: imx@lists.linux.dev, haibo.chen@nxp.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, s32@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] mmc: sdhci-esdhc-imx: do not change to sleep pinctrl state in suspend if enable wakeup Date: Mon, 14 Oct 2024 14:01:30 +0800 Message-Id: <20241014060130.1162629-5-haibo.chen@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014060130.1162629-1-haibo.chen@nxp.com> References: <20241014060130.1162629-1-haibo.chen@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR06CA0011.apcprd06.prod.outlook.com (2603:1096:4:186::16) To DU0PR04MB9496.eurprd04.prod.outlook.com (2603:10a6:10:32d::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9496:EE_|PAXPR04MB8224:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c41fabc-9305-4897-0918-08dcec158834 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Aur5Owf93diMl1B6fs2wMDiqVo0+auyMxnjQj4qZkxBRLlx0OftoPXMX2unLqri1ijeDEZscN3sIgnJ4P9ws47SySOXNKc7Tw8970f7X9R8F3g+9SpbgMoM314KhzY/J7hGq44gfRmnL28F+nQDBTtNjcSJf5b3QHNOAXPI832W8b8drRlCiG1l8gR87KbBzc3QP8+GXDTZpXBt+HPJhZAxAkWUtR3+WjKBJQClVG+Mq3NPVR5isI+aij3nEo4hkADIQiEiUjg2USra8M+UPNeeJb1fiBePXt6+gKvPedaWShI2ORTSilZWueSwIE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;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9496.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PSG/rGY0w7+oR5llUDC3VTE8odkeM8GeP1+fjaTR9yyyGi2JrPl5fnOHj9u4hfT6Tm9NUWZiQQQnOSBG82B9caSoKH0YoKuuhy2guFYJrsKtJfyvQbw5+0JEOTJexn19k5S0FrBQNiDTd5cfNQ2euQaP8UudWXvkbgb60qlVZd+XI1dn7llGa5nUNRBaMW7x1iuie/GtaeL3ooOF0EnlJdMIOcEVV6wDJ5w/5WG+Rc8e3ruARO4zh2mA7N8RiOVI8v2c+ZCVSqK2oDtrIioga+Jgx9c6SlpC12sPg7rgj03UghLEJ2WgYBRTxtSQ4tgILw6IjxikpOL+Mgql/f+D8r5smm2yqvyp+3FVxpEvL3reKCAIvAk8E9yjTZ1KFVi4xIIkRXVhjGF6Oip8shbvCkNYpmIRTo2kYKsXsc9AcDuBXDXGT0WCCkJSfx28ZQWt+5cWUwjt75aYIEgdoWZJMZnXltcaqroPFcJ2cfo+jz2BK79AEKoV5Nqlw45z0xi1s9RzzWvxciVCpwQNp+x75YlY50FAegOCZ5oHyHsvlLTz8kR5Kkhwr6W3PZFkWOhwdtcdaPl1ds8m/FCN21FiFndA5zbQ7Z63AucPZzu3iNh6oJMLUFXE0EO/+i5hYcUcZTMo7DM0iRcZWM1gu2PDgpMIh+XEMomIyVdC267HlZ6TqCvnclq33F1Bxo3mQI16RaAImdUpClIVE4IcdWrxTHeDNSd3bjBkldsK42iWQfRPe7FYmZTJfx3uDInh/hpKSqR2xoHrL6A+kxuIRgmQ1RfuOsN1iFiRZ6VFpLrnuXo76qxbQBpMevfzrqO6PjpHIjutTlbX6V+hK79O0cCJqfEk4IzZeHeRMhg2Xju2mBUqtvpwUhhEvgT5tTlXXNyeqp0/xoBJ+aXpm+NdtNzaJL16xH+4i8L32WKUtndTG0cJIlvIVYHOmQIBItEP+R3Fp910YhV1wSTADGm0f5aEK3CpYOYDtodaM1/mrEJGw1tnsUamctXxcbePB06KHajYHlXVZLRmo+TKD12PXZPVVQ9FoVJRre4m1LE53UnQ+OnhP2qqBxef6dkliH3FEG9pf8ytDYRdtgghgL+w+jyuItxQnVSRi5SkVVukNpoJM/XRLHT1rUIxnqaJSdDQcUbCfxBpnTyQA8ibaDFoyr/RLTS259HFTvE1MkX+UZ2bvHWhUc4ezIosIc3kbfXMEp/7Ff+H055ga/kjW2rgY9wKqBuYkN+sRRu5AZ1eKaf0AvJdYBDHaHYEgQNrgG4/bm5cSPE70Rz9DkP7pOMM1PRjgB7fQ9BM5wizOfzRhi16QyrLboZ7uhH3iIFPIkSLLg3ayzDVnIkzWe9Te7ITivxFAGowkp0Kv0q1KaH0O2Ppw93hwRRxfi+8bClUrDWKYycl3gGQBTJ3wKZ8wFC/xQJq1tN4X24Tan7SY4O5GFbkFScJ7fH8Dp92gI0kajyY+0Ec0kw2oyr1YsJouUpWGUubg0YFwqKjXfzRdeWhwJuHYTetQ+bNOofyRQFEB6DlSp4RZCvLumvgrQ52SNC28gpAZ0MSyzQ+PA5u8DAHuuneJhlvgyKgjgdws+0Sur5KWDOp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c41fabc-9305-4897-0918-08dcec158834 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9496.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2024 06:00:40.5857 (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: r875Lh6Zi/vchDxp8itrWhJp+w3WXoEybP1vBuwk08AMJm6DNr7oCDN1A/kMFiP0M8EYVvsKIOGtHQLpkX/pYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8224 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241013_230046_185099_63D287DF X-CRM114-Status: GOOD ( 14.41 ) 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 |
refactor the system PM logic for sdhci-esdhc-imx
|
expand
|
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 4173967022d0..d4bb23c9e866 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1969,9 +1969,19 @@ static int sdhci_esdhc_suspend(struct device *dev) dev_warn(dev, "Failed to enable irq wakeup\n"); } - ret = pinctrl_pm_select_sleep_state(dev); - if (ret) - return ret; + /* + * For the device which works as wakeup source, no need + * to change the pinctrl to sleep state. + * e.g. For SDIO device, the interrupt share with data pin, + * but the pinctrl sleep state may config the data pin to + * other function like GPIO function to save power in PM, + * which finally block the SDIO wakeup function. + */ + if (!device_may_wakeup(dev) || !host->irq_wake_enabled) { + ret = pinctrl_pm_select_sleep_state(dev); + if (ret) + return ret; + } ret = mmc_gpio_set_cd_wake(host->mmc, true);