[PATCH] reset: Correct dependencies for RESET_RZG2L_USBPHY_CTRL

Marek Vasut marek.vasut at mailbox.org
Sat Mar 21 03:23:35 CET 2026


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 .

But isn't the right fix the elimination of 'select' ? Linux Kconfig 
documentation now hints that 'select' should only be used for hidden 
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
"


More information about the U-Boot mailing list