Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp129782lqt; Thu, 18 Apr 2024 10:12:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoIwu9RDl8/t3AS/Yn9P6bBrjJvtR7P5PTfEd1a/w38degLxldXnh5GcpqhJmRwiOTkbvlpVQYOCJCT4TyYRpvSdaFo6gHjdh9rq/yDw== X-Google-Smtp-Source: AGHT+IE7cdpBGkR3YH8267y4JeFg8kp0xBQ1+VJmel8by8V5hqz4ZeJsbqMy6LPaJ3X5l7ePHo1T X-Received: by 2002:a05:620a:5d91:b0:787:79c3:93e3 with SMTP id xx17-20020a05620a5d9100b0078779c393e3mr3542973qkn.33.1713460353336; Thu, 18 Apr 2024 10:12:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713460353; cv=pass; d=google.com; s=arc-20160816; b=Bhm/kASyOQFbtv9cVfbvfu8iQ9LcYfb62xeZlRdUSghn+NIfl8IIQ2bJFGSJ0f4hBb XhOB3403fR8QLgxe3PB7YuWPN/u1Rcs8Mk4r0+2xi9EHvJHe3xyBclz6rIWJK9phb/p8 fDVI77qEP9DAkb9lQ+rmvwVo5iGhMJKMo9piuSY3IlDKR+lQdP3ZCnHlJAtSDGMOb0ct eDTv96u8MzTC32JQEm4IRMonvZJWR1bww7EbKm32wiiO9nxlb304caL9ZuWbRj3uSqHq AovYdHoBsCo5bDTQRUbQZDqya2B8oPE8oDAxpqHOx1pRCCu0KTnFjPWycvbEo0fFXQL3 Bc/Q== 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=NFbssjhmyBLMOqhYAakji5yGXBVIHuEqJMJ6/5nfKYg=; fh=WhrNE14oHep0LsDAuf1XV88BLl/REoE06CCdoXPNdKw=; b=XsFsefc18rwMuK351+b3cUUG8+l9D4PCsMLwVEf74d0Xo3g62IpXJ0/ZJ1YsV14RRG BPc+Mrbk5vMlNW8x0jBMauJTR5h8vtL4S7UxH1nVy+yhjg8G5Mp2ZFMNKpAV+hhSG6ml fz6jLCvYoa+ZvgDjUwBeS4gKH9OSewjd6OxazlzuaB2zsuUh4KnQPGdrsCNbsPSiIENh h3MN3pTK8dAbTWcnvlYbdhZIVToXj90q7LsBgDQa9G/hnTHyPraskuQ1t0UEA7cksafN Mczb+YdIx0ZFFCGwnwLbMxbPnA5JDrchAZQM6B2fDZr46FmbMQkwveNSwr+lF0G6qG++ FZZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ya.ru header.s=mail header.b=DgFFqFEB; 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-150548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150548-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. [147.75.199.223]) by mx.google.com with ESMTPS id j2-20020a05620a000200b0078ef418ec3fsi1867402qki.229.2024.04.18.10.12.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 10:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ya.ru header.s=mail header.b=DgFFqFEB; 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-150548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150548-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 1629E1C212B8 for ; Thu, 18 Apr 2024 17:12:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CB9C172BC6; Thu, 18 Apr 2024 17:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ya.ru header.i=@ya.ru header.b="DgFFqFEB" Received: from forward502a.mail.yandex.net (forward502a.mail.yandex.net [178.154.239.82]) (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 59D6F171E77; Thu, 18 Apr 2024 17:12:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.82 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713460341; cv=none; b=aEOJ7ka0hRhyXhgKepiYJOow2mtL0dWCT4wwwJBQz/fgHibqGUlRNAMwSamUFy7cRMQO5vPSlFg43COAx0R/cn2zP5uODKJfCKieWH9tj30APdrXGYPR2rqM4gKeAEdUon3GneD0qEf61VLD+WZjVzeuxYAmb3xvcAqsrSgbbZw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713460341; c=relaxed/simple; bh=ecGG+6eR6iUO2Pn7NUZfGbmMq6Q/v6kfW7DmsPl6BmU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kECqoILtuJQRW4d+ZOloLnKJtDi32xhgV0hzFEZcCy9mgk/ePnKegA3pTGetQZz8VnUQQPkQDg2Tg50ISdUoqrZkQeTPgoge9Hd0v8kfwRmmEfIbYavIw5gHdlDoRxYMcXi6HD5SzbS2FneJfO68gx/DNb9P2v2eMdJOjBu9Adg= 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=DgFFqFEB; arc=none smtp.client-ip=178.154.239.82 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 mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1d:2c01:0:640:acf3:0]) by forward502a.mail.yandex.net (Yandex) with ESMTPS id D4EFD60FF1; Thu, 18 Apr 2024 20:06:29 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id M6JHjm3m3Gk0-JMZhCufi; Thu, 18 Apr 2024 20:06:29 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1713459989; bh=NFbssjhmyBLMOqhYAakji5yGXBVIHuEqJMJ6/5nfKYg=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=DgFFqFEB1JS58Yiyxt1y7YHpq0ctgBE/wk40dFVzJiOsvP+BLJRw8CbsjGGMGkKRC jLPeq2iyEVhHSlA++cqvMPmbxxeOa56Rqr7qGf4nnS7KygzhzLPg7tkk+cSblAzFN3 2wOqveSOg92KHOwbG2LG9LPOS2YsvS/sXmYjwdPc= Authentication-Results: mail-nwsmtp-smtp-production-main-67.vla.yp-c.yandex.net; dkim=pass header.i=@ya.ru From: Konstantin Pugin To: Cc: Konstantin Pugin , Vladimir Zapolskiy , Greg Kroah-Hartman , Jiri Slaby , Hugo Villeneuve , Andy Shevchenko , Lech Perczak , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH v3 1/3] serial: sc16is7xx: announce support of SER_RS485_RTS_ON_SEND Date: Thu, 18 Apr 2024 20:06:05 +0300 Message-Id: <20240418170610.759838-2-rilian.la.te@ya.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240418170610.759838-1-rilian.la.te@ya.ru> References: <20240418170610.759838-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 and always write in the register field SC16IS7XX_EFCR_RTS_INVERT_BIT, which breaks some hardware using these chips. Fixes: 267913ecf737 ("serial: sc16is7xx: Fill in rs485_supported") Reviewed-by: Vladimir Zapolskiy 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 */ }; -- 2.34.1