Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4840026rwj; Tue, 20 Dec 2022 16:03:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf7qd2YmU/zKpJAeCpWe/+GXm1cL0iiEpMqgM/Qenh1Ha+NlkDXQ1zUtzfujRxR/5LEPJ9QH X-Received: by 2002:a17:903:324c:b0:189:d0fa:231b with SMTP id ji12-20020a170903324c00b00189d0fa231bmr51126108plb.67.1671581008646; Tue, 20 Dec 2022 16:03:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671581008; cv=none; d=google.com; s=arc-20160816; b=IKEqKCwCzLERd8k8Fisoo2xdf10JlcrkaryOq6WN0bieg14QYQImYSjOSN6B/qrJFN 4jB7G/XsNcVyQly/u6uzsyb0KKwk2kj7TFc1ug3K04O3TFQ3fUg7Je1+wFdSRRJpRxTJ 0k7Dc1iXIiYzPiulhZWOwQkBunsVy1xMxFV+u9mBBeqh0GB5pQqOw2Jy22RxljoQL7vR Sd6ppmVaFprq/PMR4WbGKuaith0YJszN8cYnerYQDqouGHrci/ZjkBssgHSYZr6RKj9H ldju2O4ierQJkjfcWqlm+rfbiqQ6X4JOoOXFL4IHQ/pRlzI9YeaTqAAnfEdx3Ffk9tMZ +AeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jP1SznLk4QqKOeAQ29Z+yBmKm0jVtejwu0lLKovrjPA=; b=ZQNS6HGijdVXI4Fg9GYmOn6DszKSby5RJpivIcUcvy8kV0sW1yPz9AmBQaDNmVhHz9 c6SDhDe7pO7KTWkdftWom3ZrO8pRgEiln4hkbp9aACvi4zoI4gdNGvNECYQ1cLhHQbTt PzPH1MVMLP0Cot0ohbv4lugDzkyREORARCywDmc10KZj67jyUjUyz1lwRMU82q/163hu 11knNPxQQSZyzBjyMjTBYJg9bk/BXte3rmPophz1N+jopQfZfrqIXFJ423pi1cSV6c/w GAEOH2OcF00l87BRAD5AIUX31CjymCu1m2udeiOJJbze3UfBvg1+rM0DwTcNxvAoaFQf ocqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=XGouaF1h; 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=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a17090311d100b00172cb948c68si16722589plh.227.2022.12.20.16.03.20; Tue, 20 Dec 2022 16:03:28 -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=@lunn.ch header.s=20171124 header.b=XGouaF1h; 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=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229451AbiLTXUi (ORCPT + 68 others); Tue, 20 Dec 2022 18:20:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbiLTXUh (ORCPT ); Tue, 20 Dec 2022 18:20:37 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4952C19C2A; Tue, 20 Dec 2022 15:20:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=jP1SznLk4QqKOeAQ29Z+yBmKm0jVtejwu0lLKovrjPA=; b=XGouaF1h0RrR6vGj9PvB5XiU7W x5g6chWr2bEk11CMq0ahuXCdEj8jA67u2lcjac0mKV7FAehvY/TWE2uDraiax+Oi2UGIvjghWGTwp J76YUFli/0j0LNbbTBHCJCi8FqoxilvDX2l8c/bFH3DQL7rNOlYQjdKnONLl5lR5M5Qs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p7luK-00089h-By; Wed, 21 Dec 2022 00:20:24 +0100 Date: Wed, 21 Dec 2022 00:20:24 +0100 From: Andrew Lunn To: Rob Herring Cc: Christian Marangi , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , Jonathan Corbet , Pavel Machek , "Russell King (Oracle)" , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-leds@vger.kernel.org, Tim Harvey , Alexander Stein , Rasmus Villemoes Subject: Re: [PATCH v7 11/11] dt-bindings: net: dsa: qca8k: add LEDs definition example Message-ID: References: <20221214235438.30271-1-ansuelsmth@gmail.com> <20221214235438.30271-12-ansuelsmth@gmail.com> <20221220173958.GA784285-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221220173958.GA784285-robh@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 20, 2022 at 11:39:58AM -0600, Rob Herring wrote: > On Thu, Dec 15, 2022 at 12:54:38AM +0100, Christian Marangi wrote: > > Add LEDs definition example for qca8k using the offload trigger as the > > default trigger and add all the supported offload triggers by the > > switch. > > > > Signed-off-by: Christian Marangi > > --- > > .../devicetree/bindings/net/dsa/qca8k.yaml | 24 +++++++++++++++++++ > > 1 file changed, 24 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > > index 978162df51f7..4090cf65c41c 100644 > > --- a/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > > +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.yaml > > @@ -65,6 +65,8 @@ properties: > > internal mdio access is used. > > With the legacy mapping the reg corresponding to the internal > > mdio is the switch reg with an offset of -1. > > + Each phy have at least 3 LEDs connected and can be declared > > + using the standard LEDs structure. > > > > patternProperties: > > "^(ethernet-)?ports$": > > @@ -202,6 +204,7 @@ examples: > > }; > > - | > > #include > > + #include > > > > mdio { > > #address-cells = <1>; > > @@ -284,6 +287,27 @@ examples: > > > > internal_phy_port1: ethernet-phy@0 { > > reg = <0>; > > + > > + leds { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + led@0 { > > + reg = <0>; > > + color = ; > > + function = LED_FUNCTION_LAN; > > + function-enumerator = <1>; > > + linux,default-trigger = "netdev"; > > 'function' should replace this. Don't encourage more users. > > Also, 'netdev' is not documented which leaves me wondering why there's > no warning? Either this patch didn't apply or there's a problem in the > schema that's not checking this node. It is probably the usual limitation that the tools require a compatible, where as the kernel does not. > > + }; > > + > > + led@1 { > > + reg = <1>; > > + color = ; > > + function = LED_FUNCTION_LAN; > > + function-enumerator = <1>; > > Typo? These are supposed to be unique. Can't you use 'reg' in your case? reg in this context is the address of the PHY on the MDIO bus. This is an Ethernet switch, so has many PHYs, each with its own address. Andrew