Message ID | 20231119112856.11587-3-l.sanfilippo@kunbus.com |
---|---|
State | Superseded |
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 10692C072A2 for <linux-serial@archiver.kernel.org>; Sun, 19 Nov 2023 11:33:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232070AbjKSLdC (ORCPT <rfc822;linux-serial@archiver.kernel.org>); Sun, 19 Nov 2023 06:33:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232047AbjKSLcn (ORCPT <rfc822;linux-serial@vger.kernel.org>); Sun, 19 Nov 2023 06:32:43 -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 CF9C71719; Sun, 19 Nov 2023 03:30:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kyVTx+9nf+1YNu4UDyoB3DuwM4uZYmtdbvV2F3+w+v7+JP9S302a9Jf5K3oTCAQkSLrCjbc9SmPRY8MfIr9Zm3lw/SEoy5kV+rgq17QnvviTUGqMRl8hRfE8z3JXoET96Pb0ZEKE2hWrVTTuAOBI8htD+F8OLws/jzhmZJQjuxScNi6HLun3pDBQF8sKyoTjpm91Mcl0ZqEdwMmYhG2ax51LiQOPmLLqm8oAf2IN2SLTmML97nGTtbFY8wYQn88gWOX8gTRdE7jWc1btu7geYSjX7UA8bFdymhiarTWQx2Bdm31tHtiCz/DldwcoMrsCs/fyDS8f0bZTguQU9WLUOg== 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=Q4z698JLUkkru96cdedTpremk0cvUbZVueJtn/hJiUU=; b=YhyjFFbqyLxAIVodcTCTBxs20OtFqsmBQXcBXpObk6jGg6ZvqWbOK+mJRiXD2icdq98ae/I3iSWYMUFvA0XeihwUTKRH8mllEApUB8WGoJ5uS78JpR7DH4IK7u6yCHe5Kg5IHCh1Lpx9Y0oLY+0AVnrNZR0vyO3GDe3YkjdQlvp1x+i22bzarcJE0PpLA07SGhe5CAvwPz0c6P6R9l7/0QsuG7Zsk4Ddw0fNMwx3f+jGQBHZo2dvSVZ4vNY/rpQbfdCHlgy0PKuk6IbPTFOkTPIwa7LvQX+Np+w2F5Q8E4DTe2vW+5gQipmfWn8aZ4MFCYLQmOTZES8gJQemoJEOaQ== 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=Q4z698JLUkkru96cdedTpremk0cvUbZVueJtn/hJiUU=; b=TrEINb/E6SkAAVfvMuGjiUF0lHEtv0uUHJskmVk0haC+N0Q+bhr1CRA3UHj1nVdp4wbV78n/jSLp0/hjfl/r8RR14S61/lwkRnQ+buDL/RxVCozejmvy5AYBz8rh3WiPVPVn5HMnVO041CoES4MqXQzXuj1jyQSpqCl3Yv5KOrc= 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:30:00 +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:30:00 +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: [RESEND PATCH v4 2/7] serial: core: set missing supported flag for RX during TX GPIO Date: Sun, 19 Nov 2023 12:28:50 +0100 Message-ID: <20231119112856.11587-3-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231119112856.11587-1-l.sanfilippo@kunbus.com> References: <20231119112856.11587-1-l.sanfilippo@kunbus.com> Content-Transfer-Encoding: base64 Content-Type: text/plain 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: 50846c25-e5c3-4f5f-0e96-08dbe8f2dd84 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1wU9hM38ah+qre32fsIhck9T+JgRUsfDwGKBAGGTvxJkiBdu4ziKcq/9DkObNfUyHyWbtznSjaDPTgnI5Ug9K/GN2DOx5vWyCVquXFVJkOPO1WMojYMMtbL7ntgpL4PDUqySMfd8jAZc1jVvNyBLqZ3JRRD+M/qTB4npJpXmMpP4tcJhvCqJ8/z6/kon4950XAuAZ/DDtEfARfEmeOkkzaEOeG3X2ZWZRqZ5VzZ9GnpTSgrLUJoGMp9TF5dO2nmOh98N9S+P1sm9qiNQo3wLPHWGKCLMhebwJRvBTzPXB17FoAVoGGx+f7IP5jiJ6PzqHoaL9/X74iRoS26ilNzrE7UJIWeHdpTNqB3z5TY9dWEWrERtyyMyrziU4x5VRQMXZFonrFRpgOU/pg7TtJQsODxD7r3vycLfFjoflzPBU5NlgzvmovtEm1niPhzDmu23mHjIg+8nRS+EEeVN0T2wxcdZdpe3EEMY+1FhqEhkYcC5rWwpePqyyIwRTu/PaMavKqaLr1pFanHpbxaJxKrH4k5VH3Xp8HK0GPoYbrDCAn82tcL/IL5NhrVNi3E/Br6v 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)(1076003)(2616005)(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: vFkRnIgn+NoC3iA19inS+7TqhV8FQnsMhv6+HkegsjnqLB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CBhgfsaMl5nTlj9ZeEGbhYhU1XU8/wGOvcgGhooxCZ7NbX8dznMlK2nPeVedVZlciEwCf29f7PrsJhrg13x1rUv+HjL1b0uOCAEQT+fObw0RFjj+VSbJXvFkPRjt0otSZ1XN017938x5pf9mt4mHTrrY3CaaAfNR/1NRL+/EuSiDmL5t7ig1/KMyqkH1c9RYvYp7Dej0l28XXiC1RKav+QDYKsgSoCuK7fSlvvu7i6OsngSo3xF51C3M5LfcMGHXqwVMbEy6MQ2Z08BJ6Heb7thwxx6xE6GaH5M5A/+Cqb3rzIPowpQjmxnl7eLb+u6Fi0azbbNhhqwaNWN7CeC8Yt8k0SjQMTsQWKb1ThNyEwavAx05fbXDafbLyyxGRXOxOTVQ+V75alO5fUYlOtLQ6k5ZDemUkIQN/WDRSBn3GwW21RbuW7Mn5utA+hMFAeuK73Uk8Y7aHEIVgteN/egLox1qXk7sNmwfqAkwDVXpoTGEB3ZqiweaWqK8fU2toW3FL+/rDkpvBxHC3gU2uYYAqWdw9Tr4vj9pD X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50846c25-e5c3-4f5f-0e96-08dbe8f2dd84 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:30:00.0566 (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: s2SJzB5xe3T+JWxFOwCI8xuJTUKWzCTA3KSFbN7RYB6noY3/5Nh924EPgc2H+ZWk/R49uetOrpWTlIJuVbNAew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P193MB1060 Precedence: bulk List-ID: <linux-serial.vger.kernel.org> X-Mailing-List: linux-serial@vger.kernel.org |
Series |
Fixes and improvements for RS485 (RESEND)
|
expand
|
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index ab766f48c172..af175c803c22 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -3627,6 +3627,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(+)