From patchwork Thu Apr 18 13:25:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Pugin X-Patchwork-Id: 790116 Received: from forward501b.mail.yandex.net (forward501b.mail.yandex.net [178.154.239.145]) (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 2A7E0EECF; Thu, 18 Apr 2024 13:32:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.145 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713447129; cv=none; b=tNZ8sSd/JU/ExNBWxPLmUgbnMelMmgRyZ7Nu23Z5JXhVEgNmFl06hozQP/nnPkwR6w7XzZJ1H1JIU2O3fydJxQieke1GiSz2bmgTkUB3dz/eufpfX5o9yYmg7m0PK6glCh66rbE8ZAO3X5voOZvoMp1dAwcjqQRagPtKvs97R8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713447129; c=relaxed/simple; bh=VgSvRh4Nkqg+giXaWx1zHyeFWJKVhVCAvHRS1IAmzoQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WAfhpNfoHAD2L7IftnnvlLp6NXVFCt4Kni3CYvpg1s8GVaYV1j5+nNPwEmi6NHa5BAtRZXkSponYvK8uziyntHObKLBxSqGKGCaR2qFQWpj5Oab2l1ue/kKpGWTYCsbetGt3RWYb9RO+652VcyqtUfzBmNl483XhfgPTrhBP1wo= 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=lytFUuKr; arc=none smtp.client-ip=178.154.239.145 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ya.ru header.i=@ya.ru header.b="lytFUuKr" Received: from mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net [IPv6:2a02:6b8:c05:84:0:640:40f8:0]) by forward501b.mail.yandex.net (Yandex) with ESMTPS id 24D34614D5; Thu, 18 Apr 2024 16:25:27 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id HPFFWsDX0Cg0-Zzy45R7B; Thu, 18 Apr 2024 16:25:26 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1713446726; bh=shykAdTRV0cwoBwnCaC1Edv+I0dugY6Hlb/B0Lizbw4=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=lytFUuKrncc6LBsWKDtLT8ZdlsxBBpgdFFP1IMhszbuZZC4l7b9400lCTWf2ufcu/ vrYlLoPO3uFqq5IuHxWm7I1IokzoZW0fw1j9lotX2CUc3qBT3u1jdyBZSTg5c+4g1k hI7GaurLw9i6zq1dzFrm8iC/K6iGtD5/X9AbaIuU= Authentication-Results: mail-nwsmtp-smtp-production-main-38.myt.yp-c.yandex.net; dkim=pass header.i=@ya.ru From: Konstantin To: Cc: Konstantin , Greg Kroah-Hartman , Jiri Slaby , Hugo Villeneuve , Andy Shevchenko , Lech Perczak , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH 1/3] serial: sc16is7xx: announce support of SER_RS485_RTS_ON_SEND Date: Thu, 18 Apr 2024 16:25:03 +0300 Message-Id: <20240418132508.3447800-2-rilian.la.te@ya.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240418132508.3447800-1-rilian.la.te@ya.ru> References: <20240418132508.3447800-1-rilian.la.te@ya.ru> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Konstantin Hardware supports both modes, but after commit 4afeced55baa ("serial: core: fix sanitizing check for RTS settings") we always end up with SER_RS485_RTS_AFTER_SEND and always write in register 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 929206a9a6e1..a300eebf1401 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1458,7 +1458,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 */ };