^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) Binding for dual-GPIO LED found on Network Space v2 (and parents).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) - compatible: "lacie,ns2-leds".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Each LED is represented as a sub-node of the ns2-leds device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) Required sub-node properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) - cmd-gpio: Command LED GPIO. See OF device-tree GPIO specification.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - slow-gpio: Slow LED GPIO. See OF device-tree GPIO specification.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) - modes-map: A mapping between LED modes (off, on or SATA activity blinking) and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) the corresponding cmd-gpio/slow-gpio values. All the GPIO values combinations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) should be given in order to avoid having an unknown mode at driver probe time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) Optional sub-node properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) - label: Name for this LED. If omitted, the label is taken from the node name.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) - linux,default-trigger: Trigger assigned to the LED.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <dt-bindings/leds/leds-ns2.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) ns2-leds {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) compatible = "lacie,ns2-leds";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) blue-sata {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) label = "ns2:blue:sata";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) slow-gpio = <&gpio0 29 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) cmd-gpio = <&gpio0 30 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) modes-map = <NS_V2_LED_OFF 0 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) NS_V2_LED_ON 1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) NS_V2_LED_ON 0 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) NS_V2_LED_SATA 1 1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) };