Skip to contentSkip to conversation

net: dsa: qca8k: fall back to ethernet-ports node name for LEDs

PATCH Applied Rosen Penev 3 participants 3 messages Jun 30 – Jul 3

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: dsa: qca8k: fall back to ethernet-ports node name for LEDs

The device tree binding allows both "ports" and "ethernet-ports" as the container node name. Try "ethernet-ports" when "ports" is absent so that newer DTBs with the preferred name work.

This matches the handling already present in qca8k-8xxx.c

Assisted-by opencode:big-pickle

---
v2: resend

 drivers/net/dsa/qca/qca8k-leds.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/dsa/qca/qca8k-leds.c +3 -0
index ef496e345a4e..0ada28377f46 100644
@@ -457,6 +457,9 @@ qca8k_setup_led_ctrl(struct qca8k_priv *priv)
 	int ret;
 
 	ports = device_get_named_child_node(priv->dev, "ports");
+	if (!ports)
+		ports = device_get_named_child_node(priv->dev, "ethernet-ports");
+
 	if (!ports) {
 		dev_info(priv->dev, "No ports node specified in device tree!");
 		return 0;

--
2.54.0

maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Rosen Penev

The device tree binding allows both "ports" and "ethernet-ports" as the container node name. Try "ethernet-ports" when "ports" is absent so that newer DTBs with the preferred name work.

This matches the handling already present in qca8k-8xxx.c

Assisted-by opencode:big-pickle

Andrew

maintainer Applied
#2 lore raw
In reply to Rosen Penev
Quoted 8 lines · Rosen Penev

The device tree binding allows both "ports" and "ethernet-ports" as the container node name. Try "ethernet-ports" when "ports" is absent so that newer DTBs with the preferred name work.

This matches the handling already present in qca8k-8xxx.c

Assisted-by opencode:big-pickle

Apparently the PW bot is still enjoying some PTO...

Applied, thanks!

/P