RE: [EXT] [PATCH] [v2] mmc: esdhc-imx: convert to modern PM_OPS

From: Luke Wang
Date: Tue Apr 15 2025 - 22:42:56 EST




> -----Original Message-----
> From: Arnd Bergmann <arnd@xxxxxxxx>
> Sent: Tuesday, April 15, 2025 8:57 PM
> To: Luke Wang <ziniu.wang_1@xxxxxxx>; Arnd Bergmann
> <arnd@xxxxxxxxxx>; Bough Chen <haibo.chen@xxxxxxx>; Adrian Hunter
> <adrian.hunter@xxxxxxxxx>; Ulf Hansson <ulf.hansson@xxxxxxxxxx>; Shawn
> Guo <shawnguo@xxxxxxxxxx>; Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> Cc: Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>; Fabio Estevam
> <festevam@xxxxxxxxx>; Josua Mayer <josua@xxxxxxxxxxxxx>;
> imx@xxxxxxxxxxxxxxx; linux-mmc @ vger . kernel . org <linux-
> mmc@xxxxxxxxxxxxxxx>; dl-S32 <S32@xxxxxxx>; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [EXT] [PATCH] [v2] mmc: esdhc-imx: convert to modern PM_OPS
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report
> this email' button
>
>
> On Tue, Apr 15, 2025, at 05:15, Luke Wang wrote:
> > Hi Arnd,
> >
> > This patch has compilation issue because sdhci.c still uses #ifdef
> > CONFIG_PM. Do you plan to send a new patch to fix? If not, I can send a
> > patch to fix the compilation warning.
>
> Can you see if the change below is sufficient? I see I have that
> in my randconfig tree and I did not see any problems with my
> v2 patch and that. I probably added that one originally because
> of some other build failure but then never sent it.
>

Yes, it works fine. No build warning/error with CONFIG_PM not set.

> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
>
> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index cd0e35a80542..4ee2695b0202 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -874,12 +874,10 @@ irqreturn_t sdhci_thread_irq(int irq, void *dev_id);
> void sdhci_adma_write_desc(struct sdhci_host *host, void **desc,
> dma_addr_t addr, int len, unsigned int cmd);
>
> -#ifdef CONFIG_PM
> int sdhci_suspend_host(struct sdhci_host *host);
> int sdhci_resume_host(struct sdhci_host *host);
> int sdhci_runtime_suspend_host(struct sdhci_host *host);
> int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset);
> -#endif
>
> void sdhci_cqe_enable(struct mmc_host *mmc);
> void sdhci_cqe_disable(struct mmc_host *mmc, bool recovery);