From patchwork Sun Jul 10 16:44:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 589330 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3F57CCA47F for ; Sun, 10 Jul 2022 16:45:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229701AbiGJQp2 (ORCPT ); Sun, 10 Jul 2022 12:45:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbiGJQpT (ORCPT ); Sun, 10 Jul 2022 12:45:19 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DA2013E14; Sun, 10 Jul 2022 09:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657471498; bh=MsWxBaLlxA4ELwYXkzuPt+y1986U/Jbrt8tDYt6WPtU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=ePqk3UCYbWhcEREOfn2BmyXgqSXhiA4giff//b8To8GFdDdl7w/8Li5xm6UorodsM WlGlY+UqoPiVpp9pASd3SI4y9ppyA/WhYgXpc+9y/iytVZMA+EzP3dYDENd9IGK0Eq NSP43hhHPlV+8Pi2JsQDoauZC/n6QVP8S5Tz2RHM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([46.223.3.243]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MvbBu-1nKXjL3YcY-00sehu; Sun, 10 Jul 2022 18:44:57 +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 v4 6/8] dt_bindings: rs485: Correct delay values Date: Sun, 10 Jul 2022 18:44:40 +0200 Message-Id: <20220710164442.2958979-7-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220710164442.2958979-1-LinoSanfilippo@gmx.de> References: <20220710164442.2958979-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:pS2amxHgDU+Wqa33aIo1OuacztgWxkio2F8l4JrUK1VzOdgcVA5 BHIxYGcVgBkD1j9QSuzO8Bi31IPuzNtlAVefpXKX1EgGeJXT/bcOEGRlCj3cXDs49oRryx2 +5EzF50w7rfGvw1ROEgQuRQZw9Ib9VsG/pOeOP063V4EEZtBlCqh5znEI1XfyhzByllDv0r oA0HfvHlEePKUN8Q8YXlg== X-UI-Out-Filterresults: notjunk:1;V03:K0:3JcwZC3pljw=:ia63mV8swlzNczAFBk8Rbt Wj3umSjlDASFbqh4PJMZtDocYNtEvRpvQgA5O4TL4jaS2UiWmhqEdukEOINLs255h0BGa9jvu 3hVBTijPiiQgbXlb5/CDm+FTfl82O3tI8B0F6jYfx73xxG3V+gMxkjaMY2aTIz1FNevAC4+0a CY3bnEyck1fAPTwXSXrg6XCwOPY+InmSj2zmXmGN3ZcHSdJtUEVuU2K4f+/+6Hk6zDAvhcjIS MxqUL4AyeJgoANSkp5R/llwGeqh+RjO/PWjCNWB8YGROwDbXR+8XdszBWGEH2N1isBzK0O6WG CC6xUSBr1PZdhFHI6sGAAQ+z1AV3tcVD207JvHemBvWfbo+LXGp5lbFHRIgsue7oYVQXvYp9W D4cC46KQdKHLhKJKZFx6crAWY8rHnpfqsSY5C4Jq7pVngBOn79qAhGfEkpUZUx1B2T5QQgXor QFk8WyhmOvfoG9hOLDOY14Z10b7GFQy8oWVV0U6q3TSnev2ErobCzW8nroGaD+BKrIGVWWFCp 5yJUrQCwCVmFHFHVtKpk5X+0/3pXDyGNEhj6f0fdFhx45WvA1TzGani0OT7eN1X0zgBc5Ip9R IS5d9IECJWaLcXSKF3PKQK31AYAxh/Q75cgDYCvbiAk+vu03bUUih0Vq+6JC2gcynJoY8WZ+H m90KB8TJ2HuM6Fobk1w9uClnnB65mT0i3GcZKpua1iIQVn6wzB1bgL+m83t0eqb/DSlIvavq+ NLvR9ZA8qzMuzONlYjfigjeXL2GX8BwhcwD595bR3NfPZ1aBpTJ26rv4BHvEAC80YEOQHoCeJ N3zROmEhqwwHiSRSikJyMe5L+/fCeyRrZuAzU3hNCZtAHMzQ9gz2Z2CkRo7OjRyPL3LIBPFVg wYOMY8K5DgIsUFGgdxoiS4d6Q6fbavyXLMDTcSA8gOI4cXsBWrQTe8g9yasmDH9KY/KuoGkGi UjRWZ1lPhrvBNpaDbeD+qfpMRPw23KnHHOIhLwbzXCvFUoctH0TiDRjwD3ZcnHlf9evGuK7cN UZr01oen8zpTL7RgFaP1oCt6l84DjBp/xUZWSCmLraGrWI7o/aZfY2fRhsHffqKaQlZHHh01Z D/TlArsNIXMrLY8BKMumZfi84Aj+7zzY1Ql4rtOoMfVENeOwg2WK7shFQ== Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.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).