Skip to content

Commit 48fafff

Browse files
vladimirolteanvinodkoul
authored andcommitted
phy: make PHY_COMMON_PROPS Kconfig symbol conditionally user-selectable
Geert reports that enabling CONFIG_KUNIT_ALL_TESTS shouldn't enable features that aren't enabled without it. That isn't what "*all* tests" means, but as the prompt puts it, "All KUnit tests with satisfied dependencies". The impact is that enabling CONFIG_KUNIT_ALL_TESTS brings features which cannot be disabled as built-in into the kernel. Keep the pattern where consumer drivers have to "select PHY_COMMON_PROPS", but if KUNIT_ALL_TESTS is enabled, also make PHY_COMMON_PROPS user selectable, so it can be turned off. Modify PHY_COMMON_PROPS_TEST to depend on PHY_COMMON_PROPS rather than select it. Fixes: e7556b5 ("phy: add phy_get_rx_polarity() and phy_get_tx_polarity()") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Closes: https://lore.kernel.org/linux-phy/CAMuHMdUBaoYKNj52gn8DQeZFZ42Cvm6xT6fvo0-_twNv1k3Jhg@mail.gmail.com/ Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20260226153315.3530378-1-vladimir.oltean@nxp.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 6de23f8 commit 48fafff

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/phy/Kconfig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
menu "PHY Subsystem"
77

88
config PHY_COMMON_PROPS
9-
bool
9+
bool "PHY common properties" if KUNIT_ALL_TESTS
1010
help
1111
This parses properties common between generic PHYs and Ethernet PHYs.
1212

@@ -16,8 +16,7 @@ config PHY_COMMON_PROPS
1616

1717
config PHY_COMMON_PROPS_TEST
1818
tristate "KUnit tests for PHY common props" if !KUNIT_ALL_TESTS
19-
select PHY_COMMON_PROPS
20-
depends on KUNIT
19+
depends on KUNIT && PHY_COMMON_PROPS
2120
default KUNIT_ALL_TESTS
2221
help
2322
This builds KUnit tests for the PHY common property API.

0 commit comments

Comments
 (0)