From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 CCAE1C43334 for ; Mon, 13 Jun 2022 10:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DdgwzYUIWEAl8tHTBQlvQ0QgoingrwXK0ik/JkXyPpY=; b=s2aDcJ8biwiBwy TLIGZik5edmFEZHVrTSA0co82QEi3QOEAMnn64Fz8q4D5D/gTFtpjWb7l/J9fLvnpSkxWAPQbbI2i xRCb6QC0tJaeJFxbIHaPheYfdPucCdTVAF/fq+ftJaqGQpvazKpPE2B+oyKysr1YG2hfDLgO/x0be FUJe0SjvaTiJArxo1mNMwwmM4MYJsZq5TbYKnh+tcoR54Yn1+knlJhdAhOMqcVpiu14ITFtAt15nD alok8cRpJe/Fbypxh+r8r12nuxysbkKqp+3u5le9Lfb4nmXm2pSLEMX3ndhFxJF4CYMX19Czfpok0 9ReorSMYmB4672jd5Mow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0h8S-002r9g-4i; Mon, 13 Jun 2022 10:17:28 +0000 Received: from de-smtp-delivery-113.mimecast.com ([194.104.111.113]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0h8O-002r6l-OU for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2022 10:17:26 +0000 Received: from CHE01-GV0-obe.outbound.protection.outlook.com (mail-gv0che01lp2044.outbound.protection.outlook.com [104.47.22.44]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-2-yYJeCvqFNeC3c_16aEaG1A-2; Mon, 13 Jun 2022 12:17:15 +0200 X-MC-Unique: yYJeCvqFNeC3c_16aEaG1A-2 Received: from ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:2e::8) by ZRAP278MB0223.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:2c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Mon, 13 Jun 2022 10:17:13 +0000 Received: from ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM ([fe80::2879:acb:62c8:4987]) by ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM ([fe80::2879:acb:62c8:4987%8]) with mapi id 15.20.5332.020; Mon, 13 Jun 2022 10:17:13 +0000 Date: Mon, 13 Jun 2022 12:17:12 +0200 From: Francesco Dolcini To: Richard Zhu , l.stach@pengutronix.de, bhelgaas@google.com, robh@kernel.org Cc: broonie@kernel.org, lorenzo.pieralisi@arm.com, festevam@gmail.com, francesco.dolcini@toradex.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: Re: [PATCH v10 5/7] PCI: imx6: Turn off regulator when the system is in suspend mode Message-ID: <20220613101712.GA20538@francesco-nb.int.toradex.com> References: <1655110538-10914-1-git-send-email-hongxing.zhu@nxp.com> <1655110538-10914-6-git-send-email-hongxing.zhu@nxp.com> In-Reply-To: <1655110538-10914-6-git-send-email-hongxing.zhu@nxp.com> X-ClientProxiedBy: MR1P264CA0068.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:3f::33) To ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:2e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 763b0922-782e-40d8-c3cc-08da4d25e26b X-MS-TrafficTypeDiagnostic: ZRAP278MB0223: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: Vg2CAPYW3ymHcXhSA0A91/6QE55HZj25mVlZsG3CvluhnilgTuZ/NTRWS4woUQaFg/2nRkMuexosL4QhocxhXZslwhZacJCk6NfeIGCBy6vFi3RF95AsEw31azPWqtj2thDrMR6Ikyl6LWHPYeK2eue4jjYSj1Mj7LVrqhrfBNOHivNQ2W/W+7QTmXYksl205OlCyvweNsEOS92MaY/uoqd6Ui7qYoB7hCxMAoa9jcgnufq9dn2/sMbILHXmT52ej9FuBnQrxTLThG+ZiDKVslwP+xP0r4WQUQiUCJH7PPHfu5BFfAnQXY9ghP3Lr+A2vxT2xm5CGtzMiiC6mV/+jv1G63DSniX4o3SB9qHPr8sleEUDI0y2c6PGJKT3ddhIuNwHIjqDEn5n9ZyaJzMy1g+XAH+mrHhG058+wctqRxS4aK8Lp70YiCNNZAcVVQgXe9lTD6j5op0JoLnWAwLVOLVlObpht3V76n3/7WGEmkyWy/C3lFdAgzY6M+Z7XYYjarXV/cA6ZCixbStdY8O3mFCYM8qNcTt3iQRDx9PO5gjCZt3dIWOn21mxXbpMXwF9oDy3Bww0C1isSV+5914mSIXOyrScrF7KVrSRjkzShNBsNf7NpNHnf2VzuwI30LAqLVXIVs0iEFem4aZNhiPQfiCayngu7hI09upJY6SofIcWTWgxyrngZcQSYLo6gJs4sMjT/cX8uWMStb614rAeYg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(396003)(346002)(39840400004)(366004)(8936002)(6512007)(6486002)(66556008)(15650500001)(33656002)(2906002)(38100700002)(8676002)(86362001)(508600001)(186003)(52116002)(4744005)(41300700001)(5660300002)(26005)(7416002)(83380400001)(38350700002)(6506007)(1076003)(44832011)(316002)(66946007)(66476007)(4326008);DIR:OUT;SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?4VlI591WYg+1FfvVyaQx6qS3zALb7YqXh9sJu3B53R4r7W+FeG6xHqDrXs11?= =?us-ascii?Q?A2TiRTXIkrQD7NWGuSEv669VY9uLHA7PJLpJqI8w8v/nJJrCl0ubhze3A+1g?= =?us-ascii?Q?KzWlKwwt7Pomd3rWzuCix8gPkSjKgIXAJYzuPQMQSrK+SNq5DratNcOxS5c0?= =?us-ascii?Q?cYoTF9gphfaJO5CIYZ/M56px2xDVRLsXkSYbrVAI433e8/7FYvdgucYhFGNT?= =?us-ascii?Q?4ytj/Bs2UwAz8SIl71j6CY+lNajhvR7xrp/hIk5Lc+O+JIarbiUswdx/jDFr?= =?us-ascii?Q?cnh6EwIM0sW7LcHBjBK0sszKC1Ym6jaEEL1Otnss0gkTe9ng36iaMa6jeCnN?= =?us-ascii?Q?KTIlzW5Z+V2WoJcx0bVt7uwHJs3IjprAtoQoC+YFutG0w2A+PHBF8cs2aOzg?= =?us-ascii?Q?QB82G0xRXwzpTEwypI4rBIYhUBCnPu4dGJ4TtOmiZkI6jRMV703M+J10ufIc?= =?us-ascii?Q?ebLrT4ahLKpFDj61cG3ATJf19WISH7edPu5575B7xeELdn04PnBF8SJWx7bb?= =?us-ascii?Q?mkYy239OVEQXpB0xN781GhicGTwtXT2dwJ6Ua3Qhml+Gnd904GpYilB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go4X5MD+4v+VohvOE6eGvUQrharHZBrLz7ES?= =?us-ascii?Q?znNhvIORb57SdP6NnF3Z2mB6LrjDh/vVdyxJN40lirpl8Qe9ZTXrC3D9cN1q?= =?us-ascii?Q?xFbodh+YOUXZRRDy7hMt6xRk1/A0D3fm2T2Cc9CSQINjTw9504zmfLoLGCQD?= =?us-ascii?Q?E4JQ5ZCmCCB/b9QoEMr/fB421zMe9vQ8XE5l12NXXKKs1TwAF+7k+49wOr+T?= =?us-ascii?Q?gvYwczsU4Q3QcuqL47oTqaogDKGzwIDbKWCSuJd3jXnVHd30mryRKcrmJBgj?= =?us-ascii?Q?VEkZVoz7SnZy0qhfayY+p30wY5CANtw=3D?= X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: 763b0922-782e-40d8-c3cc-08da4d25e26b X-MS-Exchange-CrossTenant-AuthSource: ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2022 10:17:13.4813 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uMGpOyuf8LtQ06OWla6ptR9BvGW/SN26cYXDKl5jbbkuoAQ8/GimVWdEaBv7lgL4OKjYmM6TjgnLlN0sZpPF8MaybFSnVsl+yBf1SHdxJ9U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZRAP278MB0223 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CDE13A77 smtp.mailfrom=francesco.dolcini@toradex.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: toradex.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_031725_132681_32195A0D X-CRM114-Status: GOOD ( 10.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 13, 2022 at 04:55:36PM +0800, Richard Zhu wrote: > The driver should undo any enables it did itself. The regulator disable > shouldn't be basing decisions on regulator_is_enabled(). > > Move the regulator_disable to the suspend function, turn off regulator > when the system is in suspend mode. According to the documentation: vpcie-supply: description: Should specify the regulator in charge of PCIe port power. The regulator will be enabled when initializing the PCIe host and disabled either as part of the init process or when shutting down the host (optional required). Is this really what we want to do (remove power in suspend, enable it on resume)? On our boards this powers a PCIe device connected to the host port, that sound fair according to the binding documentation for it. Am I wrong? We do have issues with PCIe not working anymore after suspend/resume, wondering (I did not have time to properly dig into it) if this is the root cause. Francesco _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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 0B38FC433EF for ; Mon, 13 Jun 2022 10:22:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236416AbiFMKWY convert rfc822-to-8bit (ORCPT ); Mon, 13 Jun 2022 06:22:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242941AbiFMKUm (ORCPT ); Mon, 13 Jun 2022 06:20:42 -0400 Received: from de-smtp-delivery-113.mimecast.com (de-smtp-delivery-113.mimecast.com [194.104.111.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70A50108 for ; Mon, 13 Jun 2022 03:17:19 -0700 (PDT) Received: from CHE01-GV0-obe.outbound.protection.outlook.com (mail-gv0che01lp2044.outbound.protection.outlook.com [104.47.22.44]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-2-yYJeCvqFNeC3c_16aEaG1A-2; Mon, 13 Jun 2022 12:17:15 +0200 X-MC-Unique: yYJeCvqFNeC3c_16aEaG1A-2 Received: from ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:2e::8) by ZRAP278MB0223.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:2c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Mon, 13 Jun 2022 10:17:13 +0000 Received: from ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM ([fe80::2879:acb:62c8:4987]) by ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM ([fe80::2879:acb:62c8:4987%8]) with mapi id 15.20.5332.020; Mon, 13 Jun 2022 10:17:13 +0000 Date: Mon, 13 Jun 2022 12:17:12 +0200 From: Francesco Dolcini To: Richard Zhu , l.stach@pengutronix.de, bhelgaas@google.com, robh@kernel.org Cc: broonie@kernel.org, lorenzo.pieralisi@arm.com, festevam@gmail.com, francesco.dolcini@toradex.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: Re: [PATCH v10 5/7] PCI: imx6: Turn off regulator when the system is in suspend mode Message-ID: <20220613101712.GA20538@francesco-nb.int.toradex.com> References: <1655110538-10914-1-git-send-email-hongxing.zhu@nxp.com> <1655110538-10914-6-git-send-email-hongxing.zhu@nxp.com> In-Reply-To: <1655110538-10914-6-git-send-email-hongxing.zhu@nxp.com> X-ClientProxiedBy: MR1P264CA0068.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:3f::33) To ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:2e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 763b0922-782e-40d8-c3cc-08da4d25e26b X-MS-TrafficTypeDiagnostic: ZRAP278MB0223: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: Vg2CAPYW3ymHcXhSA0A91/6QE55HZj25mVlZsG3CvluhnilgTuZ/NTRWS4woUQaFg/2nRkMuexosL4QhocxhXZslwhZacJCk6NfeIGCBy6vFi3RF95AsEw31azPWqtj2thDrMR6Ikyl6LWHPYeK2eue4jjYSj1Mj7LVrqhrfBNOHivNQ2W/W+7QTmXYksl205OlCyvweNsEOS92MaY/uoqd6Ui7qYoB7hCxMAoa9jcgnufq9dn2/sMbILHXmT52ej9FuBnQrxTLThG+ZiDKVslwP+xP0r4WQUQiUCJH7PPHfu5BFfAnQXY9ghP3Lr+A2vxT2xm5CGtzMiiC6mV/+jv1G63DSniX4o3SB9qHPr8sleEUDI0y2c6PGJKT3ddhIuNwHIjqDEn5n9ZyaJzMy1g+XAH+mrHhG058+wctqRxS4aK8Lp70YiCNNZAcVVQgXe9lTD6j5op0JoLnWAwLVOLVlObpht3V76n3/7WGEmkyWy/C3lFdAgzY6M+Z7XYYjarXV/cA6ZCixbStdY8O3mFCYM8qNcTt3iQRDx9PO5gjCZt3dIWOn21mxXbpMXwF9oDy3Bww0C1isSV+5914mSIXOyrScrF7KVrSRjkzShNBsNf7NpNHnf2VzuwI30LAqLVXIVs0iEFem4aZNhiPQfiCayngu7hI09upJY6SofIcWTWgxyrngZcQSYLo6gJs4sMjT/cX8uWMStb614rAeYg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(396003)(346002)(39840400004)(366004)(8936002)(6512007)(6486002)(66556008)(15650500001)(33656002)(2906002)(38100700002)(8676002)(86362001)(508600001)(186003)(52116002)(4744005)(41300700001)(5660300002)(26005)(7416002)(83380400001)(38350700002)(6506007)(1076003)(44832011)(316002)(66946007)(66476007)(4326008);DIR:OUT;SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?4VlI591WYg+1FfvVyaQx6qS3zALb7YqXh9sJu3B53R4r7W+FeG6xHqDrXs11?= =?us-ascii?Q?A2TiRTXIkrQD7NWGuSEv669VY9uLHA7PJLpJqI8w8v/nJJrCl0ubhze3A+1g?= =?us-ascii?Q?KzWlKwwt7Pomd3rWzuCix8gPkSjKgIXAJYzuPQMQSrK+SNq5DratNcOxS5c0?= =?us-ascii?Q?cYoTF9gphfaJO5CIYZ/M56px2xDVRLsXkSYbrVAI433e8/7FYvdgucYhFGNT?= =?us-ascii?Q?4ytj/Bs2UwAz8SIl71j6CY+lNajhvR7xrp/hIk5Lc+O+JIarbiUswdx/jDFr?= =?us-ascii?Q?cnh6EwIM0sW7LcHBjBK0sszKC1Ym6jaEEL1Otnss0gkTe9ng36iaMa6jeCnN?= =?us-ascii?Q?KTIlzW5Z+V2WoJcx0bVt7uwHJs3IjprAtoQoC+YFutG0w2A+PHBF8cs2aOzg?= =?us-ascii?Q?QB82G0xRXwzpTEwypI4rBIYhUBCnPu4dGJ4TtOmiZkI6jRMV703M+J10ufIc?= =?us-ascii?Q?ebLrT4ahLKpFDj61cG3ATJf19WISH7edPu5575B7xeELdn04PnBF8SJWx7bb?= =?us-ascii?Q?mkYy239OVEQXpB0xN781GhicGTwtXT2dwJ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X/KSPY/1IaWKiyBkkT5bFgo4X5MD+4v+VohvOE6eGvUQrharHZBrLz7ES?= =?us-ascii?Q?znNhvIORb57SdP6NnF3Z2mB6LrjDh/vVdyxJN40lirpl8Qe9ZTXrC3D9cN1q?= =?us-ascii?Q?xFbodh+YOUXZRRDy7hMt6xRk1/A0D3fm2T2Cc9CSQINjTw9504zmfLoLGCQD?= =?us-ascii?Q?E4JQ5ZCmCCB/b9QoEMr/fB421zMe9vQ8XE5l12NXXKKs1TwAF+7k+49wOr+T?= =?us-ascii?Q?gvYwczsU4Q3QcuqL47oTqaogDKGzwIDbKWCSuJd3jXnVHd30mryRKcrmJBgj?= =?us-ascii?Q?VEkZVoz7SnZy0qhfayY+p30wY5CANtw=3D?= X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: 763b0922-782e-40d8-c3cc-08da4d25e26b X-MS-Exchange-CrossTenant-AuthSource: ZRAP278MB0495.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2022 10:17:13.4813 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: uMGpOyuf8LtQ06OWla6ptR9BvGW/SN26cYXDKl5jbbkuoAQ8/GimVWdEaBv7lgL4OKjYmM6TjgnLlN0sZpPF8MaybFSnVsl+yBf1SHdxJ9U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZRAP278MB0223 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CDE13A77 smtp.mailfrom=francesco.dolcini@toradex.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: toradex.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 13, 2022 at 04:55:36PM +0800, Richard Zhu wrote: > The driver should undo any enables it did itself. The regulator disable > shouldn't be basing decisions on regulator_is_enabled(). > > Move the regulator_disable to the suspend function, turn off regulator > when the system is in suspend mode. According to the documentation: vpcie-supply: description: Should specify the regulator in charge of PCIe port power. The regulator will be enabled when initializing the PCIe host and disabled either as part of the init process or when shutting down the host (optional required). Is this really what we want to do (remove power in suspend, enable it on resume)? On our boards this powers a PCIe device connected to the host port, that sound fair according to the binding documentation for it. Am I wrong? We do have issues with PCIe not working anymore after suspend/resume, wondering (I did not have time to properly dig into it) if this is the root cause. Francesco