From patchwork Sun Jul 10 15:03:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12912561 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 3EEFCC43334 for ; Sun, 10 Jul 2022 15:06:07 +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=O0O3vQkhhdnRf1noE8SkDO2Hl8Rjq2hQXPH/vsOn29E=; b=co4oqHVEU/evcf LZB6TmfS1cQXeiFlGngmmhXETB57pYzoN0cDoqqKafzxS7/N/5gYWpH9vNed/EomTb/oUPVPt88T0 4LEllDUVXqpTLJA09Qr27LgfRZh2ZZjQh4Tbu1fNG4ik3jnVEJZGKIrnVIhRoThHRIztaUlt+hXPx PX2H6B8Nk13jTeyGfCW9pqQoWFpuVBRdWHKVgJuG/rVcZNN1w2raxWs/yK6rDe9wiRZu0kcyfOeEt JU0hhxkksv2CtH0mpHfs5OAUmN3B3nJCjj067FWrxVLOZPRLzuoalWZCUpKugrvGNsIQk2ogHSbDG RP84zu0l+qBiasrqqPpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAYUd-00C8oV-Rf; Sun, 10 Jul 2022 15:05:07 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAYTI-00C89b-CZ 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=1657465409; bh=bCCo/6Am2R09b4nHHeMnoc0FW6xyrYI6zkvE1m2Jm4A=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=Y/FtNncUF0YYrHQPa7Evn+Mb1X+P6w+n53UBeJWw/TLxD9fLIWe4cYb5JVkpuh/LY J6yKdBT8hBDADzp61Bd9gjm761JMMmgW8xDryyqHOI6RZZc37HF/F0KR3woiBY3qma a5S8c5/uYkYaBixTKAKVLnWbJMTt8MipDb/cI4CY= 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 1MTzay-1o16Gp0pN4-00R1T5; Sun, 10 Jul 2022 17:03:29 +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 v3 0/8] Fixes and cleanup for RS485 Date: Sun, 10 Jul 2022 17:03:14 +0200 Message-Id: <20220710150322.2846170-1-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:AQK75PXDxb8ruYEg4RoE/3q8W5jyQVLOL7VSy14r6hTADfPrxRR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kZHg1akzOtylW79Fxl3WsVUNsO2lmivS35ZFGneE8Azqtih4zUmRT7 ShJ44SyU5NSFj0kCy1cPTNVQ1JYVQL7dod037n/c9d7V+71dOSMBJRyedPiqid0xEssXHpJzu B/bBcL3c9S240qIDXh9PcCSAl6RYvwH88PeIV4UEIXgrCt2yF0x9gn9CtkEhdJqOU49bVXnmk 2XCJ4Wtp/5dihsnOrvhBsmfURyI7qp77S+rUTuceEwJjmEOiRjuqBprf4F5RCzGIL48zGYhrF W4Lz0XotMr7jvXfdNwrZsLz+FJct55QDAupfTMGhtfrPJkcXiC8DfoH3w== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220710_080344_758226_EF82EBC4 X-CRM114-Status: GOOD ( 10.11 ) 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 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