forked from Openwrt/openwrt
0a4b309f41
Backport initial LEDs hw control support. Currently this is limited to only rx/tx and link events for the netdev trigger but the API got accepted and the additional modes are working on and will be backported later. Refresh every patch and add the additional config flag for QCA8K new LEDs support. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
29 lines
918 B
Diff
29 lines
918 B
Diff
From c84c80c7388f887b10dafd70fc55bc6c5fe9fa5a Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Mon, 29 May 2023 18:32:37 +0200
|
|
Subject: [PATCH 07/13] leds: trigger: netdev: reject interval store for
|
|
hw_control
|
|
|
|
Reject interval store with hw_control enabled. It's are currently not
|
|
supported and MUST be set to the default value with hw control enabled.
|
|
|
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/leds/trigger/ledtrig-netdev.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
--- a/drivers/leds/trigger/ledtrig-netdev.c
|
|
+++ b/drivers/leds/trigger/ledtrig-netdev.c
|
|
@@ -265,6 +265,9 @@ static ssize_t interval_store(struct dev
|
|
unsigned long value;
|
|
int ret;
|
|
|
|
+ if (trigger_data->hw_control)
|
|
+ return -EINVAL;
|
|
+
|
|
ret = kstrtoul(buf, 0, &value);
|
|
if (ret)
|
|
return ret;
|