Message ID | 20240105141153.19249-3-l.sanfilippo@kunbus.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-17907-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6245217dyb; Fri, 5 Jan 2024 06:13:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWnrw5n6zFb/QCDQXGPfzjT0Oh6JcD8bG+DnW9Dl8psDWc0JQBvpSWNEZDkK7iEwjPb2DR X-Received: by 2002:a05:6a20:af07:b0:199:2ebd:cede with SMTP id dr7-20020a056a20af0700b001992ebdcedemr1000642pzb.36.1704463994851; Fri, 05 Jan 2024 06:13:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704463994; cv=pass; d=google.com; s=arc-20160816; b=zgNbQrtLoO8kyy+cpWPTVkJBMRz/gWs0iKlFSKR9fx5hoa0/D2yeoJNvujo7nEJNKF SEpBSDt7j8BqHuoX3cKY0B7jmqr0Wd3WIW/3LiHu+2F60k95WY4DSUOFKAoLiqW8Zj4Z 8b0uy01gQsd9yIPmOINJ5OUZvm12bBodXR5N/RAXrqs6Qo6H9plcx6qJ/SEpcUGfd3kw CX/NptJRJTeww/dABX1KbYDZGK7oJXssazePh2oCVPvPizWNAKVR8bBo79WEhXALX/71 b7HWwIZb3VWRm/g1yLYw+e3Yi1kOm72gmZ0mVdTwctfUISgVFGElG+SJ/au2E015NDQ6 XbWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=OncriHkcvWJWNFlfsrQo1DKSpaTIWLwBKZU4AvicFoI=; fh=MN/bkHGu84ooMMTgCiXP1oFxiryoF+JDoK0S8hA26Mo=; b=olb2qJhX/m7Xmu/tOHKKyXdudCvngQwKZ8ROr3dbGKrGMKsCRMutndb3eLynv7vPVX syBkiLi8Qznk9ABTqI86ZthZSrJVcis0Q5M2vgPeJxBTcfRRbAKA+DwAaT0KVQBH9dwH wpd48U57Mk7DwmV7wquimCLQOe/3AJFVVmyDygfOljO5lAtWXuk9aOQ6gCZ46xqjhqBu q2B9Wky1M2Nb0WmPzEVRCRpqirp+L8F1qJjzQGKZq+P4X48EWguyGN74LjJhAWanfN5u Lu69c5pIDbgD64Dv3DV60aUPB4Pcr9O60fjGINnCZPXh9yfHrx/uCdlulh7NTUbmhoKu 0gJg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=r7DJohUJ; 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+bounces-17907-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17907-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h23-20020a17090acf1700b002869d1b1921si906752pju.31.2024.01.05.06.13.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 06:13:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17907-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=r7DJohUJ; 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+bounces-17907-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17907-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9A719283C7F for <ouuuleilei@gmail.com>; Fri, 5 Jan 2024 14:13:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2AD32E822; Fri, 5 Jan 2024 14:12:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b="r7DJohUJ" X-Original-To: linux-kernel@vger.kernel.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060.outbound.protection.outlook.com [40.107.22.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85FEE2E3E4; Fri, 5 Jan 2024 14:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kunbus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kunbus.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ToW98U5UXN+ZU/GJpPLQhGwKINY+tiRHXkol8eSWxEiOqwlj5GWppMsBSEilxRsK56FLS8CviYjmRsXMzIqdyKtZjxRXn4NmQ3c1Jpf/h7qi/lmb6JZP/2yaQxDJXHhiWwdUZuutQlbBR45AGlQldmq7ZDroqdB7NidnvJL6DjDF+VDivaHBJOEC6mQv1cX473qdw/8yPu4l/jh94Lv8vVDAbxIqS6U0YxWpD1aftmVxAe/sF+br6TOmh9nbBArPZU6hMNSHKKWGGUpqdrIcyjWcYUe19Mlg00zptGtCcZIPWWjG4y61lPC4K7Yf/yXke8QnJ1F89nVNsWEc8m0Vrg== 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=OncriHkcvWJWNFlfsrQo1DKSpaTIWLwBKZU4AvicFoI=; b=oEx3SYztbzWEv2h9I0tmMgmESEASOXDa8hOqqMmcMopJs/s0pwZxsCi9Dhlb3LlLdAGkPJudLdetdLxvJjMs6Kc3ugZfm9M/0Z1uyf8QHAJ37rl1U2bTfXV1hiAWzmdfv+7delwJ+U8nupdCy+rzhq0TX5aueIu2xvI4kh2pb7yXEaMTLUCXOTEdP7XfPbC0tNc3mZcetgieKSKqt6GqN1aShGBXYAnnRXXZxXtQEpzTLgHkAIi9bwXRlKCssaZjbzg7WCrwv0jhsSptc1VmNy8Td2ulrTaf+Vu7nsM6PhN/uvPCHyj3efR1O8RH6JlVRJ+kP/a6hfnQOrpaNlmj2g== 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=OncriHkcvWJWNFlfsrQo1DKSpaTIWLwBKZU4AvicFoI=; b=r7DJohUJc6gEM0YnUOqxMDtK6sYWRq89XAF9H3Osx3p+qzV7sC1diuULSADMXgmBR7L9AzJ2nl5KfdvcH0mORpNgnlMVspClQww8+t1I4sGqcr3jO0kBs+eTWsEvC71S+je5jUjyllwRw+aV0LU/rYWQTlHsYRbVo2+16KSQPck= 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 AM9P193MB1538.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:30a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.16; Fri, 5 Jan 2024 14:12:13 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::67b0:68bf:2582:19cb]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::67b0:68bf:2582:19cb%6]) with mapi id 15.20.7159.015; Fri, 5 Jan 2024 14:12:13 +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, m.brock@vanmierlo.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 v8 2/7] serial: core: set missing supported flag for RX during TX GPIO Date: Fri, 5 Jan 2024 15:11:48 +0100 Message-ID: <20240105141153.19249-3-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240105141153.19249-1-l.sanfilippo@kunbus.com> References: <20240105141153.19249-1-l.sanfilippo@kunbus.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-ClientProxiedBy: FR4P281CA0327.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:eb::11) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|AM9P193MB1538:EE_ X-MS-Office365-Filtering-Correlation-Id: e7694866-e269-417f-ca95-08dc0df8505e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: osqh4yZfWZ4V17rCDgFzfUeyTa0shGbwc4I2+cxMyBdiiaRn1oew0RKvGyq9mCYf1lFRUylc3IckAF1L7DPbuZWQrpqxLXPowDlijlBWEWSNY56OdXeiMULHLcjjK2e15JdTJ21hE65RtnEp/CDytxiYKdFzDf/W29FNEjtLccRz3JfixEpnJOcczlEaFZG3XdYDAV0AP3UX5jo+DIju/rBTQkh2HBT2GyLB8Cxe1ahn67/8r1CK1MZHP4JCxcpJIHfi5t08v8xZeLCDw3iDOrTloP0HxKVe3AwoAEiyw1GL89QNPPnoiOpT8TQq/oiKnCs9H4jXIv4whhNHT6vOpERaoYLWK0rHOiYA2LpCGp9jDocO0FfXcq+nrAS0jZTkwdhr+DV5pKfpUd40sG6EhruIyvlrMbunHJi31AsDU3JwkoNAad2NhDeVPrhJwCe+4XxPpi2A4Se/HMe38wuuydQ/oxPqI7Ffy9IPM1U2YXkH8wEYtNFQnEyv7W49Au5aUG/ZRUWOeyIS+X+ufO/1lJu8Y/CcO8WN6VWQve+9AE5pGqHneV/+xkZztWw8SDMs 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)(376002)(136003)(346002)(396003)(366004)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(36756003)(52116002)(6512007)(478600001)(6506007)(66946007)(66556008)(86362001)(66476007)(6486002)(38100700002)(2906002)(6666004)(2616005)(1076003)(7416002)(4326008)(5660300002)(41300700001)(316002)(8936002)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Hd2iiKUuAB5wSO425yBwXa20HWD4?= =?utf-8?q?8S6SuMzK1qBk2jhDIk0nj+xDVA/Bv8LFuF+AMQRESUmxiRXzBQ1stILIsEc97iMBh?= =?utf-8?q?Ve533lB1iakJpvpkimb83SPEn+68du0spXf8LkliDH24oLAeXQ9NY9K5dqSTS7R3v?= =?utf-8?q?AZwTL1+PXu69ksUrLq+Vq8v2l9LBPL2oadGLxKwqMkxVSDraIlbeNJvTl+dN3MDcD?= =?utf-8?q?H3njTRuKfRbpfOUTCuKvjAWYGxA4U1bpD10n8EoQ0mVgdHwMt9+OCrNTqjv4xujdK?= =?utf-8?q?wpLdYpDrCKfA0nKw+w8TomhKV8pO5wNR3E2F57jB4DDI707JGxPIonaEpy0xw5Ey2?= =?utf-8?q?HON/O//GOUVJazgscc74OlM01C2Ysob9XiqYgq4NqAF5Q0j35EUZMgJ1zlTsrguWA?= =?utf-8?q?Bqk4yqvo1/1O8e4iyuQwGUAuPvN7jZlq/SKizzUTvR6f0Bn43SMu7FfYJBKynsnWP?= =?utf-8?q?jj00qAhNl21Yrfsehzzif2y0r7nELjXzew9sc/fpvuUbCUWi4zTSirtcs1CKzWOZX?= =?utf-8?q?2ExJpx4MdOyQAikX3cTicfIWB0yXnrx47k9DgmO75om2dq8QMrvfoTLMqshEwEH/j?= =?utf-8?q?GdkkcNFbTT0d6KY8jwbvjdSDcx4Era5Sw+a1V4XZm2/rBA4cRTAMzGdol8ktkRYH6?= =?utf-8?q?1ctFQDIjKZTqW7CnSUZbvJ+1pZl2OVfTycNPjet/gIXUVNauqs6fZMViwWEJV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t+l?= =?utf-8?q?iBzADHPaRGDGuDqOW33mQEeSSGZ7YtCPg=3D=3D?= X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7694866-e269-417f-ca95-08dc0df8505e X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2024 14:12:13.2731 (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: QmOBhBnc+nitfPS+ygu8XUuUVnIQslKXJ8uIH5gCDEZbUrFLjUPojocTBlDeeyvA/0kH6FtXRKWTTqKPoVJlvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9P193MB1538 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787260037882774561 X-GMAIL-MSGID: 1787260037882774561 |
Series |
Fixes and improvements for RS485
|
|
Commit Message
Lino Sanfilippo
Jan. 5, 2024, 2:11 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") Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> 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 d155131f221d..1204102d7162 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -3642,6 +3642,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; }