Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5279903rwl; Tue, 21 Mar 2023 16:36:03 -0700 (PDT) X-Google-Smtp-Source: AK7set8nX3Y1PGtq24GHBLYiE0UJkM9xG5p36nRWxUV9pAaP1bGFpZwCm9FeWyaijwHaRW1RFlwD X-Received: by 2002:a17:906:1ce:b0:939:5398:768e with SMTP id 14-20020a17090601ce00b009395398768emr4670761ejj.7.1679441763297; Tue, 21 Mar 2023 16:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679441763; cv=none; d=google.com; s=arc-20160816; b=tTtGTaQlZfyR6ssTAHxJ9vAuZATRj7eaZwU9AaO+QOeizj/7bCi0EnUvMPE8Xc62iw PCv6U7q1TretN4qDw5eQK9PGQaa3A4FSOlIDYXcKi+DRX/glXdMsNFR9y1nAlStkKd14 +XK5mIk3BpmyGN0ZTaeM/cnWf35y8G0OGbSfM4itBpaSR0o5lFuZOA6FlmahdV1rpokT LKc/FZJz5+u8gjKZ/JFn0NDniGSsHRxBl9KNNdif3+AU+U1eWaEuC3bQVmTE4p9eW0Ty HkRvnAnTsgtiJkNZkUlQhKkGlXdG+tDm3721TDHFblITlNVyxm7bP5ClItIyZshRpOhg 9KZw== 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=wiy20BSnFfJfVc25CurvTMCkxrUDUZJYaysnyodWx80=; b=Ozq/W7ZNxQVsGhXMp4xFLg35V4dlcjk75zE2b4WXwYwk2uwx95R7GyHMORtDnnEdgn ByIhgXk3AprZa+WMYOVCY8VUhz2dY4/UqxAq0KEIeFN2YUmNx57JQgbO6+h+KYE9zMzl 8n4bZAiMje0LQFm6YQtvaBU/xQHaxL+wAffTHRILS3e+nIgnG81hmYuE09ISLY2vBMuf aGPuWZKmg9dASYY4iy8FCPV1DRnGruVKWxnX7oqeCRdF7gycuMif/A2mIeStPg8F122I I4wY6fc10fwvZMZDCnBbtX0B5WWLbNyrbwIC7Xv7bHngUp489ZQ6TX3tc1z+9wxXuU6Z RyMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=a0P9GyyN; 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 g2-20020a17090670c200b008cf961a7bdesi10239573ejk.598.2023.03.21.16.35.38; Tue, 21 Mar 2023 16:36:03 -0700 (PDT) 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=a0P9GyyN; 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 S230157AbjCUXYV (ORCPT + 99 others); Tue, 21 Mar 2023 19:24:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjCUXYU (ORCPT ); Tue, 21 Mar 2023 19:24:20 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EFE7574FB; Tue, 21 Mar 2023 16:24:19 -0700 (PDT) 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=wiy20BSnFfJfVc25CurvTMCkxrUDUZJYaysnyodWx80=; b=a0P9GyyNur3yQ2++XNo9KrUso8 /Q94iFHzANTQeoD9k8DY5tFXeexrUEqn3e6W754stwCFtQBWxKTVsYRylZspTW0umlCpp8ORrTwmP 5jDUUln0zCwk91dkPN4b7wqrrYNp0TFYmrkUkubfZSIrqd2+zO7J7cGwvmNPZW6X3uaw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pelKh-0080wA-Oe; Wed, 22 Mar 2023 00:23:59 +0100 Date: Wed, 22 Mar 2023 00:23:59 +0100 From: Andrew Lunn To: Christian Marangi Cc: Rob Herring , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , Heiner Kallweit , Russell King , Gregory Clement , Sebastian Hesselbarth , Andy Gross , Bjorn Andersson , Konrad Dybcio , Pavel Machek , Lee Jones , John Crispin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [net-next PATCH v5 10/15] dt-bindings: net: ethernet-controller: Document support for LEDs node Message-ID: <38534a25-4bb3-4371-b80b-abfc259de781@lunn.ch> References: <20230319191814.22067-1-ansuelsmth@gmail.com> <20230319191814.22067-11-ansuelsmth@gmail.com> <20230321211953.GA1544549-robh@kernel.org> <641a35b8.1c0a0220.25419.2b4d@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <641a35b8.1c0a0220.25419.2b4d@mx.google.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 > > Are specific ethernet controllers allowed to add their own properties in > > led nodes? If so, this doesn't work. As-is, this allows any other > > properties. You need 'unevaluatedProperties: false' here to prevent > > that. But then no one can add properties. If you want to support that, > > then you need this to be a separate schema that devices can optionally > > include if they don't extend the properties, and then devices that > > extend the binding would essentially have the above with: > > > > $ref: /schemas/leds/common.yaml# > > unevaluatedProperties: false > > properties: > > a-custom-device-prop: ... > > > > > > If you wanted to define both common ethernet LED properties and > > device specific properties, then you'd need to replace leds/common.yaml > > above with the ethernet one. > > > > This is all the same reasons the DSA/switch stuff and graph bindings are > > structured the way they are. > > > > Hi Rob, thanks for the review/questions. > > The idea of all of this is to keep leds node as standard as possible. > It was asked to add unevaluatedProperties: False but I didn't understood > it was needed also for the led nodes. > > leds/common.yaml have additionalProperties set to true but I guess that > is not OK for the final schema and we need something more specific. > > Looking at the common.yaml schema reg binding is missing so an > additional schema is needed. > > Reg is needed for ethernet LEDs and PHY but I think we should also permit > to skip that if the device actually have just one LED. (if this wouldn't > complicate the implementation. Maybe some hints from Andrew about this > decision?) I would make reg mandatory. We should not encourage additional properties, but i also think we cannot block it. The problem we have is that there is absolutely no standardisation here. Vendors are free to do whatever they want, and they do. So i would not be too surprised if some vendor properties are needed eventually. Andrew