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=unavailable 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 3FD12C2D0CE for ; Tue, 21 Jan 2020 22:20:18 +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 01B6E217F4 for ; Tue, 21 Jan 2020 22:20:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qffPlr5a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01B6E217F4 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=RUixdyOJTQlYyvhCqnAT3lKGgumYs9m2Nku5Z6LW4AE=; b=qffPlr5a4JvMPy 9X4oonwhhEkZ8PS1/T89XI4d7IYVRFxdsPsQgxW35w47bpIHSSacICHXN+oiL93+lS4J5LtYycj82 4HGiuSMRaWlXwMpoWh88BfUz24XR90wir7ea9z2G4yI5tQz0o+kAs578tBO7BftdSNTkWtLBcZffg VTxeqQ2kA2eiUga56SUDvDI7V70LlDVEyyNtpFqQ/WXhkpj/TwQNDKIV4ftO14U3Ms6Ig9GTiUi+1 x9Wr/2DKOoSrHAC0RXbQkI98BAS7cbIx7YK83/q96Txksm/YVjf+T76sgmNlR9LpDaVvcCp104z6L ZHYKR6w7IQqoqhqB8WnQ==; 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 1iu1se-0005dS-St; Tue, 21 Jan 2020 22:20:16 +0000 Received: from mail-oi1-f196.google.com ([209.85.167.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iu1sX-0005cO-UU for linux-arm-kernel@lists.infradead.org; Tue, 21 Jan 2020 22:20:14 +0000 Received: by mail-oi1-f196.google.com with SMTP id k4so4229601oik.2 for ; 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=OlSyp5aHKlhno3MkOR3BcClmoCztsZYQ+COhI39JLflTNb9pBMVhnFOW1EnYDGHOol lasThYmoWaOxuuL1E/gMelJNe7nw5vfnIRzUCB4yFVfAJVy5GsgkHbLGk1CSzf+MYEdx Af2wM0BFMVx2PBZTUpOJwoqL1RCBn8kiPF0AtItWuvV3qBjvK32INhmQwL9D7YfKKOBg dgzhDV9iCL5PYaczoQInKjD3SRt8HgTtHJU3iIdPp6UP9ukXPni6WqjSdON++rh/vbRs Ci6fw39e/uuS06OlggNP+X150IXw7w67Iy3mVLRg4I0Z/b1YJZU4Xd6EDobph+JZFwsh yCbQ== X-Gm-Message-State: APjAAAWc/NilSVxjmBHOlpUJHK0dlOKi6VUXqpgtgm4VeVbk19Mi1wrK diBcqSqUCbWEYU1T88DOdw== X-Google-Smtp-Source: APXvYqyA0cFBVl5WxqRWUAajmwQG24um1yPraaZ5cnlqeSKW61xBpYW8L1xuloSvzFgFL8RaFKDW6w== 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 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-Disposition: inline In-Reply-To: <20200114123329.3792-2-benjamin.gaignard@st.com> 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-20200121_142009_987770_68B4FF23 X-CRM114-Status: GOOD ( 20.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@arm.com, devicetree@vger.kernel.org, alexandre.torgue@st.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, erwan.leray@st.com, mcoquelin.stm32@gmail.com, linux-serial@vger.kernel.org, fabrice.gasnier@st.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel