Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1156831imw; Tue, 5 Jul 2022 04:54:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+dTqRalaFaMEQOcy3o7aoG3Tl7LSAsYYnA05J/mvUMN4mNkVFqFkEUbhTcovhIHF/h7hG X-Received: by 2002:a17:906:6c82:b0:709:f868:97f6 with SMTP id s2-20020a1709066c8200b00709f86897f6mr33827726ejr.555.1657022089714; Tue, 05 Jul 2022 04:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657022089; cv=none; d=google.com; s=arc-20160816; b=UnwSzpAgMzquCdxsDrnBV4ajT2VkqnCwrD6qX5haFWCMqyqt/4verwo+Tr6t1flZ98 oUzgsginxXd9Cg7tszNoKfugQJ1JxkaS108FIJl56YwI82Sh6nL3m1KsOYj7kyF7ImDU w4vj8ZxxtUT011T1qXFGq1MacP54OZKttizegUUj3RZo0y5JBWV4GFYNO7hdsxVUwKep lTNRe5ABUmAiW56z1/YZ4PUIgLAxQv6MG9MyFKBxB9d/lf/1bT4UmGcDC6n4rERy3dRo 2o2XenyO3/pUZkN6v34Q5G/OYjFNx+QQksFfG4RJ5SDqiw5NJ6vMhXI+jycVNyPiuhb3 vsQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kyD5meJq9T+zf3BdtM7Xs4VOaKBM/xSeEPTh5wRioas=; b=SD/EACMArIREdFhmfl8Rs9rlAoBTQtTSkz3BrI3vzHkh1oDuezaqJtph5BnUvI3jgA 1/pjhO8TIcu9t8y+jR8iqHw9BdkYIVKXdqDfAuJEJDY7uXNR28vlgNRazKSVHBe47GNz 5mym4ZNs1/psCZtybRzZAVw8QnijgTbnBP3d8PhNaV9DgOQddKefszk+FvT7EJuZvcDh 0c5AveDCC14ZYqbQYxTcaFN0IQ3ZZc7EntwsgC7ookqlibM4jOpcPXkpYUVM68hdBKil X/2CdENOlJxk5igewN90lWsJ3Q4rt9ha3Nwq7VX7fD48ZwXdWeejb4oHF5LtTAeKA8Lk eGmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RPHJDjRF; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht8-20020a170907608800b0072abefc52bfsi9765073ejc.875.2022.07.05.04.54.22; Tue, 05 Jul 2022 04:54:49 -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=@kernel.org header.s=k20201202 header.b=RPHJDjRF; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232122AbiGELmp (ORCPT + 99 others); Tue, 5 Jul 2022 07:42:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231528AbiGELmo (ORCPT ); Tue, 5 Jul 2022 07:42:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7A801704E; Tue, 5 Jul 2022 04:42:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 72BFE6163C; Tue, 5 Jul 2022 11:42:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E139C341C7; Tue, 5 Jul 2022 11:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657021361; bh=UdQ7JRNNmKOouwZRfkPg0ishKhazBun/wUcYJwP4HfA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RPHJDjRFaAfomSYoAqFLAi9AnrB7jQK4vbF9qUAr7ClDKQ6ODCH5gl/JkxUDa2nsw JqGuhFlXLDg8DmareUba+FTM4XLIyB1svfMcqY8yvYx48hXTDCfx3+EmaEJG8Qyntc 5uGb2Bks0wuurxKstzIYPFP0FkncuOSi2LCS5B6w4K9cD7+fM4Asj4vjyowneYrylY Gle5n2CKsjOm0EcMXm4xlNEn7FCO/QMgPy3RMZfEQ0wVSFj/BWh6Ym47rdEE3ujnYR n705NsUsLNzdZiCB/y7/eDhIrVu57lbvqlBpPJV3vq7K4CAz6mlf3NkJyukyQvYvkq XvwG8ZNXtG7BQ== Received: by pali.im (Postfix) id A3287CBF; Tue, 5 Jul 2022 13:42:38 +0200 (CEST) Date: Tue, 5 Jul 2022 13:42:38 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Krzysztof Kozlowski Cc: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Marek =?utf-8?B?QmVow7pu?= , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding Message-ID: <20220705114238.xwgexavgozqskwbw@pali> References: <20220705000448.14337-1-pali@kernel.org> <42d837dd-fbd1-6294-2fa0-8a07ae0f8d44@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <42d837dd-fbd1-6294-2fa0-8a07ae0f8d44@linaro.org> User-Agent: NeoMutt/20180716 X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tuesday 05 July 2022 13:36:54 Krzysztof Kozlowski wrote: > On 05/07/2022 02:04, Pali Rohár wrote: > > Add device-tree bindings documentation for Turris 1.x RGB LEDs. > > > > Signed-off-by: Pali Rohár > > --- > > .../bindings/leds/cznic,turris1x-leds.yaml | 116 ++++++++++++++++++ > > 1 file changed, 116 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml > > > > diff --git a/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml > > new file mode 100644 > > index 000000000000..fd09613c8d2d > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml > > @@ -0,0 +1,116 @@ > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/leds/cznic,turris1x-leds.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: CZ.NIC's Turris 1.x LEDs driver > > + > > +maintainers: > > + - Pali Rohár > > + > > +description: > > + This module adds support for the RGB LEDs found on the front panel of the > > + Turris 1.x routers. There are 8 RGB LEDs that are controlled by CZ.NIC CPLD > > + firmware running on Lattice FPGA. Firmware is open source and available at > > + https://gitlab.nic.cz/turris/hw/turris_cpld/-/blob/master/CZ_NIC_Router_CPLD.v > > + > > +properties: > > + compatible: > > + const: cznic,turris1x-leds > > + > > + reg: > > + maxItems: 2 > > You need to describe the items, if it is really two items. However your > example has only one item, so this was not tested and won't work. Ehm? Example has two items in the reg. > You'll get warning from Rob's robot soon... but you should test the > bindings instead. I have tested bindings on the real hardware and it is working fine together with the driver from patch 2/2. > > + > > + "#address-cells": > > + const: 1 > > + > > + "#size-cells": > > + const: 0 > > + > > +patternProperties: > > + "^multi-led@[0-7]$": > > + type: object > > + $ref: leds-class-multicolor.yaml# > > This looks incorrect, unless you rebased on my patchset? So what is the correct? (I used inspiration from cznic,turris-omnia-leds.yaml file) > > + > > + properties: > > + reg: > > + minimum: 0 > > + maximum: 7 > > + > > + required: > > + - reg > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + > > No blank line. Ok. > > + #include > > + > > + cpld@3,0 { > > Generic node name. Is not cpld name generic enough? > > + #address-cells = <1>; > > + #size-cells = <1>; > > + > > + led-controller@13 { > > + compatible = "cznic,turris1x-leds"; > > + reg = <0x13 0x1d>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > > Best regards, > Krzysztof