Message ID | 20230307170046.28917-11-ansuelsmth@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3902wrd; Tue, 7 Mar 2023 14:48:03 -0800 (PST) X-Google-Smtp-Source: AK7set+HmLNKsaydVVx6nNKPv0EY6+y+Rsmkr9fKL5/pRlGzOREK6TXtdhw51WjWcCYMjnaQwgAv X-Received: by 2002:a17:903:32c8:b0:19e:2298:c53d with SMTP id i8-20020a17090332c800b0019e2298c53dmr19050979plr.10.1678229283605; Tue, 07 Mar 2023 14:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678229283; cv=none; d=google.com; s=arc-20160816; b=DqcK/tXDCJv3guH5+rvojOKqJVng4bR/63z3UZ19u8/rhvAe1L0jP/87ohfI6iJLjg HgvslJWODnleD2Y/+fwcTTlFt4Za9/GYZmYIXl05pqm9yhGVy+p+QiEmXzRcZojmUHuK o4+Q92+C5V30mAt0AQVQW7Zcn1NfP/J5Upkl7uHUdUEGbGXZZzusOHII7PozQZiMQ2cQ pWJgjCBMySYXjEw9kW1iPgnldwcddzxiDn0NiHm+lF+WyGUn2+Y6Fsq7fAUC3VXpvrcx KtUJjGn0X+H/ZZ6c3eYlCTrauJwNGsfhLYPUHoD6PLKq/31pFelxFsVeZC4SmGuEx8aF RI0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=mgeBlw3VjdW/ldP+cajTBrUisBQA46tb0yJFn1SOwVk=; b=fDkU710BkyjAc3ZAwPxPieZDGS/viCvfhtTIxtvp+nf+b16RuzsBEHM09+m4RPFAje ez/H06sOQDpLdcmb4LS1H1xUhWkerkWTaVtp9qTxoCN7VvjSUb2L34lFFzU8yioy18C3 b5Rh1KnSjK1biN60LOVhpIuUkdvwSR2NxY42a4bJeXI58M8VLr5mkhqhGGwe+4Mr7ERK EUMTgzpDwYK0HlcRTTvWT3NxYmzBLaPRNFcVFP0yFROuJX2S+l9VSZslGNhJvEco2Mlh +og5RG2C+v46BrqinVKBP0zwJxE58AZGHlbSmdb4kS+rH1NQus6b9zTv0Mx6YF5DYINO LPMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fitLZbSP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lh13-20020a170903290d00b0019ceb61f48csi3921511plb.60.2023.03.07.14.47.50; Tue, 07 Mar 2023 14:48:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fitLZbSP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbjCGWeX (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Tue, 7 Mar 2023 17:34:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbjCGWdx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 7 Mar 2023 17:33:53 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2F399E648; Tue, 7 Mar 2023 14:33:38 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso98581wmq.1; Tue, 07 Mar 2023 14:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678228417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mgeBlw3VjdW/ldP+cajTBrUisBQA46tb0yJFn1SOwVk=; b=fitLZbSPSJM75E9+zI7CdJ7TUfah6PtmiyFM5bzoV6sl7dCbP274l7oarusXWlTqUY YEp9EXKKOzyQgmX7aZ0L4NpsrwPklYjGsiGedsZbvFz550iw9lBr3AfB7dY+xh39hKbu ke37ECxuqyxp5o6QeFFVbY7zdd7cSxVm55IhSiwRj0wihkDpLU2BrKReBA9YjZ6CwbyS SR9W5JElaNYn5JJ8X2U0yshj8b/nKSSnBmDdrcXlnb4JlsPnDTE235oqbxgVaCo6q/lz GYjB/I+uM/A8O+z1zdYKgrHiFPuu9MXCkANG3sqwrJ3ASstOL3rmaUOeMsFkeSNwXrw1 RjAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678228417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mgeBlw3VjdW/ldP+cajTBrUisBQA46tb0yJFn1SOwVk=; b=3FhCzfZacI9rj700vNsZ9aS328a/55XZrRJUhTE0CRupTt6ymqapLvRUM8JBeLhNFU LySDzDqJOVj7UW3wFJAYU46oeBkrRBXn91+xQkXdvx7Xkunk11TU6CIOfJZjNaNnTBEw f7lq0ww3fgpbvLrA7hBou9NxfIqmenj+9+YMn2w2s4rn3nSHhHmS6dFWuv6WiuuyAER8 e3ElT3pu49NyjIMUf31QQ7dNel3Yjcjjjs0FVaz+gflBdnPgW+7hFBszXV0JwgAdZf8z NFSeVDVtUpWlU0jn3ImvVDIDLoQtkx0PiwdAbYKP/BGozsbD4Jjqufj6WuZq6PGWxrsP PwpA== X-Gm-Message-State: AO0yUKVRkXeVOyzNDA2Jlw0DnXJWyItcm7XApO2D10QBrETwoth7zFrP DQHFp9HycY4bzK1H7k91UhE= X-Received: by 2002:a05:600c:4750:b0:3eb:395b:8b62 with SMTP id w16-20020a05600c475000b003eb395b8b62mr14710572wmo.39.1678228417182; Tue, 07 Mar 2023 14:33:37 -0800 (PST) Received: from localhost.localdomain (93-34-89-197.ip49.fastwebnet.it. [93.34.89.197]) by smtp.googlemail.com with ESMTPSA id q11-20020a05600c46cb00b003dc1d668866sm19233101wmo.10.2023.03.07.14.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 14:33:36 -0800 (PST) From: Christian Marangi <ansuelsmth@gmail.com> To: Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, Gregory Clement <gregory.clement@bootlin.com>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Christian Marangi <ansuelsmth@gmail.com>, John Crispin <john@phrozen.org>, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Lee Jones <lee@kernel.org>, linux-leds@vger.kernel.org Subject: [net-next PATCH 10/11] dt-bindings: net: phy: Document support for LEDs node Date: Tue, 7 Mar 2023 18:00:45 +0100 Message-Id: <20230307170046.28917-11-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170046.28917-1-ansuelsmth@gmail.com> References: <20230307170046.28917-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759750949006878359?= X-GMAIL-MSGID: =?utf-8?q?1759750949006878359?= |
Series |
net: Add basic LED support for switch/phy
|
|
Commit Message
Christian Marangi
March 7, 2023, 5 p.m. UTC
Document support for LEDs node in phy and add an example for it.
PHY LED will have to match led pattern and should be treated as a
generic led.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
.../devicetree/bindings/net/ethernet-phy.yaml | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
Comments
On Tue, Mar 07, 2023 at 06:00:45PM +0100, Christian Marangi wrote: > Document support for LEDs node in phy and add an example for it. > PHY LED will have to match led pattern and should be treated as a > generic led. > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On 07/03/2023 18:00, Christian Marangi wrote: > Document support for LEDs node in phy and add an example for it. > PHY LED will have to match led pattern and should be treated as a > generic led. > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> > --- Also missing changelog, history, tags, anything. This was already v8. Also, I have doubts that your patchset is fully bisectable. Are you sure of this? Best regards, Krzysztof
On 08/03/2023 12:00, Krzysztof Kozlowski wrote: > On 07/03/2023 18:00, Christian Marangi wrote: >> Document support for LEDs node in phy and add an example for it. >> PHY LED will have to match led pattern and should be treated as a >> generic led. >> >> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> >> --- > > Also missing changelog, history, tags, anything. This was already v8. > > Also, I have doubts that your patchset is fully bisectable. Are you sure > of this? OK, so the leds in previous patch are not for phy but for port, so it is properly bisectable. Best regards, Krzysztof
On 07/03/2023 18:00, Christian Marangi wrote: > Document support for LEDs node in phy and add an example for it. > PHY LED will have to match led pattern and should be treated as a > generic led. > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> > --- > .../devicetree/bindings/net/ethernet-phy.yaml | 22 +++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > index 1327b81f15a2..0ec8ef6b0d8a 100644 > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > @@ -197,6 +197,13 @@ properties: > PHY's that have configurable TX internal delays. If this property is > present then the PHY applies the TX delay. > > + leds: > + type: object additionalProperties: false although maybe this was already said in one of previous ten reviews... > + > + patternProperties: > + '^led(@[a-f0-9]+)?$': > + $ref: /schemas/leds/common.yaml# > + Best regards, Krzysztof
On Wed, Mar 08, 2023 at 07:56:57PM +0100, Krzysztof Kozlowski wrote: > On 07/03/2023 18:00, Christian Marangi wrote: > > Document support for LEDs node in phy and add an example for it. > > PHY LED will have to match led pattern and should be treated as a > > generic led. > > > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> > > --- > > .../devicetree/bindings/net/ethernet-phy.yaml | 22 +++++++++++++++++++ > > 1 file changed, 22 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > > index 1327b81f15a2..0ec8ef6b0d8a 100644 > > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml > > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > > @@ -197,6 +197,13 @@ properties: > > PHY's that have configurable TX internal delays. If this property is > > present then the PHY applies the TX delay. > > > > + leds: > > + type: object > > additionalProperties: false > > although maybe this was already said in one of previous ten reviews... > Thanks for the review. (this is rather new from the old patch (appeared only in v7 so sorry if I didn't see that in the old series. Will fix in v2 of this!) > > + > > + patternProperties: > > + '^led(@[a-f0-9]+)?$': > > + $ref: /schemas/leds/common.yaml# > > + >
diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml index 1327b81f15a2..0ec8ef6b0d8a 100644 --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml @@ -197,6 +197,13 @@ properties: PHY's that have configurable TX internal delays. If this property is present then the PHY applies the TX delay. + leds: + type: object + + patternProperties: + '^led(@[a-f0-9]+)?$': + $ref: /schemas/leds/common.yaml# + required: - reg @@ -204,6 +211,8 @@ additionalProperties: true examples: - | + #include <dt-bindings/leds/common.h> + ethernet { #address-cells = <1>; #size-cells = <0>; @@ -219,5 +228,18 @@ examples: reset-gpios = <&gpio1 4 1>; reset-assert-us = <1000>; reset-deassert-us = <2000>; + + 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"; + }; + }; }; };