Message ID | 20231225113524.8800-1-l.sanfilippo@kunbus.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-11018-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp347644dyb; Mon, 25 Dec 2023 03:37:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPvJNF+Wv7RDe+R27EZu2NBKWXMrSUBgKSzvMl3VE7PZmz3NNVuEwdO0fPOcmw7NaKddel X-Received: by 2002:a17:906:4a01:b0:a26:d9aa:8df6 with SMTP id w1-20020a1709064a0100b00a26d9aa8df6mr3252580eju.6.1703504242911; Mon, 25 Dec 2023 03:37:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703504242; cv=pass; d=google.com; s=arc-20160816; b=tanNMNox0bzkyezV+nWw01017UYO+PkLUeJEipXxZDGid5Ixiq0r1JSn2cJTYQCF5o NV0gyt75heXDYoHrkNdRoe8vj/uhOeB5I8OPgKbNq2lgDCQGbRA+VJkAuIegIZBLGxV3 IFz8V/cIQqf00BuYyN8yFi1vWWSgjQeFAjKUvqnejGfqyIoTXfGZ+BICMVmBw8E7NTR1 K+mKDNtTw64eaHMxUufZBSSzOTyAZvJ+AyvMBXiDd+/5+pEGw6iWEVuygd1PpyCXbNfp +Yblg2V/eheL8VTYBsy2IoFAkPUfErnOCNxK1OHsvlkcpUhEmTbz1ITBHJf5HQFn3rwU HUjA== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=MFWJohsEz9g08kvn6dCzs+3MtoEumjqn9pcqLCvl7Zs=; fh=+yR/6vdguIHQPouVWTJm5j1m7asWVUd1FqjwAGbc6tU=; b=PzSsJAN80OehA7FOmtnwrU/P3PxsWrLq+X/7JHb8fpllq6+f1dwjcGd1cBMaGQUaMf 1Bfhp3LPfllQ8YuH6J98Oxg0H+cM6T813RBOTgIpV9KT0yd2YZ6mHRu8t1tBd6NbIRze ZdAQCmC/of2ejE1zvBMM3m2A8XOAK3y+G4xbM1BNIRMoyFBix4TCDMAqtwQFl5Jj/cks HUMYukCkepVo+ldS8UYRNROUOcvGE0AaIR555BfDNmu38UOSwrjgFJwvkRakyLV667nR fGFFxau+BO9yRYA9HYEs/hLatLgguk+EWEXzd/a8Jx79rLhNK1KjPbojIyztkTMMXrIk ohPw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=Zye2U2YB; 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-11018-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11018-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t26-20020a17090616da00b00a234a34707bsi4275238ejd.556.2023.12.25.03.37.22 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Dec 2023 03:37:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11018-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b=Zye2U2YB; 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-11018-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11018-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5D1241F2212C for <ouuuleilei@gmail.com>; Mon, 25 Dec 2023 11:37:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0071537E9; Mon, 25 Dec 2023 11:36:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=kunbus.com header.i=@kunbus.com header.b="Zye2U2YB" X-Original-To: linux-kernel@vger.kernel.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2070.outbound.protection.outlook.com [40.107.22.70]) (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 B0EAA51C4B; Mon, 25 Dec 2023 11:36:02 +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=Rspezn2A+8+j/QoqsyDCeaBO3dukP5aLKQr2I+FMwBmT0oAe8y38N72c3nlhY2NkeolXQBZFHAI+daXjme8kKc3FCdtuFYdQWuGi8hU7XupKhov+rT9UDtYGxzSGf0zo4myNWSPTKe51woVqM+pJmC/2WKf3o3kkCIgSnrh6748bRkjV4zDdIsEjvl6rEgRUcIdkwd1V/svjFXJfTo+YSwNIOZ00MPpeTCS/ry6AY30TxITFBEDk/FIjkJewtoNdU4z8RkLjPap7YNszKSjuVLUw3jN0owcqExM8wPr2r99eF/mDEDbotZQnSsGlQwM8FCGd0MS5FnXF5i2kZ1ur4A== 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=MFWJohsEz9g08kvn6dCzs+3MtoEumjqn9pcqLCvl7Zs=; b=meZbuyluaYnqTjU14MF8KdRCxg0R9RdJ/Rz63ILtmvbz4NDIPyzvlncrkUu+vmCW5g8wxKw7BzR+iPCUTztRVxDIX7L4xKL5LCOMJhCuIwgDGVATHTqufzRegqa7X8qGzYxk2GDXV6538grN/HHZcNKAxrPn1bSj1lHuCjf8Ekx8eb3UwEpA0u8SLta4D41E/BhpenrV25oXNectIEruAYZx/7/XV0imnx7NgJAMoOsOgs0qzoNkLxAXvxDeTdZNTez+R0Xx1vAOdE7YUXtovggvTSc+zVP7DvgUfc9oBDI2R8MvMpTTRo4FRbbJdoLSuMMUJSCi4ky6bQ6Cv3Pxiw== 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=MFWJohsEz9g08kvn6dCzs+3MtoEumjqn9pcqLCvl7Zs=; b=Zye2U2YBBjChYVlm17M97qWEoyzN7gKrbrx0IjRPoCzvsmBwObtrK0cyi9i5WQ9HgSqN68EEfy5Wkg7fNgfn/Z6bAkJOOIcyFwzKTrMVXY9Mj9Smjh45d5TcaIqgB+b8hYYAORjKRVzbHgc1z6c7LW3cZs8d57yacmmkqVqQKCM= 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 GV1P193MB2070.EURP193.PROD.OUTLOOK.COM (2603:10a6:150:21::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.26; Mon, 25 Dec 2023 11:35:52 +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.7113.026; Mon, 25 Dec 2023 11:35:51 +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> Subject: [PATCH v6 0/7] Fixes and improvements for RS485 Date: Mon, 25 Dec 2023 12:35:16 +0100 Message-ID: <20231225113524.8800-1-l.sanfilippo@kunbus.com> X-Mailer: git-send-email 2.43.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-ClientProxiedBy: FR5P281CA0055.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f0::17) 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_|GV1P193MB2070:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d9c6546-88a4-4237-6d82-08dc053da5c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mbSr7W9ONtJXtp+X1aMRab9D6mDJYX3hF2o5tcYm5GiBcDAikdUlm6ON1k3BPvbiWW+yML5/Z8dzw/+e5fzRvZSvlfuv4+P/V9TgL0wG+XBz+WRhei4vn//HEJ77395h6CHKJW1j91gd4gKHsO1x3S7CZyMdLluhBP5szPlB2PjLSJmtBZOffAiKcsAsAsNehb97MIFQXZ91QG2Sun7WeBppQ7T1QITT4Pqo9aZ/FMfsZRs4nwCCM//MSH/3Eb05lZ1VXU4rBrPNOtfjFkUg7Lbb1CqX/2HAVOolsGfkOMC7etM0jsMmBkg5qtoZIFW33+fegpgTD7G/hJVXrGHS/dMQfoOKEO/wsnSrnjWlz1CokftYmlxLYm7l2q67+hx3wFrQmvlDNT/8w+dPlBKXXt9mBS5SaL7Bw0Hd1qAwovWwJSGESWVFhlzCry6o0m/1IVgHXvWwrdugMdJOYjfUvZSMXEZfLrxsGkFnloFtADaPLs2fa5lhJ/bj9psA4euWHYlxVwBa1omu8HzJCYdJDZAQOOhZgB2+xCmocj8JBuGc4IZ/wXerxJLx/3gLhLtf 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)(376002)(136003)(346002)(366004)(39830400003)(396003)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(86362001)(1076003)(107886003)(2616005)(83380400001)(38100700002)(41300700001)(36756003)(7416002)(5660300002)(478600001)(6486002)(2906002)(6666004)(8676002)(8936002)(66946007)(66476007)(66556008)(316002)(4326008)(6506007)(6512007)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VDtgzuLee3vxJkBLYmw7SyqW7vXt?= =?utf-8?q?+H7iAikEqrtuSFfAIfyo5ify+iP1lO4pio3swU6xisUO5UdEt+e9FNKNINH1j4ke4?= =?utf-8?q?4MM3rtZXJ1LpGmejxGgyWWT7HIK14g2qf9T7kEIW8+itX7JBk94g2BL3vZUODgZfR?= =?utf-8?q?+k8WYTbll9NuUbwW4eiYOqk2Ny/Uj80g8bxBl2fnfWlj1qptStupR7alMWO+1k3g/?= =?utf-8?q?KN1rIl0YaLfUNL2EjxZUa7oEfbTA2yscyqa9ZKTKpGerHDRoRS3glgjrz6qWmBdCH?= =?utf-8?q?0L5DW6U/jtY+oWtJElDFeXMcRYOcBRa/+ZM+SbjdOx9HCaSd0UGYJrDgZM44zuqQ0?= =?utf-8?q?Ob7i0XSqCUuuBkkoc7cah/fSBaJ0InGiSdHvkqxETWfK6tAdeQNTSu5llO4FDG4Eg?= =?utf-8?q?AUAZBbhHm5lOAxVHtENuRhIk13F7S5TboyFU6yOr6DeOhea/CKXCub2MOvwj6XZch?= =?utf-8?q?razF9RBm2C/csi9v31B71NqQeG8wlnMCTtxo4I467cH8Hu7kYrihkOanH6nhfkWu8?= =?utf-8?q?B6aD5/9VLiJLCo81LJqIb8pyVA2D3NdzHwJrEeVFt1WO7DmAWmezDC4528RELVAaC?= =?utf-8?q?5dNIceAenorV9fUt3soFEe1RnygNDj36+OATnGfCqaA4M92bi8xdEz95EsVHaJYst?= =?utf-8?q?ApeWK7SajzzmA11TbbdMItCYnqH3HmivRe+N/p/6ebFw06pZmNScc+Y1SGRp739jW?= =?utf-8?q?bpqsRR1qfzGDuxaN+nxjDR9UePjIT2b7pJkzzokYITaTI89QPTdtyml7uZK/cR4d2?= =?utf-8?q?qkaBiGUCpiJ8PowSLjj66tkzDSrJ7XItAncg0uRRtM8P6j64Dmg+EovwZ/V/pK50p?= =?utf-8?q?qcc8FTQeM5bHm+0e+oVf80JqhcBiKHdJibiIvxS7+jtWImG0DCWhagvjaISnl+7B0?= =?utf-8?q?BrxdD7uNTfz665Ct+czMsiRlOZKLef9yRzpgEP0KfSsDkRYuBp7ef0Hbv9SJY0y6X?= =?utf-8?q?X/erAY0SgfpoerczykhKZW/3dVUhqPlHDQ4988aUV9gbfHSS8Rcut22WA9WfiYCe2?= =?utf-8?q?GJaiS6pxMT6uqChrokv09095yLfFDpu4TtPOBMwmivTkppt+i4QepaNtQInvI1sX3?= =?utf-8?q?DjAmKb5+TZ9eEzG6KDcPf2G8rTss5JQPuR71g29rkUS4NymnPUPa/+ZNjkfUJdlOu?= =?utf-8?q?EsQZ10F6LxChl8p+LQfOL4f4sCuerISNHG88h0bLUHKofEt1C/HYxOkWVYyR35ny0?= =?utf-8?q?v5x6UyL0cyouAOvK+R/h8X6K8s3Nf/6sGlhJ4sURkmJRTKu/e5Hu1WrKipkw1gTev?= =?utf-8?q?yc0waQAH9nsl6pl5fiF21N/xihQ0g+hxlbRYucBmAPHgWFVklQ0DJUr9FhmFnJnmH?= =?utf-8?q?AHOmcl3rFgkIlGKyUZ7On4cqajXMZOpqa0LVRStW2qleZG8R32dXQWtmGW1LvO0I+?= =?utf-8?q?x6wuupKsXte26Agznkki3XyF6FM0Dy50Lda0dztIZqRsUUw8A78LJ/hg9KUhM/imZ?= =?utf-8?q?aLYy58IhNxeRIAy5cnsPlt71CGCQygeRnuPpyb+GoPu0l8vO+oxyJPe2wtlID+c6g?= =?utf-8?q?PsRoPMi4P+nYZPBYQ95fsYZjCZVf0hRGx0y7wPYdOLnt52yWUoHEZRjBnPifsyqDA?= =?utf-8?q?UnmF4RNnJuF?= X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d9c6546-88a4-4237-6d82-08dc053da5c2 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2023 11:35:51.4904 (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: l2gfae/gO3g23Mau6LCTx80ZOjSCNnoIS5Z9HmKngrjVw/C1DOOtAQL0cZQBDy6AT+t6r1Kakc5m71QrnDmWxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P193MB2070 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786253664780923541 X-GMAIL-MSGID: 1786253664780923541 |
Series |
Fixes and improvements for RS485
|
|
Message
Lino Sanfilippo
Dec. 25, 2023, 11:35 a.m. UTC
The following series includes some fixes and improvements around RS485 in the serial core and UART drivers: Patch 1: Do not hold the port lock when setting rx-during-tx GPIO Patch 2: set missing supported flag for RX during TX GPIO Patch 3: fix sanitizing check for RTS settings Patch 4: make sure RS485 is cannot be enabled when it is not supported Patch 5: imx: do not set RS485 enabled if it is not supported Patch 6: omap: do not override settings for rs485 support Patch 7: exar: set missing RS485 supported flag Changes in v6: - restore RS485 GPIO settings if setting rs485 configuration fails (pointed out by Ilpo) - drop change for uart_get_rs485_config() - rephrase and correct commit messages (pointed out by Ilpo) - remove unnecessary structure nullification (suggested by Ilpo) - move all RS485 tasks into one function (suggested by Ilpo) Changes in v5: - do not combine the functions that set the RS484 GPIOs (as Hugo originally suggested) Changes in v4: - add comment for function uart_set_rs485_gpios after hint from Hugo - correct commit message as pointed out by Hugo - rephrase commit messages - add patch 7 after discussion with Ilpo Changes in v3 - Drop patch "Get rid of useless wrapper pl011_get_rs485_mode()" as requested by Greg Changes in v2: - add missing 'Fixes' tags as requested by Greg - corrected a typo as pointed out by Hugo - fix issue in imx driver in the serial core as suggested by Uwe - partly rephrase some commit messages - add patch 7 Lino Sanfilippo (7): serial: Do not hold the port lock when setting rx-during-tx GPIO serial: core: set missing supported flag for RX during TX GPIO serial: core: fix sanitizing check for RTS settings serial: core: make sure RS485 cannot be enabled when it is not supported serial: core, imx: do not set RS485 enabled if it is not supported serial: omap: do not override settings for RS485 support serial: 8250_exar: Set missing rs485_supported flag drivers/tty/serial/8250/8250_exar.c | 5 ++- drivers/tty/serial/imx.c | 11 ------ drivers/tty/serial/omap-serial.c | 13 +++--- drivers/tty/serial/serial_core.c | 61 +++++++++++++++++++++++------ drivers/tty/serial/stm32-usart.c | 5 +-- 5 files changed, 59 insertions(+), 36 deletions(-) base-commit: ceb6a6f023fd3e8b07761ed900352ef574010bcb