[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdVY7Ekc1c_CO1g715ht7hPU5Zc9ZoWtaxkeWOahycVNFA@mail.gmail.com>
Date: Mon, 31 Mar 2025 11:37:16 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Ulf Hansson <ulf.hansson@...aro.org>, Biju Das <biju.das.jz@...renesas.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>, Arnd Bergmann <arnd@...db.de>,
Adrian Hunter <adrian.hunter@...el.com>, Geert Uytterhoeven <geert+renesas@...der.be>,
linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] mmc: renesas_sdhi: add regulator dependency
Hi Arnd,
On Sat, 29 Mar 2025 at 17:41, Arnd Bergmann <arnd@...nel.org> wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> The driver started using the regulator subsystem and fails to build without
> a dependeny on CONFIG_REGULATOR:
>
> ERROR: modpost: "rdev_get_drvdata" [drivers/mmc/host/renesas_sdhi_core.ko] undefined!
> ERROR: modpost: "devm_regulator_register" [drivers/mmc/host/renesas_sdhi_core.ko] undefined!
>
> The 'select RESET_CONTROLLER' needs to either go away or get changed to a dependency
> in order to avoid Kconfig dependency loops here. It also turns out the the superh
> version needs neither RESET_CONTROLLER nor REGULATOR, and this works because
> CONFIG_OF is not set there.
Both the reset controller and regulator are needed only on a subset
of the supported SoCs. However, unlike the reset subsystem, the
regulator subsystem does not provide dummies when disabled.
Fortunately most regulator code in the SDHI driver is optimized away
by the compiler when CONFIG_OF is not enabled, and the remaining call
to mmc_regulator_set_vqmmc() is harmless, as the MMC core does provide
a dummy in case regulator support is disabled.
So e.g. an sh7724_generic_defconfig + CONFIG_MMC + CONFIG_MMC_SDHI +
CONFIG_OF build indeed failed because of missing regulator symbols.
Note that it is a bit strange sh7724_generic_defconfig and
ecovec24_defconfig do not enable regulator support, as
arch/sh/boards/mach-ecovec24/setup.c does contain regulators.
> Change both to a 'depends on', but add '|| OF' for the superh case.
>
> Fixes: fae80a99dc03 ("mmc: renesas_sdhi: Add support for RZ/G3E SoC")
> Tested-by: Biju Das <biju.das.jz@...renesas.com>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
With the typo pointed out by Wolfram fixed:
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists