Message ID | 20220703170039.2058202-1-LinoSanfilippo@gmx.de (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 4527DC433EF for <linux-arm-kernel@archiver.kernel.org>; Sun, 3 Jul 2022 17:03:30 +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: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:In-Reply-To:References: List-Owner; bh=mldRfE5k2qS8yZLsiBHdN0ovCPYq5uydfxviA78Vimw=; b=wQlsdHFGQV4nRe /7U4YDaUJJ2nePKBAu1FcgsC6Pyn5SLzeu600oA05R22oBYRSTRUvKHey4tvk2enNw7T4eveyfaDk EUmA05LXVQL4rjM+uifbNeVXFGoiFluCXYgOMxUfEsBbFSvieA+81uMJKbGOH9lT3pA90sO/gIapE Vm1vfNdMUkagg6XK9KpPT+D8o0djhtb7UNI6dOkZnpENsLqhxrRL1A1bL2hq2ZNRE7zDUC9wpZZXd QaakTEbk0q9e4QgXpwkoUo2UywqCxNy7vWpR3fxaEQIoVJUQYhbxf5nfAtigJgjMyoaCFpGIdU+tw TRD5c3Y7Ws7eXZlvqtug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o82yr-00HMZ2-LM; Sun, 03 Jul 2022 17:01:57 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o82ye-00HMR1-G1 for linux-arm-kernel@lists.infradead.org; Sun, 03 Jul 2022 17:01:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656867690; bh=A80IEaOvnAlffKMAOwHrks5ajbBOXblTI1M+kCbuuS8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=hzPKHzZZbKBd6lfxFyRYOjCi1H+RCoOd0a+IYJcMIyxE0gMvGq7/7j+Qf7el3FR1k fx7JveZxbfy7sbN+SjZQiG1yh3kAuTlRSak/1KqVmGNWHZesy+WM7+v0TfqLbWFpaV wkeVyQsX1143pJ/ZJClMG72uXCzhCa7O6E3vDnf8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([46.223.3.210]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MYvY2-1o3d6X3Cca-00Uutl; Sun, 03 Jul 2022 19:01:29 +0200 From: Lino Sanfilippo <LinoSanfilippo@gmx.de> 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 <l.sanfilippo@kunbus.com> Subject: [PATCH v2 0/9] Fixes and cleanup for RS485 Date: Sun, 3 Jul 2022 19:00:30 +0200 Message-Id: <20220703170039.2058202-1-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:+BIVud8HUyspt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I4BjIYLZs0FCxQpzVJ/6qkOHeIjK6gXDVfLRdpwsfhSi/zKYw5QlJr2YoHR X+ouLlpcqZvKhLIYbnrFC+bZpiKKFH1kqKL+eHgLVMmvUxyXgtDp+jyA19acFAT1NAeIOqBNc CD64c7cT9IrOvLzPOTG+voYkGRT888q5jmVYn6taOGmhHiAoS2xpVP9QhmU31hHGyWzqwSYK3 LiER0SUUem+zGwKj1ZTnkOof12j6Wyw4q7lyCOux4B6nRqPPLR0vdCH6SNaQ9GjU67isGFUa1 /IgQYBfhiLRYiSN4RTQCP8rSDbTytQwUQcc46pRFVnrvfDFnTX2jNaODQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220703_100144_876522_06C4FF86 X-CRM114-Status: GOOD ( 12.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Fixes and cleanup for RS485
|
expand
|
From: Lino Sanfilippo <l.sanfilippo@kunbus.com> The following series includes cleanup and fixes around RS485 in the serial core and uart drivers: Patch 1: Only request the rs485 termination gpio if it is supported. NOTE: This patch follows the design decision that "rs485_supported" is set by the driver at initialization and cannot be modified afterwards. However the better approach would be to let the serial core modify the termination GPIO support setting based on the existence of a termination GPIO. If "rs485_supported" is not a read-only value any more in future the logic implemented in this patch should be adjusted accordingly. Patch 2: Set the rs485 termination GPIO in the serial core. This is needed since if the gpio is only accessible in sleepable context. It also is a further step to make the RS485 handling more generic. Patch 3: Move sanitizing of RS485 delays into an own function. This is in preparation of patch 4. Patch 4: Sanitize RS485 delays read from device tree. Patch 5: Correct RS485 delays in binding documentation. Patch 6: Remove redundant code in 8250_dwlib. Patch 7: Fix check for RS485 support. Patch 8: Remove redundant code in ar933x. Patch 9: Remove redundant code in 8250-lpc18xx. Changes in v2: - print a warning if termination GPIO is specified in DT/ACPI but is not supported by driver - fixed commit message for devtree documentation (as suggested by Andy) - fixed code comment - added patch 7 Lino Sanfilippo (9): serial: core: only get RS485 termination GPIO if supported serial: core, 8250: set RS485 termination gpio in serial core serial: core: move sanitizing of RS485 delays into own function serial: core: sanitize RS485 delays read from device tree dt_bindings: rs485: Correct delay values serial: 8250_dwlib: remove redundant sanity check for RS485 flags serial: ar933x: Fix check for RS485 support serial: ar933x: Remove redundant assignment in rs485_config serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags .../devicetree/bindings/serial/rs485.yaml | 4 +- drivers/tty/serial/8250/8250_dwlib.c | 10 +-- drivers/tty/serial/8250/8250_lpc18xx.c | 6 +- drivers/tty/serial/8250/8250_port.c | 3 - drivers/tty/serial/ar933x_uart.c | 18 ++--- drivers/tty/serial/serial_core.c | 70 +++++++++++++------ 6 files changed, 60 insertions(+), 51 deletions(-) base-commit: 7349660438603ed19282e75949561406531785a5