Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp200758ybx; Wed, 6 Nov 2019 15:36:45 -0800 (PST) X-Google-Smtp-Source: APXvYqynOwPXLNykJiTJErD+6s5n+fX3pDhxkKq5VZgt5mLQGhhG0whyAkAdHfmZQgA0jUk1rmju X-Received: by 2002:a17:906:5586:: with SMTP id y6mr263221ejp.76.1573083405749; Wed, 06 Nov 2019 15:36:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573083405; cv=none; d=google.com; s=arc-20160816; b=fybUy4v2i20jJoVo8bmTobDCAEKVXTIx6UN7dddCPyExgslbcq2M1PYU5dm3xJZQPe XggJxNlKljZ3IVXUy3ZqaNrGlYpthiuxCTaifBUjNY70RXw4R2CVdFJu1p8srkv8CkUs m6MR30Eu1n1G/S30Vu/npDted+/YM63S20O3vKJHrGrko/9lreiIuiUVRiPDtEF2WISC eQ04olAPuhi6lXuyG5dAbPB9wB0BwMulPG2gXzLuVNWyciAuI+5hIJ2fsEmo74F54nko 2R6SzbUBCzWs9SYlGwCECdIR/wGMhBZq1lNduSoNUA3csHzoleuy+KXg56kKC3yO6rb6 F0Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=beWP8ok/q0RRuNdMpPp/AIsXSyHcJpbZBegxvMpM/rY=; b=E9hBBlq5fAsLH0WmrbzhiIpWz/TtmRlXw+2Slwh7Cu07+lUHfVYBT6lOFf34dfSDKj +L3ADgucWkqBvhxuxHB2fEgi+Yfau0oE2hFIb0rjh8oxkfYZww26bUeiMKWBZjbYwz3J 4PDkglBHMQb4Qt8yZDH5EkALAojztZpHDOSusbPpuiL6NYn4D6e+uZLrkT9efsxX28yr JQfca4k6zHLkpRVE8j7YONRSxShRv06yS4hZ0AlXhhFRmx1QCljS5kjver1p7mQRA/tt XEp/AjCdvqQw3c8ppsThWjWIuH4aepOi8vB3dTPW0Hw2qnkobQL/h5p2iQ8yTtPZPmjF KhKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jtHyhFkW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s20si235914eju.421.2019.11.06.15.36.21; Wed, 06 Nov 2019 15:36:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jtHyhFkW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1732726AbfKFXdU (ORCPT + 99 others); Wed, 6 Nov 2019 18:33:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:41486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725937AbfKFXdU (ORCPT ); Wed, 6 Nov 2019 18:33:20 -0500 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5FE2821A49; Wed, 6 Nov 2019 23:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573083198; bh=kXuPSKl+d3N16AWU48reQZ1zuDSoKWcH8SnXbdsyG1Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jtHyhFkWE3pKHvdd83jG7hT7NyR376eTuEr9ERzYU/cLPUMq8jfmu4Pc3AwMwAOfA Ta5bhoJh9cqN3cZVa6vzhyOfspGH5C9cbvPH9vfe7rCAYdmt5ayL69+QublnfxuRyj LKVoZnM3aCaTH+YQzn0GMYdakODsvG+TlLgH+QUU= Received: by mail-qv1-f43.google.com with SMTP id f12so93859qvu.3; Wed, 06 Nov 2019 15:33:18 -0800 (PST) X-Gm-Message-State: APjAAAVvZvTUPBZxkVwGSH6lR00KcB0k/zkEHE8trLZqTFFndUUuW7eA z1jPIsVnDE+w4zGiqr0xkcvAempI5hWtYUWfZQ== X-Received: by 2002:a0c:ca06:: with SMTP id c6mr490409qvk.136.1573083197450; Wed, 06 Nov 2019 15:33:17 -0800 (PST) MIME-Version: 1.0 References: <20191031123040.26316-1-benjamin.gaignard@st.com> <20191031123040.26316-5-benjamin.gaignard@st.com> <20191106041518.GC5294@bogus> <41c43d09-9371-8b23-a3dd-e43f5df5c5bc@st.com> In-Reply-To: <41c43d09-9371-8b23-a3dd-e43f5df5c5bc@st.com> From: Rob Herring Date: Wed, 6 Nov 2019 17:33:05 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] dt-bindings: mfd: Convert stm32 timers bindings to json-schema To: Benjamin GAIGNARD Cc: "mark.rutland@arm.com" , Alexandre TORGUE , Fabrice GASNIER , "jic23@kernel.org" , "knaack.h@gmx.de" , "lars@metafoo.de" , "pmeerw@pmeerw.net" , "lee.jones@linaro.org" , "thierry.reding@gmail.com" , "u.kleine-koenig@pengutronix.de" , "devicetree@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-iio@vger.kernel.org" , "linux-pwm@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 6, 2019 at 1:57 PM Benjamin GAIGNARD wrote: > > > On 11/6/19 5:15 AM, Rob Herring wrote: > > On Thu, Oct 31, 2019 at 01:30:40PM +0100, Benjamin Gaignard wrote: > >> Convert the STM32 timers binding to DT schema format using json-schema > >> > >> Signed-off-by: Benjamin Gaignard > >> --- > >> .../devicetree/bindings/mfd/st,stm32-timers.yaml | 91 ++++++++++++++++++++++ > >> .../devicetree/bindings/mfd/stm32-timers.txt | 73 ----------------- > >> 2 files changed, 91 insertions(+), 73 deletions(-) > >> create mode 100644 Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml > >> delete mode 100644 Documentation/devicetree/bindings/mfd/stm32-timers.txt > >> > >> diff --git a/Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml b/Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml > >> new file mode 100644 > >> index 000000000000..3f0a65fb2bc0 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/mfd/st,stm32-timers.yaml > >> @@ -0,0 +1,91 @@ > >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/mfd/st,stm32-timers.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: STMicroelectronics STM32 Timers bindings > >> + > >> +description: | > >> + This hardware block provides 3 types of timer along with PWM functionality: \ > > Don't need the \ > ok > > > >> + - advanced-control timers consist of a 16-bit auto-reload counter driven by a programmable \ > >> + prescaler, break input feature, PWM outputs and complementary PWM ouputs channels. \ > >> + - general-purpose timers consist of a 16-bit or 32-bit auto-reload counter driven by a \ > >> + programmable prescaler and PWM outputs.\ > >> + - basic timers consist of a 16-bit auto-reload counter driven by a programmable prescaler. > >> + > >> +maintainers: > >> + - Benjamin Gaignard > >> + - Fabrice Gasnier > >> + > >> +allOf: > >> + - $ref: "../pwm/st,stm32-pwm.yaml#" > >> + - $ref: "../iio/timer/st,stm32-timer-trigger.yaml#" > >> + - $ref: "../counter/st,stm32-timer-cnt.yaml#" > > This works, but I prefer the child node names be listed under properties > > here with a ref: > > > > counter: > > $ref: "../counter/st,stm32-timer-cnt.yaml#" > If I wrote everything in one file I guess what won't be needed anymore > > > >> + > >> +properties: > >> + compatible: > >> + const: st,stm32-timers > >> + > >> + reg: > >> + maxItems: 1 > >> + > >> + clocks: > >> + maxItems: 1 > >> + > >> + clock-names: > >> + items: > >> + - const: int > >> + > >> + reset: > >> + maxItems: 1 > >> + > >> + dmas: true > > How many? > > from 0 up to 8, but I don't know the syntax for that. minItems = 0 isn't > accepted. > > Any hints for me ? 0 is not accepted because the property is never 0 items. 0 is not present. So just: minItems: 1 maxItems: 8 > >> + > >> + dma-names: true > > What are the names? > > it could be ch1 ... ch8, "trig" or "up" in any order. Why does it need to be in any order? Normally we don't want to have that. > > Again I haven't be able to find a syntax that allow to list the names > and use them in any orders. dma-names: items: enum: [ ch1, ch2, ..., trig, up ] Rob