From patchwork Sun Jul 10 16:44:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12912578 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 341B2C43334 for ; Sun, 10 Jul 2022 16:47:28 +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=Gkh+8TBtHrqe1YFOD/HuoZxW8gzSvq7B6SBXdLnWOvE=; b=N2SBo8ry4dIVux 1sw/fcnuNPj4LCjX/H1PaNQ1gDJ2Rxg/C+PZzXIYzccnxzAI79qtQMig95j3kgr4FWxYRG2EaVYi3 qlCa6lEjvhqGrp9T5GTvEk2SQX8M2wHVLkVTmZiTCjcuJeSVrLk0U9dla9sgCFDNb5BcEX+sJ0piN EPbPEfEJ8+FoyywdoysqtTfzZ1GCQa9Zp725cTf6gNXJ+9gCG4Wd81rUsDr/Syre7MFg5unWFU3sL mrd+CczHPN5o/PetV8ZUCb46zM9esqhgZ/NLNvWw+1HpaF0LvmV1tnRd+GIeqA7HA1sd/+/FToKKs ADLkvi43uD5cAOQ8PQ6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAa4V-00CXm7-Ie; Sun, 10 Jul 2022 16:46:15 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAa3P-00CXCS-FT for linux-arm-kernel@lists.infradead.org; Sun, 10 Jul 2022 16:45:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657471495; bh=nYNKgNEFTLWJv70qJTgu0U52c7ApU1mo6Iozs+zcxjw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=YteHhjU8dVZTAIVPpyKB9v/uxHfFWo45uox51wUJ1dj6lJP0/WJelE057EyZmcLx0 0IqmUFoII0BaY/75ZD5+7SSc7ufs9wtX/0UCZYXcQAHyAfCQo3w7sw/ibwqI8Ocb2V Q3+Vlm+/Y21nBLkMbjoCVQ7QYD7x6PP/ZXkvsITI= 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 1MTzb8-1o1Kfl0VWc-00R3fK; Sun, 10 Jul 2022 18:44:55 +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 Subject: [PATCH v4 0/8] Fixes and cleanup for RS485 Date: Sun, 10 Jul 2022 18:44:34 +0200 Message-Id: <20220710164442.2958979-1-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:wgkedPKpLWO35Avvm9PJn8OvmcwTt7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Y+ErCeZeUjsVeOs5kAtfOnITLLodHyY1ru+FvSSG+DMHKVUvoDqGpdW+SF9e/R1w0Th4 e+GiS+PZUUWADlQaObLnKuHinbxfCMm2G7SLsfUVvvS7syk5LJWcqYTEJbxzClxxtF8Y3Bety T8Qg+ay6W4anIs1LBNUxG2NXvazJJ0BKohUfzyT8Uzej/7zt9fWLwdNCzbmtQpM5xP2hGdNJH LsAUC9/vXNHBhqpV5QcdEeTXqs/v9GGrvrDzJ7eIP6QOWpHNMT1C3zSw8pmu3rpjqi2QnqxeF ynKlTLco88OKfwRf9LxWNUbJU7zZM85RNnlgBDu6MHjUOQ4UjTynvaDgw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220710_094508_181920_AB82CFC2 X-CRM114-Status: GOOD ( 10.45 ) 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 The following series includes cleanup and fixes around RS485 in the serial core and uart drivers: Patch 1: ar933x: Fix check for RS485 support Patch 2: Remove superfluous code in ar933x. Patch 3: 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 4: Move sanitizing of RS485 delays into an own function. This is in preparation of patch 4. Patch 5: Sanitize RS485 delays read from device tree. Patch 6: Correct RS485 delays in binding documentation. Patch 7: Remove redundant code in 8250_dwlib. Patch 8: Remove redundant code in 8250-lpc18xx. Changes in v4: - fixed logical error found by - capitalize "uart" and "gpio" in commit messages Changes in v3: - remove obsolete patch (due to changes by Ilpo) - corrected and rephrase commit messages (pointed out by Andy) - remove superfluous check (pointed out by Andy) - separate ar933x UART bugfix and cleanup into different patches (as suggested by Ilpo) - put the ar933x fix at the beginning of the series (as suggested by Andy) 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 (8): serial: ar933x: Fix check for RS485 support serial: ar933x: Remove superfluous code in ar933x_config_rs485() 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: 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 | 60 ++++++++++++------- 6 files changed, 50 insertions(+), 51 deletions(-) base-commit: 7e5b4322cde067e1d0f1bf8f490e93f664a7c843