Message ID | 20231209125836.16294-3-l.sanfilippo@kunbus.com |
---|---|
State | Superseded |
Headers | show
Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b="iN/T9odS" Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2043.outbound.protection.outlook.com [40.107.7.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 601F610EF; Sat, 9 Dec 2023 04:59:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=km01yQ9yVNEYXOgIxCwmP1pzGCvvIGZUbzcX1hghw9EKddmQbhwA6OAfMXhmrsyo0fLjdTXgjgK26hdH+YBlJmtYdxk+CWm6M3T54kO/DtPeXMBRXYguo1oUsag89J5nf+TI/PzpxhbstA7QZ2GgnoF/7F72jwtFnK8slHS86OSItFrEd48VBTBeW2M916DeD3KJjQRw2r/GZ979sciXDAiCgrgKUylP76iVdabIF8SRVs0ezyp+l+zFC3qpICy+ycWQN/aL/11w4rMruofYLC2nSGqKRCIAFLDhFRNEth2cW/R6FLkKOTG4bulQMM48iquElULl6DjDmfZoNiNTBQ== 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=Z37oomI38hjFz0c5Y/ltYnUcrUN1/Aa6wnLuGYM+HyM=; b=S/Gx8k0hUVgVTUy8L1XMF33yckusKax+81Npge1f1C5SSQROHYMiYP8vCty80m3Wk4R27O89VSUeLwLKtaXsdxMC5APr/2ti35yvWNs0vDSSG7ouWdhnPiWxsbcUoO2dfNB/xLJsJKQxtDGT9mf/DJWP7GZ1kknMPG0qtkOktWtiE755/1SPxGQdD0DgYdg//etlLvubez7OJUCo75tqTb0JmigCZQbVGIASVrExssrGE+icgWsCbriZGA9lYgWoZ0zD0A/lBBm+03l0BpkD2kXbE/EJuKDjbE/KYWBf0DWZGvKbsgYK6/nkouFox57vzSdya0x4xPXG3vIGluzJ7w== 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=Z37oomI38hjFz0c5Y/ltYnUcrUN1/Aa6wnLuGYM+HyM=; b=iN/T9odSKbrEfaKHeSPoC7/9HENUKVQvDN3haM4euPFn/STMmcNr9XD+WfnPfyWuEkK1/qXjwvJ3E0xN+PsJQ7XLGLqbK9FD8ZUvK7IfbwzU1ZZYmvphN+vRB5ezrVYQ/hjaruydWZi+asRWEYYrl6oIFYCkEWWUVAOPkD+AZsU= 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 PR3P193MB0555.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:31::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.29; Sat, 9 Dec 2023 12:59:17 +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.7068.029; Sat, 9 Dec 2023 12:59:17 +0000 From: Lino Sanfilippo <l.sanfilippo@kunbus.com> 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, hugo@hugovil.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo <l.sanfilippo@kunbus.com>, stable@vger.kernel.org Subject: [PATCH v5 2/7] serial: core: set missing supported flag for RX during TX GPIO Date: Sat, 9 Dec 2023 13:58:31 +0100 Message-ID: <20231209125836.16294-3-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231209125836.16294-1-l.sanfilippo@kunbus.com> References: <20231209125836.16294-1-l.sanfilippo@kunbus.com> Content-Transfer-Encoding: base64 Content-Type: text/plain X-ClientProxiedBy: FR3P281CA0070.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::22) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: <linux-serial.vger.kernel.org> List-Subscribe: <mailto:linux-serial+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-serial+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|PR3P193MB0555:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ce4499c-d4c4-4557-f7f8-08dbf8b6a704 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C0XgYvWmPwYllDeKHmlBnCjqM5UJMnRmL00aS56ohJnCqDiVvMTW6EuLzvhkjwLwcO66rZJwfh+xypL9bWWQO9JrCavfIoMl5Qwks36STgjWCrOSn0CfJOcCD+W8bp3U6iF52WOXpTPc2ypyft15wYkqkl4isnixqMjq+ybE4VWB+5xZUVuTOKGHv9SE0l3wBXK7lDPZWgT+yJ+Oft7C2tXftRDCJv4Zuy3dwXldFTYPFvi1JS/pTTwxVuij3Qhh/LCdpDl9wbcInLLe1rB9A/nZOjT1P4V1X5z+3Kl1qkms2fcz4BEuwBt97obvGhHzpGYjKuzDekxgyJ5tryqKlj3yjvr6qH2+YoiPq7a7ulMj1o3fpp1ortGxYD4w44RVewy9DsQxbyJ35M4WABWP50abeR59QxzgG9UvB2iLg6COMyt6hQwRXpIS5XyTudGSn5SLSLllRtnrGi9KS/sO+CVWDphHb58YqSVp6WwnP5hm6UUQNsIQA2sO2Kd5r/oQ5OWRF0dka4nRXKRLNX5c368lkbr9nJi07dQ6omUo1OGh7fWeIyaWaIyW/u3L8Klh 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)(39830400003)(366004)(376002)(396003)(346002)(136003)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(2616005)(1076003)(478600001)(6506007)(6666004)(52116002)(6512007)(41300700001)(5660300002)(2906002)(4326008)(8676002)(8936002)(7416002)(6486002)(66946007)(316002)(66476007)(66556008)(38100700002)(86362001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TRLhD6O3YSlL0LsJvVk8dvlaZgDaHZIwG/+Uv7aNRkgEa3SDyjfoIs/btba63Kauf+e1629sKe8IeiFebrsNTZRmuZfKLWytBOiO9nxBlqCJjpYz86WhvDMcBfEan7LzRGsFJjj8Avk2cTtUw3wZ1oq57AMDGxg834FCs5hnW3klQnnw56FBnZxKVbTwMFkPkC/D07M52VQ/kMEGPpzYJDhLHQVgd+yIrbhoX+Wg6dJrlvA4chhNE6Ght/sp2LUf/YhJfFr8YwgtQ94+vnX4Fe34Mjsmh681xcnIdJ6QKGnWt6lV0LQWtKgZgk6Cdai0EmjmdZu04YeajbvybtB++A6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MvrtJnO9F6pI/ibCpHQeSWzxeXGK31D0+JKXELhQBTihzmisjiJ4Li/KzlsYxQUEJyi+9JR6FyWK1A31YeIb6T90BkFzgFJjycB10OftLCLmRFntsmBu2ObeThAOsseEaDldGkWlIhqWyTz+PyIHFUgRklHrVA04EBrxY32Qwn5au8BLMrFIZp7Musv1z80EnnuwWZEFKMHcsb8iGgppmn0aTCwoPQTiVNW3yOD+cNUDec1LL0T7ejLZ0bBnl X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ce4499c-d4c4-4557-f7f8-08dbf8b6a704 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2023 12:59:17.4954 (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: 6B7S8zfwk5RpG0mBIUuXnzWplIdW+QqoMgCI5sSAWQ3K7dusfTU80PsMI5s7MfLrhs6O4FoBH2ZjIuZf50ueHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3P193MB0555 |
Series |
Fixes and improvements for RS485
|
expand
|
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index a0290a5fe8b3..c254e88c8452 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -3632,6 +3632,8 @@ int uart_get_rs485_mode(struct uart_port *port) if (IS_ERR(desc)) return dev_err_probe(dev, PTR_ERR(desc), "Cannot get rs485-rx-during-tx-gpios\n"); port->rs485_rx_during_tx_gpio = desc; + if (port->rs485_rx_during_tx_gpio) + port->rs485_supported.flags |= SER_RS485_RX_DURING_TX; return 0; }
If the RS485 feature RX-during-TX is supported by means of a GPIO set the according supported flag. Otherwise setting this feature from userspace may not be possible, since in uart_sanitize_serial_rs485() the passed RS485 configuration is matched against the supported features and unsupported settings are thereby removed and thus take no effect. Cc: stable@vger.kernel.org Fixes: 163f080eb717 ("serial: core: Add option to output RS485 RX_DURING_TX state via GPIO") Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> --- drivers/tty/serial/serial_core.c | 2 ++ 1 file changed, 2 insertions(+)