netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH v3 1/4] dt-bindings: net: phy: Document new LEDs active-low property
@ 2023-12-13 11:13 Christian Marangi
  2023-12-13 11:13 ` [net-next PATCH v3 2/4] net: phy: add support for PHY LEDs active-low Christian Marangi
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Christian Marangi @ 2023-12-13 11:13 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Christian Marangi, netdev, devicetree, linux-kernel

Document new LEDs active-low property to define if the LED require to be
set low to be turned on.

active-low can be defined in the leds node for PHY that apply the LED
polarity globally for each attached LED or in the specific led node for
PHY that supports setting the LED polarity per LED.

Declaring both way is not supported and will result in the schema
getting rejected.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
Changes v3:
- Out of RFC
Changes v2:
- Add this patch

 .../devicetree/bindings/net/ethernet-phy.yaml | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
index 8fb2a6ee7e5b..9cb3981fed2a 100644
--- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
@@ -213,6 +213,11 @@ properties:
       '#size-cells':
         const: 0
 
+      'active-low':
+        type: boolean
+        description:
+          This define whether all LEDs needs to be low to be turned on.
+
     patternProperties:
       '^led@[a-f0-9]+$':
         $ref: /schemas/leds/common.yaml#
@@ -225,11 +230,26 @@ properties:
               driver dependent and required for ports that define multiple
               LED for the same port.
 
+          'active-low':
+            type: boolean
+            description:
+              This define whether the LED needs to be low to be turned on.
+
         required:
           - reg
 
         unevaluatedProperties: false
 
+    allOf:
+      - if:
+          required:
+            - active-low
+        then:
+          patternProperties:
+            '^led@[a-f0-9]+$':
+              properties:
+                'active-low': false
+
     additionalProperties: false
 
 required:
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-15 17:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 11:13 [net-next PATCH v3 1/4] dt-bindings: net: phy: Document new LEDs active-low property Christian Marangi
2023-12-13 11:13 ` [net-next PATCH v3 2/4] net: phy: add support for PHY LEDs active-low Christian Marangi
2023-12-13 11:13 ` [net-next PATCH v3 3/4] dt-bindings: net: Document QCA808x PHYs Christian Marangi
2023-12-15 14:49   ` Rob Herring
2023-12-13 11:13 ` [net-next PATCH v3 4/4] net: phy: at803x: add LED support for qca808x Christian Marangi
2023-12-15 13:48 ` [net-next PATCH v3 1/4] dt-bindings: net: phy: Document new LEDs active-low property Rob Herring
2023-12-15 15:48 ` Krzysztof Kozlowski
2023-12-15 14:24   ` Christian Marangi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).