From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3914C3DA7B for ; Tue, 20 Dec 2022 17:40:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232400AbiLTRkD (ORCPT ); Tue, 20 Dec 2022 12:40:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiLTRkC (ORCPT ); Tue, 20 Dec 2022 12:40:02 -0500 Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com [209.85.160.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8711EFF1; Tue, 20 Dec 2022 09:40:01 -0800 (PST) Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-144b21f5e5fso16178680fac.12; Tue, 20 Dec 2022 09:40:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=T+uqKNupLom5HOX393/X5dcMBDb877yjyv1k5TVvfHA=; b=dYy9G5znw3qUvh2+VZkZceDeq9Lw8DSJHuPCnucxj3I2yFDJGt3+U4uuckwosxmSci 871zqwT91uuGI6q4UVfUGnloPMvMAessZtb4HxRUGtijSN1lfnOMl3uSqt6f9yBqan0J bStGHJZa4jcHF9CHKQwFbvb9aIVyUblAezMfipzFV1bXMorx7lV8kYzKDY9rSCrwFes0 0vvr4xWIujVKyMzS/tgD2inoTrAXFmgluLSn9FleU3HkyVTRZZww0Ba9dahJks71n1dX FgRJ7DxlIt1TnhwRhPh8RK1VnauNMxm27IwTK4QFSIwtZmPCbaUFhlqJGQr6r32L3Pvv rcVw== X-Gm-Message-State: ANoB5pkryApv9g3LiySo4iYTHevuXf2iSg7z/jXxD4YkqGGUGMFf+PNE 0KJHXz7bOZt8QAFXUDSSkw== X-Google-Smtp-Source: AA0mqf76SVmlQ2s3MNPaz5jKJiFUnELkYDbfYdBJK/nJs4YnkQox5rSMMXsrtk/xEbpO8oFir2KjVQ== X-Received: by 2002:a05:6870:2dc8:b0:13b:9ee:aa19 with SMTP id op8-20020a0568702dc800b0013b09eeaa19mr20163092oab.55.1671558000766; Tue, 20 Dec 2022 09:40:00 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id er34-20020a056870c8a200b0014866eb34cesm6216065oab.48.2022.12.20.09.39.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 09:39:59 -0800 (PST) Received: (nullmailer pid 796697 invoked by uid 1000); Tue, 20 Dec 2022 17:39:58 -0000 Date: Tue, 20 Dec 2022 11:39:58 -0600 From: Rob Herring To: Christian Marangi Cc: Andrew Lunn , 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: <20221220173958.GA784285-robh@kernel.org> References: <20221214235438.30271-1-ansuelsmth@gmail.com> <20221214235438.30271-12-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221214235438.30271-12-ansuelsmth@gmail.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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. > + }; > + > + 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? > + linux,default-trigger = "netdev"; > + }; > + }; > }; > > internal_phy_port2: ethernet-phy@1 { > -- > 2.37.2 > >