diff options
| author | David Yang <mmyangfl@gmail.com> | 2026-09-04 21:47:46 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-09 17:56:43 -0700 |
| commit | 10973152f2f8f9d266e91c78abf1dca3514da775 (patch) | |
| tree | f412d30a01e3c88aad00138e75c1064e8e0051d8 | |
| parent | 420a9fe13be072723c9689e410bac3a9dcb80507 (diff) | |
| download | linux-next-10973152f2f8f9d266e91c78abf1dca3514da775.tar.gz linux-next-10973152f2f8f9d266e91c78abf1dca3514da775.zip | |
net: dsa: motorcomm: Handle degenerated blink delays
The LED core defines delay_on == 0 as steady off and delay_off == 0 as
steady on, which was treated as a blink in our LED driver. Fix it.
Fixes: 9af9a8168213 ("net: dsa: motorcomm: Add LED support")
Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://patch.msgid.link/20260904134752.635133-1-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/dsa/motorcomm/leds.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/motorcomm/leds.c b/drivers/net/dsa/motorcomm/leds.c index 7d3c0f68d8ff..87a6b9cf6068 100644 --- a/drivers/net/dsa/motorcomm/leds.c +++ b/drivers/net/dsa/motorcomm/leds.c @@ -107,6 +107,8 @@ yt921x_led_blink_set(struct yt921x_priv *priv, int port, int group, YT921X_LED_DUTY(1, 2); use_cycle = false; + } else if (!*onp || !*offp) { + return yt921x_led_force_set(priv, port, group, *onp); } else { res = yt921x_led_blink_select(priv, *onp, *offp, &cycle, &duty); if (res) |
