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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6823CC43603 for ; Thu, 19 Dec 2019 23:04:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3850024672 for ; Thu, 19 Dec 2019 23:04:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576796663; bh=MIFpmnfyfdY7GEle7mYiWB1fFvXkbdrF6h+oVf8+Yls=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Tao34ERGKfMEu/JEWm4HunCCpCFgtS9yyOTu4/BH64bAAx5jRb1lzthAt18ee/D8K 97W9GON5gnABY4apDgTyMpw2hGEim4BNukRKZDMExZaF6WaWhk4lD8K8i1ejy9cItv 7cZFs/Zorbl7MxuHPq4y3+r7BXsNS0InCWJEo5mQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726986AbfLSXEW (ORCPT ); Thu, 19 Dec 2019 18:04:22 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:41234 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbfLSXEW (ORCPT ); Thu, 19 Dec 2019 18:04:22 -0500 Received: by mail-ot1-f67.google.com with SMTP id r27so9235471otc.8; Thu, 19 Dec 2019 15:04:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=F7dFVXsBXe6V0IT3wFxkvgfpUWL9SwHOltmODSQxTMA=; b=b/xY4LsYRSVUYUjbOrSWi5la84BIrcEnc4LNRB4S4TTQ0hZK3J6DmdlLKd2jiyBLSQ s/uwRqilXZ/eRPFZGBvYgNNxCimZ+pckdr3sJ4tK25VJj9C41jVTMQnXiBf4ZKWB9YtX IRoFOSfj/vlDxfi2vG2RpJwPELXyW5eu7Ll0voxJOm4PWubQ+4nvY5r3HTZMKerExqPv zDtrHo0IJJhGumD/HFYs/JiiikNhFAy6GE8z+aLPESQUGGPSDFyk22SG26vUJ0hUCKqF z5fj05NTKziPKMyD7G3QXLxmZWlmw0KrCqfNEAiPNFy1qUj8KQ74/wTqlpJwTITYLDWd VORg== X-Gm-Message-State: APjAAAVzirvkod+c2EPs1od7vL8a1AL3II+MWoXe8ZW3sFrD4ATwnb+o 9zolXDxq/baXH5pKXKC/K9Iygx9bXA== X-Google-Smtp-Source: APXvYqy132pI7t/f3+X+sZU4Ko0GpazlmqI0elgfvDTZQ8i2aDSAFKJOgz5uZujIhEm+kDaj8cyaCA== X-Received: by 2002:a9d:d0b:: with SMTP id 11mr11694540oti.287.1576796661610; Thu, 19 Dec 2019 15:04:21 -0800 (PST) Received: from localhost (ip-184-205-174-147.ftwttx.spcsdns.net. [184.205.174.147]) by smtp.gmail.com with ESMTPSA id b206sm2499978oif.30.2019.12.19.15.04.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 15:04:21 -0800 (PST) Date: Thu, 19 Dec 2019 17:04:20 -0600 From: Rob Herring To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: linux-realtek-soc@lists.infradead.org, linux-leds@vger.kernel.org, Jacek Anaszewski , Pavel Machek , Dan Murphy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, zypeng@titanmec.com, Mark Rutland , devicetree@vger.kernel.org Subject: Re: [RFC 06/25] dt-bindings: leds: Add Titan Micro Electronics TM1628 Message-ID: <20191219230335.GA25461@bogus> References: <20191212033952.5967-1-afaerber@suse.de> <20191212033952.5967-7-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191212033952.5967-7-afaerber@suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org On Thu, Dec 12, 2019 at 04:39:33AM +0100, Andreas Färber wrote: > Add a YAML schema binding for TM1628 LED controller. > > Cc: zypeng@titanmec.com > Signed-off-by: Andreas Färber > --- > @Rob: How could we express constraints on two-cell reg value ranges here? It's encoded as a matrix, so something like this: reg: items: items: - # constraints on 1st cell value - # constraints on 2nd cell value > Should we also model constraints on reg range by #grids property? So the value of #grid defines the max values in reg? Unfortunately, we can't yet for json-schema. There's been some proposals, but nothing final I think. > .../devicetree/bindings/leds/titanmec,tm1628.yaml | 80 ++++++++++++++++++++++ > 1 file changed, 80 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml > > diff --git a/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml > new file mode 100644 > index 000000000000..024875656e79 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml > @@ -0,0 +1,80 @@ > +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/titanmec,tm1628.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Titan Micro Electronics TM1628 LED controller > + > +maintainers: > + - Andreas Färber > + > +properties: > + compatible: > + enum: > + - titanmec,tm1628 > + > + reg: > + maxItems: 1 > + > + "#grids": I'd be more a fan of using '#' prefix if we'd been better at using it when appropriate, so I'd probably drop the '#'. > + description: | > + Number of GRID output lines to use. > + This limits the number of available SEG output lines. > + minimum: 4 > + maximum: 7 > + > + "#address-cells": > + const: 2 > + > + "#size-cells": > + const: 0 > + > +required: > + - compatible > + - reg > + > +patternProperties: > + "^.*@[1-7],([1-9]|1[02-4])$": > + type: object > + description: | > + Properties for a single LED. Please describe the unit-address format. I assume it's ,. > + > + properties: > + reg: > + description: | > + 1-based grid number, followed by 1-based segment number. > + maxItems: 1 > + > + linux,default-trigger: true > + > + required: > + - reg > + > +examples: > + - | > + #include > + > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + led-controller@0 { > + compatible = "titanmec,tm1628"; > + reg = <0>; > + spi-3-wire; > + spi-lsb-first; > + spi-max-frequency = <500000>; > + #grids = <7>; > + #address-cells = <2>; > + #size-cells = <0>; > + > + colon@5,4 { > + reg = <5 4>; > + color = ; > + function = LED_FUNCTION_INDICATOR; > + linux,default-trigger = "heartbeat"; > + }; > + }; > + }; > +... > -- > 2.16.4 > 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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71176C43603 for ; Thu, 19 Dec 2019 23:04:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42C8F24672 for ; Thu, 19 Dec 2019 23:04:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="olbhcA8q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42C8F24672 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cQ5s+YknOnBDCYgpIRWicdJ37S7+qca04JtPpt7h+v4=; b=olbhcA8qC3KCnD KsYvrfnBS3tssdOleYWhRfu1EgIXx2PxOlri5VrjDXmALRVpbrBYcxXU7UpEYJsIrgGmcIgdlRcOU RcxU3R9IEpvNLpdIWTrtTIOjhlNbG8emdvMknCSEcQh7Tg2l/Uo1Hf7P1jFV25nlbZxWW41rhrWkc td1It0FcGWC/DS3r6Ny127rGewFNVMrlWL7RmLZXqi2AO99tIGeVBBP0a5PjR03c2Zg0YsRHcNIbx ZfsvDv9kkyLUbnI8X5yfXdvfH/KJjw7kNWuqjqfYuiuPt1jw9lcY7uz0XfZVo3TLuVcP1/bqZnHHR OBonyowNaerqyXwnSkmg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ii4qK-0000m3-30; Thu, 19 Dec 2019 23:04:28 +0000 Received: from mail-ot1-f68.google.com ([209.85.210.68]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ii4qG-0000lH-HZ; Thu, 19 Dec 2019 23:04:26 +0000 Received: by mail-ot1-f68.google.com with SMTP id 77so9234659oty.6; Thu, 19 Dec 2019 15:04:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=F7dFVXsBXe6V0IT3wFxkvgfpUWL9SwHOltmODSQxTMA=; b=ZkKYH5LAqR+4pWdiNYwYKFRBjtSG6PS1Gylb8xPVxq5NJVbCr+JUXq0rnTkLuz3gmn RoJ6/fsqlKaC2OJij9WofoQ89O1D/C/LXFZQaPwg+gSY4uBdCTpQ+ZvjRU3EaJzG9ADP D98fk0cBouhEtgd40ObQ5cDf7miP0vc0P0wQ4XfgZESkx4m05L8K3/IEfX9xtvkkTrEV Mr/+SgXB8XXVvhdx/x5/QJ4Pv2oqA3E6e8W6WbyQ1HEM4jqVARLedIAzqGIz9TVdq0J0 ysMRbU1R7kAaKWi3ZH8u4ZS9zoXhqQ4kc7twQ+obmuz3vvUdOOX2B3sCle/jScbtV+u+ JbFg== X-Gm-Message-State: APjAAAUP9ce5CW5GKbYxsCxngcw5qddvWLyCKAaaD+KQHYGHRFT07X8d qrPLdpT9MDAccn/GhoehuQ== X-Google-Smtp-Source: APXvYqy132pI7t/f3+X+sZU4Ko0GpazlmqI0elgfvDTZQ8i2aDSAFKJOgz5uZujIhEm+kDaj8cyaCA== X-Received: by 2002:a9d:d0b:: with SMTP id 11mr11694540oti.287.1576796661610; Thu, 19 Dec 2019 15:04:21 -0800 (PST) Received: from localhost (ip-184-205-174-147.ftwttx.spcsdns.net. [184.205.174.147]) by smtp.gmail.com with ESMTPSA id b206sm2499978oif.30.2019.12.19.15.04.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 15:04:21 -0800 (PST) Date: Thu, 19 Dec 2019 17:04:20 -0600 From: Rob Herring To: Andreas =?iso-8859-1?Q?F=E4rber?= Subject: Re: [RFC 06/25] dt-bindings: leds: Add Titan Micro Electronics TM1628 Message-ID: <20191219230335.GA25461@bogus> References: <20191212033952.5967-1-afaerber@suse.de> <20191212033952.5967-7-afaerber@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191212033952.5967-7-afaerber@suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191219_150424_582055_A2D98990 X-CRM114-Status: GOOD ( 15.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, linux-realtek-soc@lists.infradead.org, linux-kernel@vger.kernel.org, Dan Murphy , Pavel Machek , zypeng@titanmec.com, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jacek Anaszewski Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Dec 12, 2019 at 04:39:33AM +0100, Andreas F=E4rber wrote: > Add a YAML schema binding for TM1628 LED controller. > = > Cc: zypeng@titanmec.com > Signed-off-by: Andreas F=E4rber > --- > @Rob: How could we express constraints on two-cell reg value ranges here? It's encoded as a matrix, so something like this: reg: items: items: - # constraints on 1st cell value - # constraints on 2nd cell value > Should we also model constraints on reg range by #grids property? So the value of #grid defines the max values in reg? Unfortunately, = we can't yet for json-schema. There's been some proposals, but nothing = final I think. > .../devicetree/bindings/leds/titanmec,tm1628.yaml | 80 ++++++++++++++++= ++++++ > 1 file changed, 80 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/titanmec,tm162= 8.yaml > = > diff --git a/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml = b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml > new file mode 100644 > index 000000000000..024875656e79 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/titanmec,tm1628.yaml > @@ -0,0 +1,80 @@ > +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/titanmec,tm1628.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Titan Micro Electronics TM1628 LED controller > + > +maintainers: > + - Andreas F=E4rber > + > +properties: > + compatible: > + enum: > + - titanmec,tm1628 > + > + reg: > + maxItems: 1 > + > + "#grids": I'd be more a fan of using '#' prefix if we'd been better at using it = when appropriate, so I'd probably drop the '#'. > + description: | > + Number of GRID output lines to use. > + This limits the number of available SEG output lines. > + minimum: 4 > + maximum: 7 > + > + "#address-cells": > + const: 2 > + > + "#size-cells": > + const: 0 > + > +required: > + - compatible > + - reg > + > +patternProperties: > + "^.*@[1-7],([1-9]|1[02-4])$": > + type: object > + description: | > + Properties for a single LED. Please describe the unit-address format. I assume it's ,. > + > + properties: > + reg: > + description: | > + 1-based grid number, followed by 1-based segment number. > + maxItems: 1 > + > + linux,default-trigger: true > + > + required: > + - reg > + > +examples: > + - | > + #include > + > + spi { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + led-controller@0 { > + compatible =3D "titanmec,tm1628"; > + reg =3D <0>; > + spi-3-wire; > + spi-lsb-first; > + spi-max-frequency =3D <500000>; > + #grids =3D <7>; > + #address-cells =3D <2>; > + #size-cells =3D <0>; > + > + colon@5,4 { > + reg =3D <5 4>; > + color =3D ; > + function =3D LED_FUNCTION_INDICATOR; > + linux,default-trigger =3D "heartbeat"; > + }; > + }; > + }; > +... > -- = > 2.16.4 > = _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel