diff mbox series

[net-next,v9,1/5] dt-bindings: net: phy: Make LED active-low property common

Message ID 20240105142719.11042-2-ansuelsmth@gmail.com
State Superseded
Headers show
Series net: phy: generic polarity + LED support for qca808x | expand

Commit Message

Christian Marangi Jan. 5, 2024, 2:27 p.m. UTC
Move LED active-low property to common.yaml. This property is currently
defined multiple times by bcm LEDs. This property will now be supported
in a generic way for PHY LEDs with the use of a generic function.

With active-low bool property not defined, active-high is always
assumed.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
Changes v5:
- Make active-low generic
Changes v4:
- Drop support for global active-low
- Rework to polarity option (for marvell10g series support)
Changes v3:
- Out of RFC
Changes v2:
- Add this patch

 Documentation/devicetree/bindings/leds/common.yaml          | 6 ++++++
 Documentation/devicetree/bindings/leds/leds-bcm63138.yaml   | 4 ----
 Documentation/devicetree/bindings/leds/leds-bcm6328.yaml    | 4 ----
 Documentation/devicetree/bindings/leds/leds-bcm6358.txt     | 2 --
 .../devicetree/bindings/leds/leds-pwm-multicolor.yaml       | 4 ----
 Documentation/devicetree/bindings/leds/leds-pwm.yaml        | 5 -----
 6 files changed, 6 insertions(+), 19 deletions(-)

Comments

Andrew Lunn Jan. 9, 2024, 12:38 a.m. UTC | #1
On Fri, Jan 05, 2024 at 03:27:13PM +0100, Christian Marangi wrote:
> Move LED active-low property to common.yaml. This property is currently
> defined multiple times by bcm LEDs. This property will now be supported
> in a generic way for PHY LEDs with the use of a generic function.
> 
> With active-low bool property not defined, active-high is always
> assumed.
> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Lee Jones Jan. 11, 2024, 11:03 a.m. UTC | #2
On Fri, 05 Jan 2024, Christian Marangi wrote:

> Move LED active-low property to common.yaml. This property is currently
> defined multiple times by bcm LEDs. This property will now be supported
> in a generic way for PHY LEDs with the use of a generic function.
> 
> With active-low bool property not defined, active-high is always
> assumed.
> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> Changes v5:
> - Make active-low generic
> Changes v4:
> - Drop support for global active-low
> - Rework to polarity option (for marvell10g series support)
> Changes v3:
> - Out of RFC
> Changes v2:
> - Add this patch
> 
>  Documentation/devicetree/bindings/leds/common.yaml          | 6 ++++++
>  Documentation/devicetree/bindings/leds/leds-bcm63138.yaml   | 4 ----
>  Documentation/devicetree/bindings/leds/leds-bcm6328.yaml    | 4 ----
>  Documentation/devicetree/bindings/leds/leds-bcm6358.txt     | 2 --
>  .../devicetree/bindings/leds/leds-pwm-multicolor.yaml       | 4 ----
>  Documentation/devicetree/bindings/leds/leds-pwm.yaml        | 5 -----
>  6 files changed, 6 insertions(+), 19 deletions(-)

If the DT Maintainers are happy, so am I.

Acked-by: Lee Jones <lee@kernel.org>
Rob Herring Jan. 13, 2024, 1:29 a.m. UTC | #3
On Fri, 05 Jan 2024 15:27:13 +0100, Christian Marangi wrote:
> Move LED active-low property to common.yaml. This property is currently
> defined multiple times by bcm LEDs. This property will now be supported
> in a generic way for PHY LEDs with the use of a generic function.
> 
> With active-low bool property not defined, active-high is always
> assumed.
> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> Changes v5:
> - Make active-low generic
> Changes v4:
> - Drop support for global active-low
> - Rework to polarity option (for marvell10g series support)
> Changes v3:
> - Out of RFC
> Changes v2:
> - Add this patch
> 
>  Documentation/devicetree/bindings/leds/common.yaml          | 6 ++++++
>  Documentation/devicetree/bindings/leds/leds-bcm63138.yaml   | 4 ----
>  Documentation/devicetree/bindings/leds/leds-bcm6328.yaml    | 4 ----
>  Documentation/devicetree/bindings/leds/leds-bcm6358.txt     | 2 --
>  .../devicetree/bindings/leds/leds-pwm-multicolor.yaml       | 4 ----
>  Documentation/devicetree/bindings/leds/leds-pwm.yaml        | 5 -----
>  6 files changed, 6 insertions(+), 19 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index c8d0ba5f2327..f5b40df6b421 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -200,6 +200,12 @@  properties:
       #trigger-source-cells property in the source node.
     $ref: /schemas/types.yaml#/definitions/phandle-array
 
+  active-low:
+    type: boolean
+    description:
+      Makes LED active low. To turn the LED ON, line needs to be
+      set to low voltage instead of high.
+
   # Required properties for flash LED child nodes:
   flash-max-microamp:
     description:
diff --git a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
index 52252fb6bb32..bb20394fca5c 100644
--- a/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
@@ -52,10 +52,6 @@  patternProperties:
         maxItems: 1
         description: LED pin number
 
-      active-low:
-        type: boolean
-        description: Makes LED active low
-
     required:
       - reg
 
diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml b/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml
index 51cc0d82c12e..f3a3ef992929 100644
--- a/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-bcm6328.yaml
@@ -78,10 +78,6 @@  patternProperties:
           - maximum: 23
         description: LED pin number (only LEDs 0 to 23 are valid).
 
-      active-low:
-        type: boolean
-        description: Makes LED active low.
-
       brcm,hardware-controlled:
         type: boolean
         description: Makes this LED hardware controlled.
diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt
index 6e51c6b91ee5..211ffc3c4a20 100644
--- a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt
+++ b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt
@@ -25,8 +25,6 @@  LED sub-node required properties:
 
 LED sub-node optional properties:
   - label : see Documentation/devicetree/bindings/leds/common.txt
-  - active-low : Boolean, makes LED active low.
-    Default : false
   - default-state : see
     Documentation/devicetree/bindings/leds/common.txt
   - linux,default-trigger : see
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
index bd6ec04a8727..5edfbe347341 100644
--- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
@@ -41,10 +41,6 @@  properties:
 
           pwm-names: true
 
-          active-low:
-            description: For PWMs where the LED is wired to supply rather than ground.
-            type: boolean
-
           color: true
 
         required:
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.yaml b/Documentation/devicetree/bindings/leds/leds-pwm.yaml
index 7de6da58be3c..113b7c218303 100644
--- a/Documentation/devicetree/bindings/leds/leds-pwm.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-pwm.yaml
@@ -34,11 +34,6 @@  patternProperties:
           Maximum brightness possible for the LED
         $ref: /schemas/types.yaml#/definitions/uint32
 
-      active-low:
-        description:
-          For PWMs where the LED is wired to supply rather than ground.
-        type: boolean
-
     required:
       - pwms
       - max-brightness