[PATCH] reset: Correct dependencies for RESET_RZG2L_USBPHY_CTRL

Tom Rini trini at konsulko.com
Sat Mar 21 18:10:30 CET 2026


On Sat, Mar 21, 2026 at 03:23:35AM +0100, Marek Vasut wrote:
> On 3/20/26 2:56 PM, Tom Rini wrote:
> > On Fri, Mar 20, 2026 at 04:58:13AM +0100, Marek Vasut wrote:
> > > On 3/19/26 2:41 PM, Tom Rini wrote:
> > > 
> > > [...]
> > > 
> > > > > > So I think the answer is if you fire up menuconfig, and turn off
> > > > > > RESET_RZG2L_USBPHY_CTRL and REGULATOR_RZG2L_USBPHY and DM_REGULATOR and
> > > > > > then enable RESET_RZG2L_USBPHY_CTRL things will become mad because
> > > > > > RESET_RZG2L_USBPHY_CTRL has select'd REGULATOR_RZG2L_USBPHY but we don't
> > > > > > have DM_REGULATOR.
> > > > > How is it possible to enable RESET_RZG2L_USBPHY_CTRL without enabling its
> > > > > dependencies ? This is what I do not understand.
> > > > 
> > > > The way I said in the part you quoted? If you don't like the way I'm
> > > > solving the problem with the dependency graph here please propose an
> > > > alternate. But it is possible to encounter this problem, or randconfig
> > > > wouldn't expose it.
> > > What I do not understand is, how is it possible to enable Kconfig symbol
> > > without enabling its dependencies. Is that a bug in Kconfig ?
> > 
> > There is nothing ensuring that when you enable RESET_RZG2L_USBPHY_CTRL
> > today that DM_REGULATOR is enabled. But since you're telling it to
> > select REGULATOR_RZG2L_USBPHY it then will give an error.
> Hmmm, I see it now. If I have both CONFIG_REGULATOR_RZG2L_USBPHY=y and
> CONFIG_RESET_RZG2L_USBPHY_CTRL=y in .config, and I delete
> CONFIG_DM_REGULATOR=y from .config , then I can select CONFIG_DM_REGULATOR=n
> .

Right.

> But isn't the right fix the elimination of 'select' ? Linux Kconfig
> documentation now hints that 'select' should only be used for hidden

As a much longer term goal, yes, this is largely where we should go. But
we're still at the point where I'm catching these kind of dependency
issues in the Kconfig side of things, let alone build time problems.

> symbols. So how about this fix instead , that should retain the transitive
> dependency on REGULATOR_RZG2L_USBPHY , which depends on DM_REGULATOR :
> 
> "
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index 2fd91d6299c..a7acd5cfa69 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -239,8 +239,7 @@ config RESET_AT91
> 
>  config RESET_RZG2L_USBPHY_CTRL
>         bool "Enable support for Renesas RZ/G2L USB 2.0 PHY control"
> -       depends on DM_RESET
> -       select REGULATOR_RZG2L_USBPHY
> +       depends on DM_RESET && REGULATOR_RZG2L_USBPHY
>         help
>           Enable support for controlling USB 2.0 PHY resets on the Renesas
>           RZ/G2L SoC. This is required for USB 2.0 functionality to work on

This is fine too, yes, please do a patch for it and you'll need to make
sure that renesas_rzg2l_smarc_defconfig gets updated with
CONFIG_REGULATOR_RZG2L_USBPHY=y too so there's no functional change.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260321/d062d3e8/attachment.sig>


More information about the U-Boot mailing list