generic: copy backport, hack, pending patch and config from 6.1 to 6.6
[openwrt/staging/981213.git] / target / linux / generic / backport-6.6 / 837-v6.4-net-phy-hide-the-PHYLIB_LEDS-knob.patch
1 From 9b78d919632b7149d311aaad5a977e4b48b10321 Mon Sep 17 00:00:00 2001
2 From: Paolo Abeni <pabeni@redhat.com>
3 Date: Wed, 26 Apr 2023 10:15:31 +0200
4 Subject: [PATCH] net: phy: hide the PHYLIB_LEDS knob
5
6 commit 4bb7aac70b5d ("net: phy: fix circular LEDS_CLASS dependencies")
7 solved a build failure, but introduces a new config knob with a default
8 'y' value: PHYLIB_LEDS.
9
10 The latter is against the current new config policy. The exception
11 was raised to allow the user to catch bad configurations without led
12 support.
13
14 Anyway the current definition of PHYLIB_LEDS does not fit the above
15 goal: if LEDS_CLASS is disabled, the new config will be available
16 only with PHYLIB disabled, too.
17
18 Hide the mentioned config, to preserve the randconfig testing done so
19 far, while respecting the mentioned policy.
20
21 Suggested-by: Andrew Lunn <andrew@lunn.ch>
22 Suggested-by: Arnd Bergmann <arnd@arndb.de>
23 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
24 Link: https://lore.kernel.org/r/d82489be8ed911c383c3447e9abf469995ccf39a.1682496488.git.pabeni@redhat.com
25 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
26 ---
27 drivers/net/phy/Kconfig | 4 +---
28 1 file changed, 1 insertion(+), 3 deletions(-)
29
30 --- a/drivers/net/phy/Kconfig
31 +++ b/drivers/net/phy/Kconfig
32 @@ -45,10 +45,8 @@ config LED_TRIGGER_PHY
33 for any speed known to the PHY.
34
35 config PHYLIB_LEDS
36 - bool "Support probing LEDs from device tree"
37 + def_bool OF
38 depends on LEDS_CLASS=y || LEDS_CLASS=PHYLIB
39 - depends on OF
40 - default y
41 help
42 When LED class support is enabled, phylib can automatically
43 probe LED setting from device tree.