Message ID | 20231018174840.28977-3-l.sanfilippo@kunbus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4963853vqb; Wed, 18 Oct 2023 10:50:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7z3Pyb8IGzJAJUMFNwT9JfFhsCy8f1A4jh+iEoU7xrItrSabAN1HKJoW9hTv4Dsq6lPgO X-Received: by 2002:a05:6a21:3d85:b0:15e:108c:35b0 with SMTP id bj5-20020a056a213d8500b0015e108c35b0mr5578540pzc.4.1697651402835; Wed, 18 Oct 2023 10:50:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697651402; cv=pass; d=google.com; s=arc-20160816; b=bFdE7w11G99HJpOR0wtAWn7rFddeWbECDDPPr+UBSejRKVzoFNDgCPqBVJUdxyoxxC Fb/MY/CWgqmDoC28+vnm5/xxNlbOXLmQTiXAJlCThY/ix0GsbAPyllZKDihiDqYIHgPD Nwf25sFCXUgX4Pfap17l/VTuJH9iOjmX5kSuPCTyGwe8TrPCtRLatfKzEBstHTLYvS7w sYT7JQCZCXf6W+5NWxeqOY6e6u6bDarp9NwDSA7eGUlDfEOhMJ7W2BK/5MLJlNUkvDDf yCUhTYD+imAzsOziKAdsglTrJAo8i36PIxVPK8DDEZ4S5XsyP++o2Cp/hnvs84AIlgzQ 8DwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dJ0aXBQC3DduVUO3LMOak7Vihfr1WaSMQA9Zk5Ski10=; fh=TkiyChPg6bbF3HR9T06bpNLcepPHbldn/GrIZCqgMvI=; b=VmSP5mutqU90K7U5etsUTKhwVJUg12jJwfTV1Zf+AJue7Q8atbIJ/HI7D7Hscv9D3Q uIE0M7jKeCMo53g5tHxn/+SIaI0feE5QGr8a7ArpamPTneXhlmJdhQ80oNR+AdsKPLNF pidl53Ff9ibgXdbGw2HSy00xZBVj7RSw2bbRkdJWRisqKSvmjDxAXxvs8cms212WBVeK yr/VKRS+cej0DffOSimfVNLLpVNPKp64vnS5BNDgfK3DE4Pt/6NLj/57XT0Mya9mDM6e vhu0HffWHKMgSoc+Dy5enH1VyEw2kPRBEjyljpYEQofgA7lTtfLWN3tZgjCBbcM0wMBy mlPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=N3IkT233; arc=pass (i=1 spf=pass spfdomain=kunbus.com dkim=pass dkdomain=kunbus.com dmarc=pass fromdomain=kunbus.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id kb1-20020a17090ae7c100b0027d84544288si352127pjb.177.2023.10.18.10.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 10:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=N3IkT233; arc=pass (i=1 spf=pass spfdomain=kunbus.com dkim=pass dkdomain=kunbus.com dmarc=pass fromdomain=kunbus.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A58B281B94F9; Wed, 18 Oct 2023 10:50:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231284AbjJRRtz (ORCPT <rfc822;zwp10758@gmail.com> + 24 others); Wed, 18 Oct 2023 13:49:55 -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-kernel@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/dyY1w6P36wlIPzblmCKf285tjOjOOuKhzFqJkIhzb8H+B5sIqWC8N8IYHpG4vLFKeWiPsB2/Y3GksQsI9Y1exor5ODIvd2QQ6uHAB4seYmrQdD83AK0qNN9zfWBaF7LQlMRJRuelz+ZZK/JeYEkwHr/rd3Kq/UOx5k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YfqEoFjJaI/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 X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MIME_BASE64_TEXT, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 10:50:00 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780116517515604236 X-GMAIL-MSGID: 1780116517515604236 |
Series |
Fixes and improvements for RS485
|
|
Commit Message
Lino Sanfilippo
Oct. 18, 2023, 5:48 p.m. UTC
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(+)
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; }