Message ID | 20231018174840.28977-3-l.sanfilippo@kunbus.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-serial-owner@vger.kernel.org> 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 D5CA7C41513 for <linux-serial@archiver.kernel.org>; Wed, 18 Oct 2023 17:49:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231480AbjJRRtx (ORCPT <rfc822;linux-serial@archiver.kernel.org>); Wed, 18 Oct 2023 13:49:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjJRRto (ORCPT <rfc822;linux-serial@vger.kernel.org>); Wed, 18 Oct 2023 13:49:44 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2047.outbound.protection.outlook.com [40.107.22.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50C69B8; Wed, 18 Oct 2023 10:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nTdovfUV9LgZfPyETCwshmyT4G5MXBMWPB8GroxXedEznjWI/8bhfWebdMaaDIcfljSNaRUtT07l+2+jOEr7XVLdUTqSpBGbclT/4e1MoHHbH9YVXazjU2nOQe3lv1pJOo+v5Cxx0sfKkUC1E8jPIqNRhXAdQFy6SAYyY1+GNLEInKHnl+pBmgrOVvBzBUukin36FI/YiS3UaD1uo4/2ycENE6ILWRWRlkqDpsQNQk4A580R5KlUtwhqKqZPz3Srpcs5pJ+JgrUJWE72BCg+vPWX+40cVPtZByXBbkVX3migFCnHC/UiVT8nJHVkyDK4Pg8+4V40GNcBL6/ZsRYX6g== 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=dJ0aXBQC3DduVUO3LMOak7Vihfr1WaSMQA9Zk5Ski10=; b=nXmTgFvLZIHIuiNcShh44L/41ADMeqG6A7JbdxXICS5BpFmN9vThftEMkTqTr/GkJFTAfopYOqsvjjL36NXfmLm9r4guC45OjsduMYhZ/JFwLyIHvhC9kKVNrSN9dd+uPnXFYw4jJwD/vt+slV4b1aDVCftlRVi/o16gnm2ycx6q1/oFUBySChyJdWzSztY/yN448bF0p/U8agj4ldtpTHV4xe3VOd/ho06wzNZ/Yo+INdlgGqh9Ia9J/dCDLxuJoSqAn8S/C/B223c+J7NriXPrcAwMaNXqHWII+ROz1Bb938iGSWITtCIbVBFgkgMZsFpg9VBjLuCbSbNyd5lmtg== 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=dJ0aXBQC3DduVUO3LMOak7Vihfr1WaSMQA9Zk5Ski10=; b=N3IkT233IuCFcWwVhLskZ9j8inzLxwpOuutBhIZMVWzqCqUxwsLzYdU2ws80leLbXGzXlS0saeeK+G3uRu1pw2dyoCAJmEzL+F1+AACUV725qA8Jx1X3U2HNo4ayU3yFBUSCrg4KpqZ9GCQvWR3qd7KdqUXlh4S7GBIk/vDZ/tI= 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 AS8P193MB1478.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:350::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.23; Wed, 18 Oct 2023 17:49:38 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::550d:2425:c0ed:3e59]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::550d:2425:c0ed:3e59%3]) with mapi id 15.20.6886.034; Wed, 18 Oct 2023 17:49:38 +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, 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 v4 2/7] serial: core: set missing supported flag for RX during TX GPIO Date: Wed, 18 Oct 2023 19:48:35 +0200 Message-Id: <20231018174840.28977-3-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231018174840.28977-1-l.sanfilippo@kunbus.com> References: <20231018174840.28977-1-l.sanfilippo@kunbus.com> Content-Transfer-Encoding: base64 Content-Type: text/plain X-ClientProxiedBy: FR0P281CA0130.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::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_|AS8P193MB1478:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f5d1cd6-6f42-4737-f170-08dbd0029906 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gD6bpCM/evei2bhCdZ7F7S2cX+acAS6jdVrtZ/yCNQqBdKY4q8FrlsGBBzDA/baqB0N+Av4jxwepLwTa9OcZHptcHQ8M52BYub7OoKjUOk28DzCqQ0W6emJXLMjSJfVbAH7eg/p85P8x1tb+6NF2awoxYF3LUXEp1nRPxBhQhWAttEkzTNKXDZbcMCZtQxzLHoWiFV3x/GLj5P2bgPzNQgwPnHCCMReauu7IHLbYZ83sTNNFYXNyRn/IIRmpre6nK4dbIzX9j8jKwxaPtLmLdKMavycowLOi+4pQhsx1dQrLnSNxDP+XMLCrMNGHhK6Xz+4UMWqrGSnLHadrMxHkhhnMDWLp1jc1ynHxJtNfRRsjH6718o61IkG7vmBO6E9CZvmS0vayqcoMiRwz5S9SUO+qYSiaAe92q1nEFEnCROEqO8Cn05TLx/VtEw7//GvnaDbavhS4ur//D/xs7yfjNiHbudMn71CQ8PeLijeHi4Nc5k8eU3Gi0SPMv0Ye4N5/txz/ZWZQWcJZgwQyd4aotbrvEVAvJ355ctGu2iJ+31m3F15e0IsJHvTx8e/sUpVC 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)(396003)(39840400004)(376002)(346002)(366004)(136003)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(36756003)(66946007)(66556008)(66476007)(86362001)(38100700002)(1076003)(2616005)(6666004)(6512007)(52116002)(6506007)(7416002)(6486002)(316002)(478600001)(5660300002)(4326008)(8676002)(41300700001)(2906002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bbVuxL6ogjdrrz365fPYKfjbqPyyvuqLtYDvN3+DznTrwTx8YRhIc8wqI8GSlr+/AS+L1E2e0/dyY1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1hH7snnZrmGxkQQcccl2L2aNoaUR07aAiWbuG30aP44RylRv9+sAVculGl6bonWq1HLrl5u+tztOr2EeaznqGXR1IVOAjcNjC04ENZ0H7WXmr0gPOaHPfvKc59c9xAAnS+MlnNGIHkIORYjLhL1Odm59ug8Mu9/vHCTsNVYfqEoFjJaI/gS5zI7LbHUnHrpGy2uN79rOA+UXWerZMBIqjAJFw90fuCg/D7Nz7L8DfjOR7fc+xlEg18o0znO6h3+lc/R/hzN/QYI1Nyph9w/5gKOAV5JkbyrMKpg9sz+7F0vhZ5si3ayV7Zn7Y4srA5B4i4UQZQp3PtyvP5qKcWYf3BR7axQu4X29x78pRZxpwowUbi8G8lakv+Fb2si9fCqKpK79HkKh/RfD/UObA375usbuwt8HEv0CEtV79PX/QnfSyC2S/dk0Yi5NJAnstZGKy82tLx2pOi308pY9Xg8LrrZcuL/zpwAKg2qnGVdBnGqtoeVJPdq8rE2RF2fo+GhYnrjCkZe X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f5d1cd6-6f42-4737-f170-08dbd0029906 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 17:49:38.0434 (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: DhogkkMz2tk0H78vxdgDXmW5bdVXcvn5kX6Ku5icSHLJhcdIssMHw3DpyiJgbiI9jU6rBs/tKbRKLlq0xM14IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P193MB1478 Precedence: bulk List-ID: <linux-serial.vger.kernel.org> X-Mailing-List: linux-serial@vger.kernel.org |
Series |
Fixes and improvements for RS485
|
expand
|
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 35e014f83465..ef9e9014bfab 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) port->rs485_rx_during_tx_gpio = NULL; return dev_err_probe(dev, ret, "Cannot get rs485-rx-during-tx-gpios\n"); } + 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(+)