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: 589329 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 E4CEDCCA483 for ; Sun, 10 Jul 2022 16:45:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbiGJQp3 (ORCPT ); Sun, 10 Jul 2022 12:45:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbiGJQpU (ORCPT ); Sun, 10 Jul 2022 12:45:20 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 928CE13D47; Sun, 10 Jul 2022 09:45:18 -0700 (PDT) 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:wgkedPKpLWO35Avvm9PJn8OvmcwTt7xznmtVa+nKkgW33M68BHP ZOTxah1zmbpI3eJZ60nGpnZCrYBKwHL/83zIjjZQ7oCo6sOo5nI4gSVQhqA0Kr98Tg49Asr uh8fsbvXKF15XqwVML5Rb3KvRsFwW2K2RX/xcDgbyUrQ1HjvPwVJfP5CARmU5zGfCAJSTPP CDrOsrrZYtojQz8ap0vMQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:X51eDTNwzUE=:CT++cnbYZbV+o/7XPAqieW b+xwxsn7b28vk0rFPzsc5i6lQyy1Uy3e/RIVwBoZJwX8XO6sfJQZeNQqyf6lKVyV3Djc7H7iL UbM8AAAwWzhSGY1BcbpDu3qBWz0BabXCewxq5hHKrT7fYCESVT66HkXRYt4RNH7eudt06Ido2 1s2V2j5AAuKawyCktJhzoc/1TzxyEZLqgFS27m5yBvHdmx4B8OhOqm0e/ccUXvVwp+SNRJPyN rBY1LU+r5sescb/xl1VUvvxcTY0M9S+ob9Fb7Ed4jwmSF1io974+wO7J+ftHRb9seVo1mvIxn HU5zm6fK98qauTO2oLR0S9dzJf2YdPtUMwob10M1HbKfYjzeUgKaZC4/RcgcLOWg8i91JtQzN 797ZGDf2yMnFBmxw/0lkt8yra7QyAKPkwLj+wHgXpyml8iP2vemFe3Wfw5tv+3xFN6sr1IFMy FQE+ihIuf6CaOkDOPNWmST4AJU6qQw8vEMmiFOLNvbw3V2oAfpbNL6UTJ8FfnzSHFQ3wJaZ2Z a+NWmdnZaeAsEjIalLZZlPUqPAjveGIeK4k7D7iSXc7enSsGLylkMdFlYw8GE+QeYq9Bb40b5 Mp5IiAlfKb9mAFPsLR+sGsPxN6EoPoZpVslEzAa8KKPmBH4m64sEFKzxGrDd6uNBt/yrVMjMA V7eJekUzYmhxt+/1aEjEiRWB7WjSLwH5+t2NFXvKe9+Vmx4XwkcTyjLLvPfPcKDvKytH/NjR7 kzJZTJbi3fmPjBY9NqayaAmHqOadG5WUJAmC1V/miRJOHCmaOWvykYVGsAB9MzRxwA+feqZdb y+ZWtY+ErCeZeUjsVeOs5kAtfOnITLLodHyY1ru+FvSSG+DMHKVUvoDqGpdW+SF9e/R1w0Th4 e+GiS+PZUUWADlQaObLnKuHinbxfCMm2G7SLsfUVvvS7syk5LJWcqYTEJbxzClxxtF8Y3Bety T8Qg+ay6W4anIs1LBNUxG2NXvazJJ0BKohUfzyT8Uzej/7zt9fWLwdNCzbmtQpM5xP2hGdNJH LsAUC9/vXNHBhqpV5QcdEeTXqs/v9GGrvrDzJ7eIP6QOWpHNMT1C3zSw8pmu3rpjqi2QnqxeF ynKlTLco88OKfwRf9LxWNUbJU7zZM85RNnlgBDu6MHjUOQ4UjTynvaDgw== Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.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