Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4170884ybl; Tue, 21 Jan 2020 14:21:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwRd1ukQTcM9Dsoth9wq+wymw79SDfcote3KZLFlvQivDi8b7ROunFulAzk0BolcrL3v7cd X-Received: by 2002:aca:f5c1:: with SMTP id t184mr4829813oih.23.1579645303349; Tue, 21 Jan 2020 14:21:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579645303; cv=none; d=google.com; s=arc-20160816; b=Q6oUf3Eqr5ioXU6Z5mvE/pxn7esusHfFLmV4xM46+XO3aCZgVgITEwkUhXiGPAUIe+ 68OrI1Hwr68AYkTd5ntywWH93rbNmTGOK73r8My8qNdKsZMr2A52puwRhf5hm8H+LYMZ IFYs6SGOXhXXS6mEEemj8GXnzqxR9shCLXgJJDAiQW9+jWcJMD6yDYD1umFWgOIneDuU CthNFVc2ur+GavytoRqRbb6Xwc0xCcDzb+qsvmf6+hQs7V0I1kRrCKBRAMvQL1H200cd Na0DfI0psO5FUPbxqXJUOHkLakgHAzycjYVqRoeuNc9W0WivF3qdu0Dis0xk0fRi8+6b zUYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JYjL5Dj4sHium7MXkG5wUfXThgHrFk9aKNPtUfH5UZc=; b=XWKc8VUVy7meSt2Yqh1ihVZbkZq5qUycJ+8PRcVRhSzhc8OuwjbCJfLqqbIdKnxZsS AMCWJAkxeKIBNLX6Jb7IGRoOUa1/uZnSnhxslYIZreCTK4R7ow+8gbIpq9e1iHwpBMbF OcYam2lEVjxq6gTGR4ejpARFDVUwDQl5bjYjo3k5Rj5XkDOYOBff9SCGBlfwwaF2XdCc Eh7d1VrIEx+0CAxRvohUje3gfnZmbByKS58my9Nmj88AphojIuxtgeQQCaD1OPrbVhUY KdlP9zC777/84l7CPGhMhV2Ee11IX47jhchcIG2log6wZaQKD7qUlAAXGq8txLB2oDL9 bELA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 a64si20807432oif.256.2020.01.21.14.21.31; Tue, 21 Jan 2020 14:21:43 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729158AbgAUWUK (ORCPT + 99 others); Tue, 21 Jan 2020 17:20:10 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:39590 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728760AbgAUWUK (ORCPT ); Tue, 21 Jan 2020 17:20:10 -0500 Received: by mail-oi1-f195.google.com with SMTP id z2so4206589oih.6; Tue, 21 Jan 2020 14:20:09 -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:in-reply-to:user-agent; bh=JYjL5Dj4sHium7MXkG5wUfXThgHrFk9aKNPtUfH5UZc=; b=LuxAJOSCVwPh9i2HOnCZn3xqV3Yt7+t5+U5WeARTAVgEXTkTJGsdLJubR03kpvyKnK Op9kdntraDRJO1nEeC1Ae/XbWPqwXN5Bbm11MKsx600vlwLxFzgJ8zDGywzFxHApWMxJ 6V8pGLqG7+aE6gVvlsOJO2zC/phOg3uvMkdp8bd4/aplnKl1A05QpuOI+hjQIO38BL+F n8B9cT1KH7TLo/rHoxoOFPjrdcJ1Fc4KMJF5sDnSHFlIRoNyqu3F6fSoSQB7Hqx5a+3D NNeunCl61djJoq3Cb17Q3S+Ph9aRxe7YkCp8oUHVLb9X7+FjAHlYsUNvPpfJ0VaNBa5n jWYw== X-Gm-Message-State: APjAAAWLAVXMzruSKEKtGBIWlVh/8IknN23L8F82o6qJXfN44fKBV/Oj Jj3mJ6D5g5rCeNiQX8f4bw== X-Received: by 2002:aca:5588:: with SMTP id j130mr4595173oib.122.1579645208961; Tue, 21 Jan 2020 14:20:08 -0800 (PST) Received: from rob-hp-laptop (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id d7sm12406255oic.46.2020.01.21.14.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 14:20:08 -0800 (PST) Received: (nullmailer pid 8896 invoked by uid 1000); Tue, 21 Jan 2020 22:20:07 -0000 Date: Tue, 21 Jan 2020 16:20:07 -0600 From: Rob Herring To: Benjamin Gaignard Cc: gregkh@linuxfoundation.org, mark.rutland@arm.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, fabrice.gasnier@st.com, erwan.leray@st.com Subject: Re: [PATCH 1/2] dt-bindings: serial: Convert rs485 bindings to json-schema Message-ID: <20200121222007.GA1686@bogus> References: <20200114123329.3792-1-benjamin.gaignard@st.com> <20200114123329.3792-2-benjamin.gaignard@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200114123329.3792-2-benjamin.gaignard@st.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 14, 2020 at 01:33:28PM +0100, Benjamin Gaignard wrote: > Convert rs485 binding to yaml style file. > > Signed-off-by: Benjamin Gaignard > --- > Documentation/devicetree/bindings/serial/rs485.txt | 32 +-------------- > .../devicetree/bindings/serial/rs485.yaml | 45 ++++++++++++++++++++++ > 2 files changed, 46 insertions(+), 31 deletions(-) > create mode 100644 Documentation/devicetree/bindings/serial/rs485.yaml > > diff --git a/Documentation/devicetree/bindings/serial/rs485.txt b/Documentation/devicetree/bindings/serial/rs485.txt > index b92592dff6dd..a7fe93efc4a5 100644 > --- a/Documentation/devicetree/bindings/serial/rs485.txt > +++ b/Documentation/devicetree/bindings/serial/rs485.txt > @@ -1,31 +1 @@ > -* RS485 serial communications > - > -The RTS signal is capable of automatically controlling line direction for > -the built-in half-duplex mode. > -The properties described hereafter shall be given to a half-duplex capable > -UART node. > - > -Optional properties: > -- rs485-rts-delay: prop-encoded-array where: > - * a is the delay between rts signal and beginning of data sent in milliseconds. > - it corresponds to the delay before sending data. > - * b is the delay between end of data sent and rts signal in milliseconds > - it corresponds to the delay after sending data and actual release of the line. > - If this property is not specified, <0 0> is assumed. > -- rs485-rts-active-low: drive RTS low when sending (default is high). > -- linux,rs485-enabled-at-boot-time: empty property telling to enable the rs485 > - feature at boot time. It can be disabled later with proper ioctl. > -- rs485-rx-during-tx: empty property that enables the receiving of data even > - while sending data. > - > -RS485 example for Atmel USART: > - usart0: serial@fff8c000 { > - compatible = "atmel,at91sam9260-usart"; > - reg = <0xfff8c000 0x4000>; > - interrupts = <7>; > - atmel,use-dma-rx; > - atmel,use-dma-tx; > - linux,rs485-enabled-at-boot-time; > - rs485-rts-delay = <0 200>; // in milliseconds > - }; > - > +See rs485.yaml > diff --git a/Documentation/devicetree/bindings/serial/rs485.yaml b/Documentation/devicetree/bindings/serial/rs485.yaml > new file mode 100644 > index 000000000000..65c6a98969a8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/serial/rs485.yaml > @@ -0,0 +1,45 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/serial/rs485.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: RS485 serial communications Bindings > + > +description: The RTS signal is capable of automatically controlling > + line direction for the built-in half-duplex mode. > + The properties described hereafter shall be given to a > + half-duplex capable UART node. > + > +maintainers: > + - Rob Herring > + > +properties: > + rs485-rts-delay: > + description: prop-encoded-array > + allOf: > + - $ref: /schemas/types.yaml#/definitions/uint32-matrix > + - items: > + items: > + - description: > + Delay between rts signal and beginning of data sent in milliseconds. > + It corresponds to the delay before sending data. > + $ref: "/schemas/types.yaml#/definitions/uint32" This is not correct. The types only apply to whole properties. Is there a maximum? Seems like 1 sec would be more than anyone would ever want? > + default: 0 > + - description: > + Delay between end of data sent and rts signal in milliseconds. > + It corresponds to the delay after sending data and actual release of the line. > + $ref: "/schemas/types.yaml#/definitions/uint32" > + default: 0 > + > + rs485-rts-active-low: > + description: drive RTS low when sending (default is high). > + $ref: /schemas/types.yaml#/definitions/flag > + > + linux,rs485-enabled-at-boot-time: > + description: enables the rs485 feature at boot time. It can be disabled later with proper ioctl. > + $ref: /schemas/types.yaml#/definitions/flag > + > + rs485-rx-during-tx: > + description: enables the receiving of data even while sending data. > + $ref: /schemas/types.yaml#/definitions/flag > -- > 2.15.0 >