Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2238329lqt; Mon, 22 Apr 2024 05:45:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU47zKU3GPRdECwvwO3sQJJ7OlflWqqMpq6JG9XJ5BwytTYpA4ZmjWcWgq1+fACMqDicJtai9gClPLT5BSZqXenceU0G1PB9XFsgbxsHw== X-Google-Smtp-Source: AGHT+IFg1Q11Mk/c2ne/FJT3U3mnwDg4N9KMCtoLu0stz7fWM7nkvp18dUdqUypqy4wLdG9ClkrU X-Received: by 2002:a0c:e909:0:b0:699:2443:bcea with SMTP id a9-20020a0ce909000000b006992443bceamr10779681qvo.22.1713789945236; Mon, 22 Apr 2024 05:45:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713789945; cv=pass; d=google.com; s=arc-20160816; b=SCCuyviAJL0OOpKCVIwrV0ctAYE0H2MkuoO3tWP4JV1K7xNgK7c7ayiRqbXUUiFU1V 1Nl1o6AnfUZECHygUtnujbuXnOJX4+jWVANj5FsH4zKE5FbR2v2ESnvMMtgkbdBxoP/R 0cJBTiS2zeNMAmwdZE2Pv/JdztdKI+uPZvfO8MqRrRcJ2GwMXVrFbwgew8lv7qkRKKjy Mf8MyV7vE5fh2SHTiV5jQP8portbdp3WlaPkJPoNdoler7jHkFOLxlDqVYwiEsqqaVw2 jk+4MKjIx5LEibktRFtK92SbV662C3Y8NAtSP/YqdTOvw5SFkgL9wxWY5c08nLrSsXlT ey/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=f98sLx3wwNNPDW5Jc75hbRxEbuMeLdbQ4VYugBELXm4=; fh=ftk+pG97tSUknesSmdfwb/pWNx6WF2IifUbJmgTUEVk=; b=Y6qGDfoYn/r3DygIphiq/eO4imKCh76y+RFxMW99ZSUabtPrjygSsV0ZH0lglf6mYd UmtSxZe/E5a0ichwXOyr3TlJd9vt9sxvwSwN/qTx+OyzycOJ48AuH8FB81b7ro64GZzl 9YQK8yb3sfQMXGZbaKU3c8bYy5tvqrKWAQu5OjsN60q9ovoWOFPcETdlTH1CyHuR8+Rk s2iF7/XBDtcsV4UV0R9onU4S+TcBD8fp68lj4cqorHD9ExxlUvIfvNQHbUDJfR87TKhx YOzbwrsVP/S6G2onql9GurSImfytDQuzdK5XAJ+vjbrRmcTv63djFoPZX6eiPhKlWxaB iMdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ya.ru header.s=mail header.b=kp6Bi3mp; arc=pass (i=1 spf=pass spfdomain=ya.ru dkim=pass dkdomain=ya.ru dmarc=pass fromdomain=ya.ru); spf=pass (google.com: domain of linux-kernel+bounces-153362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153362-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ya.ru Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fn12-20020ad45d6c000000b006a0409b749esi10539710qvb.29.2024.04.22.05.45.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 05:45:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ya.ru header.s=mail header.b=kp6Bi3mp; arc=pass (i=1 spf=pass spfdomain=ya.ru dkim=pass dkdomain=ya.ru dmarc=pass fromdomain=ya.ru); spf=pass (google.com: domain of linux-kernel+bounces-153362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153362-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ya.ru 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id F24F21C2196B for ; Mon, 22 Apr 2024 12:45:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38FE0150992; Mon, 22 Apr 2024 12:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ya.ru header.i=@ya.ru header.b="kp6Bi3mp" Received: from forward205c.mail.yandex.net (forward205c.mail.yandex.net [178.154.239.216]) (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 13A51146D6C; Mon, 22 Apr 2024 12:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.216 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713789846; cv=none; b=tLRkf4GQHsCCencvvnQExurWikydRNT7O+74DEf8vrW9HkxN2DZlpm9NXu/11DXKvVjOqdKXJ9z+43dfZrNQp0aR3/3T5cSXy+Nt3A0iR8h5dyHZhrVH0fB5P1bV6ZcBT59ia1teJQt8sndoubrAl4vXpCdveqQY4lCePjj3ARA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713789846; c=relaxed/simple; bh=GLSI6vHuSNFBB34OPzNk3wEjWhkccNqqJfO1tOkQDI0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gnh2xCfpMOHdF3QxhsD4Dx4SizLK9wT+cYCkaCCt0VGgL8jJeTqPhTos7oTJ+JhzK5a/Mx7rCEFe2xKR62rICGi4bNSGlbyb4rUe2mhyBCSkznoUXClvOVsaW2SrcroQ2WvpjJCzvN6x60zrvPu0szx7B/dlmVpWfjaDxOPmuYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ya.ru; spf=pass smtp.mailfrom=ya.ru; dkim=pass (1024-bit key) header.d=ya.ru header.i=@ya.ru header.b=kp6Bi3mp; arc=none smtp.client-ip=178.154.239.216 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ya.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ya.ru Received: from forward100c.mail.yandex.net (forward100c.mail.yandex.net [IPv6:2a02:6b8:c03:500:1:45:d181:d100]) by forward205c.mail.yandex.net (Yandex) with ESMTPS id 1860B6565A; Mon, 22 Apr 2024 15:38:23 +0300 (MSK) Received: from mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:3729:0:640:85f7:0]) by forward100c.mail.yandex.net (Yandex) with ESMTPS id 8AE0C60AEF; Mon, 22 Apr 2024 15:38:14 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id 6cIEH34oJ8c0-LdLQir2p; Mon, 22 Apr 2024 15:38:13 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1713789493; bh=f98sLx3wwNNPDW5Jc75hbRxEbuMeLdbQ4VYugBELXm4=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=kp6Bi3mpARAJsT3MxZxPMoCB1e5Mt1uYCGp9evjSWpIOR0CbRzO05yJCBNKHhTrnm iFJm3XdA5p5oWGc57oWv8X/XGeBPlOO3+2ElrPsKz/jMN8qJvlBuIrQMw1800OWtuK fTqzA+Y+KYFTizeT8avE45TJZGi2Jb/56As7Stxs= Authentication-Results: mail-nwsmtp-smtp-production-main-81.myt.yp-c.yandex.net; dkim=pass header.i=@ya.ru From: Konstantin Pugin To: Cc: krzk@kernel.org, conor@kernel.org, lkp@intel.com, vz@mleia.com, robh@kernel.org, jcmvbkbc@gmail.com, nicolas.ferre@microchip.com, manikanta.guntupalli@amd.com, corbet@lwn.net, ychuang3@nuvoton.com, u.kleine-koenig@pengutronix.de, Maarten.Brock@sttls.nl, Konstantin Pugin , Greg Kroah-Hartman , Jiri Slaby , Hugo Villeneuve , Andy Shevchenko , Lech Perczak , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH v6 1/3] serial: sc16is7xx: announce support of SER_RS485_RTS_ON_SEND Date: Mon, 22 Apr 2024 15:37:55 +0300 Message-Id: <20240422123801.2695129-2-rilian.la.te@ya.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240422123801.2695129-1-rilian.la.te@ya.ru> References: <20240422123801.2695129-1-rilian.la.te@ya.ru> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Konstantin Pugin The hardware supports both RTS_ON_SEND and RTS_AFTER_SEND modes, but after the commit 4afeced55baa ("serial: core: fix sanitizing check for RTS settings") we always end up with SER_RS485_RTS_AFTER_SEND set and always write to the register field SC16IS7XX_EFCR_RTS_INVERT_BIT, which breaks some hardware using these chips. Fixes: 267913ecf737 ("serial: sc16is7xx: Fill in rs485_supported") Signed-off-by: Konstantin Pugin --- drivers/tty/serial/sc16is7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 03cf30e20b75..dfcc804f558f 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1449,7 +1449,7 @@ static int sc16is7xx_setup_mctrl_ports(struct sc16is7xx_port *s, } static const struct serial_rs485 sc16is7xx_rs485_supported = { - .flags = SER_RS485_ENABLED | SER_RS485_RTS_AFTER_SEND, + .flags = SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | SER_RS485_RTS_AFTER_SEND, .delay_rts_before_send = 1, .delay_rts_after_send = 1, /* Not supported but keep returning -EINVAL */ }; -- 2.34.1