lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 15 Dec 2023 07:48:45 -0600
From: Rob Herring <robh@...nel.org>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>, Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [net-next PATCH v3 1/4] dt-bindings: net: phy: Document new LEDs
 active-low property

On Wed, Dec 13, 2023 at 12:13:19PM +0100, Christian Marangi wrote:
> 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@...il.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':

Don't need quotes.

I think this should just be per LED. If the h/w only supports a global 
setting, then they all should match.

> +        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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ