Skip to content

Commit

Permalink
dt-bindings: net: phy: Make LED active-low property common
Browse files Browse the repository at this point in the history
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>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240125203702.4552-2-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Christian Marangi authored and Jakub Kicinski committed Jan 27, 2024
1 parent 5642c82 commit c94d178
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/leds/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ patternProperties:
maxItems: 1
description: LED pin number

active-low:
type: boolean
description: Makes LED active low

required:
- reg

Expand Down
4 changes: 0 additions & 4 deletions Documentation/devicetree/bindings/leds/leds-bcm6328.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions Documentation/devicetree/bindings/leds/leds-bcm6358.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 0 additions & 5 deletions Documentation/devicetree/bindings/leds/leds-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c94d178

Please sign in to comment.