From patchwork Sun Nov 19 11:28:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 745339 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 E7545C5ACB3 for ; Sun, 19 Nov 2023 11:32:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232032AbjKSLcK (ORCPT ); Sun, 19 Nov 2023 06:32:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231898AbjKSLb4 (ORCPT ); Sun, 19 Nov 2023 06:31:56 -0500 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2065.outbound.protection.outlook.com [40.107.104.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 611E33874; Sun, 19 Nov 2023 03:30:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ffHUZxP6X1XCfwENwfK4oFGuJ3ytDTaGbrfzNgYGD+cOn+ITNMnnFf5i1OgDCLgrpwTnI/XitF2QbZXHg71830CLW0DR2/9OEg8njDYav6+40CrUcuLDI3/qpxLwoQ0eBS9NZydH1lYJsKkNXflMRozOm3IOanacbREMhF1ohEp6yw8wb6Krd2OXYccti6MwDM8erFFjoqDJ1YlbYBPNmUhn/ZDYrDA3Whc/d/+zLubp15NeOhfMRaPgj2MNbH3aVMSyYY/2kt0CvY5gAqQb25dquh1lI9JSrhvAvSBCb7iz5duy7zM6p5X74S6oGtHXyrQUD5Q7kbuGfYfXg6FrJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e+YOTlv4fFpBwWqW+ic1F06SjLNaWiy0dZ1p8DofigA=; b=f1WG+xBMj6csXQV9zqwj4yE8GJb7V/IpRuHWHQEkZF00uGWfg7Bd7i3bm5Ddm2+UD6le2SThQM+Q3Hm9jl8FafzLYSupVDeSq4sBv3A7eqR6BYTlBgExoPBjilmC3O5/ukUfz1i5RQzP8gMXrr8xkpljKbUIq4IIx2D3Kuao870IG9wH00zoxe+mrinrpE+QL29BlXkPFtwX8e12Njxwu0gb2QP2HBzw+2DcrZkrZ735RsBslMqflHIUg5PNmusi7ALhULTSgGZVba9sU0+lF8azfJC2GS2J3ETGVUyj2LPQbppq1ssA3V034ooBxekNjlhEq2N7dUhjBZmyXWvaWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kunbus.com; dmarc=pass action=none header.from=kunbus.com; dkim=pass header.d=kunbus.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kunbus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e+YOTlv4fFpBwWqW+ic1F06SjLNaWiy0dZ1p8DofigA=; b=nSbxM+LW/4pv6UBOyf4LbR2WM/WcSMszBIyBdmpMma+fphoScJx+uj9/a/IwjQ9kO3BfcD4kG09Eia4Iu/Ptm7u3O4wbvguyhBnJfoi+R6xQtG+np/OzrmFPmxgNb5aVfT0m0bT9hOv0EHGG89BtpO0OHQBXwmdLTGTiHgW5Nqw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kunbus.com; Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) by AM8P193MB1060.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:1e5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.26; Sun, 19 Nov 2023 11:29:59 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::653f:d0f3:e7f6:8c06]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::653f:d0f3:e7f6:8c06%5]) with mapi id 15.20.7002.025; Sun, 19 Nov 2023 11:29:58 +0000 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org, ilpo.jarvinen@linux.intel.com Cc: u.kleine-koenig@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, cniedermaier@dh-electronics.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [RESEND PATCH v4 0/7] Fixes and improvements for RS485 (RESEND) Date: Sun, 19 Nov 2023 12:28:48 +0100 Message-ID: <20231119112856.11587-1-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.42.0 X-ClientProxiedBy: FR5P281CA0007.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f2::17) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|AM8P193MB1060:EE_ X-MS-Office365-Filtering-Correlation-Id: d930aba1-4660-46a0-4232-08dbe8f2dc74 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ShozBxtbYSqDHKMI4XDiEgzdXLOcoWOqZdMOVNhvjzkI3t1dpYFtAPOSqQWIUTM24525ZfxvljgNEp03UezuhF1sk+frT+5Bm/vozW/hPMJeJZ2+1XDBIIq0INgsHba/lSwLIRWXnutpWzrwwwbrXZsLi+OdsRWcbaQfDMc6JEc1B5b9prxmTH0Sg2+UrAq6P/ZAMzI/0f7xSqhJfdrojwPzp8dS3S/iQSuXV3YWxaBhTX7VTt4vuMtr7DSrB0MWJGWal1JeqOSL3Rl1n9jvhykFQD2U1pGq+yELhxFxgxjLkCcQGaMYXBhSHGVSjRUlXG2z+0zbnV70/HHlJTUwndORY6Xn2qotyoat3qfKOq88dMOSnMusK97KIankkw5KyYV1wTyOsvwCqcwthzLTET2AXDbsIFvWuRD6yd8nvYQTiN9RqKTs9VwvHAXTiE9gqGWtoqHR3/uyRD+zMngenWK74yklw3oyqqmgS3foesi+r0eyPlZsNmlFnl7LocT4IYzxRs4L4M7tioHLan6mP1OFRZ2fIFI6Qyyp0GKb50fBemLNvq0sIHBKdmQttIOa X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1P193MB0413.EURP193.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(346002)(136003)(396003)(366004)(39830400003)(376002)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(6506007)(6512007)(52116002)(66946007)(66556008)(316002)(4326008)(8676002)(8936002)(66476007)(6486002)(478600001)(83380400001)(1076003)(2616005)(107886003)(38100700002)(6666004)(5660300002)(7416002)(2906002)(86362001)(41300700001)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xj3QPg/EyHSliALTpwNZpgVbrtLF?= =?utf-8?q?pDc2pzFiZzBn1ToAvqDi0Aa7hvvbHHdvP0gRd7plPOT9auJy4hKhnDuzVDdgUrHIU?= =?utf-8?q?wVR4XQ/E6nwLrtWavtFbyRypNN9RZgYt3Nxc7kAzVebKUdJ9nRjVGutLlDLKc4ADQ?= =?utf-8?q?M/h2M+wHEnqNaM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+GwsmvT2xmgCsqCDc1KNKUdezlJ2AH6l2PH30Ogfj90zhiFw93cSy6uJJwZ?= =?utf-8?q?XLeniayWeynpbZa9+MSX8i/6ar8ONBdXYKhsSx2+nB1OygxdftEof5HUg7VA6Ep52?= =?utf-8?q?yOxQx/wfrsPdTEi2Y/wNYmfUnMr+WRKagp35OhIm+vF3GblxXXCgdNVdyP4A+gQBo?= =?utf-8?q?B0Cju2pCypicrTx4WRa65qQUcbZwTiPGG+sUerL564YzosvwRzehwXDhSLm9ltOJp?= =?utf-8?q?7pYsWk2glrSfrcI6ngGk6Q9uFw4VnfFpkJJHxGXD9Y+n+HZTAkc0mVcuJJ+sIDqe7?= =?utf-8?q?HMluPCvIXpyPLtjauZwHR9Xt1CfsjCoBk8Q2EGF0shSa6zL43c4BgVkeHlRwNAbR5?= =?utf-8?q?XrnT/M9jpvwpRZSvhmOM6GGLFuQ4CUilHW2Vdj+rxK2tdgXkQyRUQvwgbm36oovDf?= =?utf-8?q?RzrEJigU/frRkZDIaA1i/HJox0Md1ZbbJEI2O3v/XeCGw3L8OhOeydmtiwpBaXSca?= =?utf-8?q?ORS+fiQMNK0u4UyxiHso9m6dzS83R+basfPmagmEcEYPU84PygXwZswSnU0PgUI9l?= =?utf-8?q?Qqtj5lkSuCT?= X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: d930aba1-4660-46a0-4232-08dbe8f2dc74 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2023 11:29:58.6139 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: aaa4d814-e659-4b0a-9698-1c671f11520b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eV2C1C7sztmUDgEK4ed97WIHODYy1mx1DfVrh/+V7LuqpBvI9s5+wylvkofE8G5JWL4qpmzpp/zPe6w5WdEH2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P193MB1060 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Changes in v4: - add comment for function uart_set_rs485_gpios after hint from Hugo - correct commit message as pointed out by Hugo - rephrase commit messages - add patch 7 after discussion with Ilpo Changes in v3 - Drop patch "Get rid of useless wrapper pl011_get_rs485_mode()" as requested by Greg Changes in v2: - add missing 'Fixes' tags as requested by Greg - corrected a typo as pointed out by Hugo - fix issue in imx driver in the serial core as suggested by Uwe - partly rephrase some commit messages - add patch 7 Lino Sanfilippo (7): serial: Do not hold the port lock when setting rx-during-tx GPIO serial: core: set missing supported flag for RX during TX GPIO serial: core: fix sanitizing check for RTS settings serial: core: make sure RS485 cannot be enabled when it is not supported serial: core, imx: do not set RS485 enabled if it is not supported serial: omap: do not override settings for RS485 support serial: 8250_exar: Set missing rs485_supported flag drivers/tty/serial/8250/8250_exar.c | 5 +-- drivers/tty/serial/imx.c | 8 ----- drivers/tty/serial/omap-serial.c | 8 ++--- drivers/tty/serial/serial_core.c | 53 +++++++++++++++++++++-------- drivers/tty/serial/stm32-usart.c | 5 +-- 5 files changed, 46 insertions(+), 33 deletions(-) base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86