Re: [PATCH net-next 1/4] dt-bindings: leds: add 'active-high' property

From: Krzysztof Kozlowski
Date: Sun Oct 06 2024 - 08:44:58 EST


On Sat, Oct 05, 2024 at 05:24:20PM +0100, Daniel Golle wrote:
> Other than described in commit c94d1783136 ("dt-bindings: net: phy: Make

Please run scripts/checkpatch.pl and fix reported warnings. Then please
run 'scripts/checkpatch.pl --strict' and (probably) fix more warnings.
Some warnings can be ignored, especially from --strict run, but the code
here looks like it needs a fix. Feel free to get in touch if the warning
is not clear.

> LED active-low property common") the absence of the 'active-low'
> property means not to touch the polarity settings which are inherited
> from reset defaults, the bootloader or bootstrap configuration.
> Hence, in order to override a LED pin being active-high in case of the
> default, bootloader or bootstrap setting being active-low an additional
> property 'active-high' is required.
> Document that property and make it mutually exclusive to the existing
> 'active-low' property.
>
> Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
> ---
> Documentation/devicetree/bindings/leds/common.yaml | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
> index bf9a101e4d42..7c3cd7b7412e 100644
> --- a/Documentation/devicetree/bindings/leds/common.yaml
> +++ b/Documentation/devicetree/bindings/leds/common.yaml
> @@ -202,6 +202,12 @@ properties:
> #trigger-source-cells property in the source node.
> $ref: /schemas/types.yaml#/definitions/phandle-array
>
> + active-high:
> + type: boolean
> + description:
> + Makes LED active high. To turn the LED ON, line needs to be
> + set to high voltage instead of low.

And then we are going to get 2 more bools for other variants...

I think this should be just string enum, see marvell,marvell10g.yaml

Best regards,
Krzysztof