From patchwork Sun Jul 10 15:03:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12912562 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 793C6C43334 for ; Sun, 10 Jul 2022 15:06:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=30efDz6OjI5qR9cd/qyEYpIWZ3m7rcI/q5kq+Mj1wSI=; b=IAvvO33PsoHrNY 2XYtyIGhtz/8NdgDH7Qh9FN9XcKW6TOkXN/HpHliYwYc3Z0cEswSbEdp0A230/WRaLd+2OMcaRWhU H34gnzhyzPuFplLCAnpjmo57ZYUoa3tNJDGhJr7bSgGPPQEWxsNXdokCTsIzpHl0TOAeogV5hX++B iPCdCmWNVDkoCzXdPUYvPIPMNwyExRDCfp/Bb/51Pj7OoF0BtylB1H/Hy18atyUkKTCTH9lRed9ND wJ0QBTjD3CwfLDLtumQt7BxMY4Q0COvqIiwl+7Eax9PyPfYeJuAZZLWeflwTd0/Y9a7k7pCUNY3tZ 9OwrIgpGqdag2ZZw34yA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAYUw-00C91W-SK; Sun, 10 Jul 2022 15:05:27 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAYTH-00C89i-81 for linux-arm-kernel@lists.infradead.org; Sun, 10 Jul 2022 15:03:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657465412; bh=AdWDe6Q5QpRDiXyrdxp/60gdvK8IQ697veYdYB+5CPw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=RpDQmP9YpKA3kZJbp2nBYOA8WtEtCb+ZCafnb3qhJttYtVM1UlLmyID40TdkH8BhM FOS78SiPO674Vz7f9FQvUBtc+hGE56XwCU++wYVYY3kjdnWW2vHCnWhvPmWv7YnIq4 5hYhtjHJTHlYF4z+5XQPFj/cGCEFnggMxAnBO9iM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([46.223.3.243]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSt8W-1nzzoL3KHO-00UKK3; Sun, 10 Jul 2022 17:03:31 +0200 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: ilpo.jarvinen@linux.intel.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, andriy.shevchenko@linux.intel.com, vz@mleia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo , Rob Herring Subject: [PATCH v3 6/8] dt_bindings: rs485: Correct delay values Date: Sun, 10 Jul 2022 17:03:20 +0200 Message-Id: <20220710150322.2846170-7-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220710150322.2846170-1-LinoSanfilippo@gmx.de> References: <20220710150322.2846170-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dXxI5O7zP+dYAYJndD8Ym/eD/D/L8D6J/tsY9BKyF+Y5fAuBDQ3Ml6I33rX DMwUN9dhv24UvTH9oOLDtFCYPXdoYoFQZuSJr5soSdWSmkmd1VrVgw+HnHRa7DXjlRzcDmHU7 m2cBYrigKZy+cVEtDxjNCrW3GLlGhHCH8FxZHBwpZDm/9PEGOT99//9iRKt+Ik+hNxJBMfFHj KQ0lthjHs1O24SGddWAzqJhMtlBAVdXcbxOCpHs8FkZri2//ln5X0Pff2Fnvk8fpV32zibe9O WK1gKYj0CEz/GoN9pMWSSwiH0M4ig9QyNBIRl/Hi/UX0ygM/5cDOWpSHC9G+sPzVatYixPFa7 UGReiGg37X3D8DUx1HLKUKXT7Y3tbZS3Tagzxr1ivCHc1yC3z/2roAG+g== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220710_080343_618633_EB922C7F X-CRM114-Status: GOOD ( 13.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lino Sanfilippo Currently the documentation claims that a maximum of 1000 msecs is allowed for RTS delays. However nothing actually checks the values read from device tree/ACPI and so it is possible to set much higher values. There is already a maximum of 100 ms enforced for RTS delays that are set via the uart TIOCSRS485 ioctl. To be consistent with that use the same limit for DT/ACPI values. Although this change is visible to userspace the risk of breaking anything when reducing the max delays from 1000 to 100 ms should be very low, since 100 ms is already a very high maximum for delays that are usually rather in the usecs range. Signed-off-by: Lino Sanfilippo Acked-by: Rob Herring --- Documentation/devicetree/bindings/serial/rs485.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/rs485.yaml b/Documentation/devicetree/bindings/serial/rs485.yaml index f2c9c9fe6aa7..90a1bab40f05 100644 --- a/Documentation/devicetree/bindings/serial/rs485.yaml +++ b/Documentation/devicetree/bindings/serial/rs485.yaml @@ -22,12 +22,12 @@ properties: - description: Delay between rts signal and beginning of data sent in milliseconds. It corresponds to the delay before sending data. default: 0 - maximum: 1000 + maximum: 100 - 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. default: 0 - maximum: 1000 + maximum: 100 rs485-rts-active-low: description: drive RTS low when sending (default is high).