lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220503153613.15320-3-zajec5@gmail.com>
Date:   Tue,  3 May 2022 17:36:12 +0200
From:   Rafał Miłecki <zajec5@...il.com>
To:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc:     Pavel Machek <pavel@....cz>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Hauke Mehrtens <hauke@...ke-m.de>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        devicetree@...r.kernel.org, netdev@...r.kernel.org,
        linux-leds@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org,
        bcm-kernel-feedback-list@...adcom.com,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: [PATCH 3/4] dt-bindings: leds: add Ethernet triggered LEDs to example

From: Rafał Miłecki <rafal@...ecki.pl>

This adds 3 entries to existing example:
1. LED triggered by switch port in 10 / 100 Mbps link state
2. LED triggered by switch port in 1000 Mbps link
3. LED triggered by Ethernet interface (any speed)

Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
---
 .../devicetree/bindings/leds/common.yaml      | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index 328952d7acbb..6c72121a1656 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -168,6 +168,7 @@ examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
     #include <dt-bindings/leds/common.h>
+    #include <dt-bindings/net/eth.h>
 
     led-controller {
         compatible = "gpio-leds";
@@ -183,6 +184,26 @@ examples:
             gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
             trigger-sources = <&ohci_port1>, <&ehci_port1>;
         };
+
+        led-2 {
+            function = LED_FUNCTION_WAN;
+            color = <LED_COLOR_ID_AMBER>;
+            gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+            trigger-sources = <&wan_port (SPEED_10 | SPEED_100)>;
+        };
+
+        led-3 {
+            function = LED_FUNCTION_WAN;
+            color = <LED_COLOR_ID_GREEN>;
+            gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+            trigger-sources = <&wan_port SPEED_1000>;
+        };
+
+        led-4 {
+            function = LED_FUNCTION_LAN;
+            gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+            trigger-sources = <&gmac 0>;
+        };
     };
 
   - |
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ