Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4477705rwb; Tue, 6 Sep 2022 08:05:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ys3XfcMPJS3I/fbTmYj0zRJM3PKoSfRGsuL2ufY83zeqqSSVWPBhJ+cfAG7Q26UGqWJBD X-Received: by 2002:a17:907:9620:b0:730:d5f4:d448 with SMTP id gb32-20020a170907962000b00730d5f4d448mr39675366ejc.45.1662476711427; Tue, 06 Sep 2022 08:05:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662476711; cv=none; d=google.com; s=arc-20160816; b=oq6SE3Gu1x0ppmgWAnyASEnflCdAbiwrxOq8twbg3qYTA7gpD1fU1BnrFaZsmstoKT 5WNoaRPAjAjx+z7KlwFPnx7qFEY7HOXNKRkX7LM2ooid7aTew+BOxEjNxde2GKZiM7wm Vfp6BQo9vB8a8L8vk25RPijWiSSM+5Qq0OHqjvV+tvuaKqe6pMmThHJCbQ5RzBCc/Xgq VNRLdYWufykCZBXn/NVkq9wobTztvrj2nfOf72P0vYZXd/wEo/ARARkUR1Osre6rNH9Y ck0X/BnBdHoK70O6tqFxSj0wt1cyp+bjyiXqrbvwot9oTK2DvT074Efp88MoEVNnsrIq 8sgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=undb6p0RkRmHcmDht0deOl9GmlJSEkEDFhCv3SLM3Ew=; b=GplNHAnLBMw9btdxaZjHWuY3eT7WYRVr1lYbfL7gd4UokW0WX2o4r73mMBlVFqyohU iVQcE9NXNIbl8cOYYUsB2eGwlO85lWRPeHOQVEQlflBoDaIje3gkBAcl2F9wGcQ3fqZd By5Vwc4xir4Ogz8QEYUFwyLB0xZFehTx6hQLH5GSyKRGcUWb64ZWtth0+be0C8GU6SNa MdtG4uNBVYyPStgQPMQg13aab7cltK364khDjGc9QcOV1RbzYpz0D1p9xCMgWpZgODTY eyyGSphrIdURgU8XQgv7129mmp1lx1DkKzJj8ZAkdW9NYPrMpIymEYUdAuc1wl6SRZqL ImVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ekI9AHaX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp19-20020a170906c15300b0076ef29f5a93si2493041ejc.697.2022.09.06.08.04.45; Tue, 06 Sep 2022 08:05:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ekI9AHaX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240350AbiIFNhx (ORCPT + 99 others); Tue, 6 Sep 2022 09:37:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240678AbiIFNg6 (ORCPT ); Tue, 6 Sep 2022 09:36:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17CD311A07; Tue, 6 Sep 2022 06:34:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B5B4E61548; Tue, 6 Sep 2022 13:34:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE904C433C1; Tue, 6 Sep 2022 13:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471271; bh=HelgyPzEVycb3BjhZewL1eRduBpx8grzH+zzcATmFA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ekI9AHaXs5m+Ce8XYFJgP8Hfk+fuAKhRwo+5NFxwyrNuBSmbgdURRa3ltEHLybaxV pOw9q3mUbqF0fsFS5HR4PGqBaAqqcXsNnPyDzK0+Aj6J9BIf5B/OymV2GJDllThI7M MCNcHL5pMNYgFNcW3OqVFxV6R6hP2D1excHEvf60= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, stable , Nicolas Diaz , Shenwei Wang Subject: [PATCH 5.10 21/80] serial: fsl_lpuart: RS485 RTS polariy is inverse Date: Tue, 6 Sep 2022 15:30:18 +0200 Message-Id: <20220906132817.830007730@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132816.936069583@linuxfoundation.org> References: <20220906132816.936069583@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shenwei Wang commit 846651eca073e2e02e37490a4a52752415d84781 upstream. The setting of RS485 RTS polarity is inverse in the current driver. When the property of 'rs485-rts-active-low' is enabled in the dts node, the RTS signal should be LOW during sending. Otherwise, if there is no such a property, the RTS should be HIGH during sending. Fixes: 03895cf41d18 ("tty: serial: fsl_lpuart: Add support for RS-485") Cc: stable Signed-off-by: Nicolas Diaz Signed-off-by: Shenwei Wang Link: https://lore.kernel.org/r/20220805144529.604856-1-shenwei.wang@nxp.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/fsl_lpuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1376,9 +1376,9 @@ static int lpuart32_config_rs485(struct * Note: UART is assumed to be active high. */ if (rs485->flags & SER_RS485_RTS_ON_SEND) - modem &= ~UARTMODEM_TXRTSPOL; - else if (rs485->flags & SER_RS485_RTS_AFTER_SEND) modem |= UARTMODEM_TXRTSPOL; + else if (rs485->flags & SER_RS485_RTS_AFTER_SEND) + modem &= ~UARTMODEM_TXRTSPOL; } /* Store the new configuration */