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]
Message-ID: <05cf9959-ff47-45b4-97a5-dd73042373fe@lunn.ch>
Date:   Thu, 13 Apr 2023 15:49:00 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Christian Marangi <ansuelsmth@...il.com>
Cc:     Rob Herring <robh@...nel.org>, Pavel Machek <pavel@....cz>,
        Lee Jones <lee@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Gregory Clement <gregory.clement@...tlin.com>,
        Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        John Crispin <john@...ozen.org>, linux-leds@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org
Subject: Re: [net-next PATCH v6 12/16] dt-bindings: net: dsa: qca8k: add LEDs
 definition example

> > >  examples:
> > >    - |
> > >      #include <dt-bindings/gpio/gpio.h>
> > > +    #include <dt-bindings/leds/common.h>
> > >  
> > >      mdio {
> > >          #address-cells = <1>;
> > > @@ -226,6 +229,27 @@ examples:
> > >                      label = "lan1";
> > >                      phy-mode = "internal";
> > >                      phy-handle = <&internal_phy_port1>;
> > > +
> > > +                    leds {
> > > +                        #address-cells = <1>;
> > > +                        #size-cells = <0>;
> > > +
> > > +                        led@0 {
> > > +                            reg = <0>;
> > > +                            color = <LED_COLOR_ID_WHITE>;
> > > +                            function = LED_FUNCTION_LAN;
> > > +                            function-enumerator = <1>;
> > > +                            default-state = "keep";
> > > +                        };
> > > +
> > > +                        led@1 {
> > > +                            reg = <1>;
> > > +                            color = <LED_COLOR_ID_AMBER>;
> > > +                            function = LED_FUNCTION_LAN;
> > > +                            function-enumerator = <1>;
> > 
> > Isn't function-enumerator supposed to be unique within a given 
> > 'function'?
> >
> 
> In the following example the output would be:
> - amber:lan-1
> - white:lan-1
> 
> So in theory it's unique for the same color and function. Is it
> acceptable? Seems sane that there may be multiple color for the same
> function (and enum)

But what does the -1 actually mean?

At Pavel's request, i documented 'good' names for these LEDs. I
suggested that if there are multiple LEDs for one MAC/PHY, you use
something like 'left' or 'right' to indicate their position on the
RJ45 socket. That has a clear meaning.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ