Received: by 2002:a05:6830:16d2:b0:61c:ac69:ca1b with SMTP id l18csp188875otr; Thu, 4 Aug 2022 00:02:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR5DVi97OEigfZKbGqp0MWIctV4tUpoVaolXWleOhj7HcD24qAG0mRmldqgiu+XDtxE69Ra0 X-Received: by 2002:a17:907:2be3:b0:730:6866:a9b1 with SMTP id gv35-20020a1709072be300b007306866a9b1mr354937ejc.693.1659596561596; Thu, 04 Aug 2022 00:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659596561; cv=none; d=google.com; s=arc-20160816; b=AmFSeUVu74w24O2vh6/vpTdzCSo8FejL28J1ktZtRePLiI07HR+uP98MVn2XHqmYrC gkLp+1sD3P/Va3HUVw46VJudaxOO7fFooJpzT3a3pcNQhvO4N04GLqPg4vsZLOcSoR1V gtQt5sQ50r1IiImpvcYugZCW3ACf01X4uBeh9ax0aK5rkgGd+DtT3js8/ad7WiNtXzB1 3HnJGBqVVi4EEYJKJisQ2OKHkis3e2PpnQlWdTBb+aJY7vc0eLa6gMeVAB8jYI+qlc0N 1qf73PGuw+lvApra4IBLGuYA14jQayvC60hJTxVDLwWdml75of5ikUhQdXNhQYbA9wgg wy9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=iLIYfyOix2Y74BfL9+vWR1ZPq7wwcIzufyYR6kbSUN8=; b=sBp+GfFVo4oWHBJT/++Ai0Yu4x/ObaIFDMeNDuOgqhIc5/h7fe5DLcJ6w+hhD/Pr+X 5Ok3zA0M9TibqDjZvtfYcgrZSZ100eymJ/Z7Pu8EIvWA9oygqmbkVaL9t/UQLL59OFgT vbPWJ6UvI0oNvUzBn2Wwz3raewZXCjOgQ6r+HB1rkkfwbj8ByVswGsDyI8aMxkEj1A0i mlWEjo2H+1DnyW5sqbiSlB0gBm7cf/uQxL/NIBMAj9PjC0T5wGD4vTu9Dx+ekuePwUt1 jqsmmYZMrkCRafZOtzS4aus7mSzrVGWcknfpQhtZZkP0uQUhbK8O/5UHfMMaRr//UmEJ rDxA== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a056402518a00b0043e8006a816si600478edd.30.2022.08.04.00.02.16; Thu, 04 Aug 2022 00:02:41 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238870AbiHDGvR (ORCPT + 99 others); Thu, 4 Aug 2022 02:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230001AbiHDGvO (ORCPT ); Thu, 4 Aug 2022 02:51:14 -0400 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FD4223F; Wed, 3 Aug 2022 23:51:13 -0700 (PDT) Received: by mail-ej1-f49.google.com with SMTP id w19so1229396ejc.7; Wed, 03 Aug 2022 23:51:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=iLIYfyOix2Y74BfL9+vWR1ZPq7wwcIzufyYR6kbSUN8=; b=7Oy9pK4rG6sn2YNOY+TWS+T9RDYmj5Tmz9Xko4nhZeIN3GgMKyo3tR0D0xg/iSjPaJ UGUPDMKeW6ccj312y3lZnetwli787aZltNw8I0tE1aWL6SMW1frMeqctgQyA1PGyLLtc CpJw2mc4oiTxH2EfuIrlqQNxpbBEH3JZ66O9FUGHkrS/40qwqMkO21MDDnXBUaTb7kMN FtVnCdIuC/tN+71bNk1w+F6IJo3VFrtq+5zk+wNdSXCA4X3Qr/6JDzy4mwMRkKjMadkp jOMk4yU5Dn28/1cFg1EaT3QMyn5Y/6Rnw2mHwNQBkLRPJg1hJdwlH+ZhkfdvuGaPFREY UeTw== X-Gm-Message-State: ACgBeo0xYmrDL0UxscuFKzPQDrT77XoEkaO3IBMGA3IpvwK1kke+CoFh u20qc29X4u7M4j+sWYO8P1gudPPid7g= X-Received: by 2002:a17:906:9749:b0:730:c005:5d59 with SMTP id o9-20020a170906974900b00730c0055d59mr324623ejy.419.1659595872090; Wed, 03 Aug 2022 23:51:12 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id ez17-20020a056402451100b0043ba7df7a42sm203765edb.26.2022.08.03.23.51.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Aug 2022 23:51:11 -0700 (PDT) Message-ID: Date: Thu, 4 Aug 2022 08:51:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 1/1] serial: fsl_lpuart: RS485 RTS polariy is inverse Content-Language: en-US To: Shenwei Wang , gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, NXP Linux Team , Nicolas Diaz References: <20220802163854.1055323-1-shenwei.wang@nxp.com> From: Jiri Slaby In-Reply-To: <20220802163854.1055323-1-shenwei.wang@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no 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 On 02. 08. 22, 18:38, Shenwei Wang wrote: > 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. What commit this fixes? I.e. I am missing a Fixes tag below. > Signed-off-by: Nicolas Diaz > Signed-off-by: Shenwei Wang > --- > drivers/tty/serial/fsl_lpuart.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c > index afa0f941c862f..abc3a3674bc39 100644 > --- a/drivers/tty/serial/fsl_lpuart.c > +++ b/drivers/tty/serial/fsl_lpuart.c > @@ -1394,9 +1394,9 @@ static int lpuart_config_rs485(struct uart_port *port, struct ktermios *termios, > * 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; > } > > writeb(modem, sport->port.membase + UARTMODEM); thanks, -- js suse labs