From patchwork Tue Jul 25 14:23:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugo Villeneuve X-Patchwork-Id: 125665 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2511736vqg; Tue, 25 Jul 2023 07:30:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlHeP8zqUSCKjJp35iGaBMAEOhkkUDIU/7JzMptJ2G7B5K62GeKWzYZVSuoESBgmKAQDLy+V X-Received: by 2002:a17:902:7488:b0:1bb:99d3:6a53 with SMTP id h8-20020a170902748800b001bb99d36a53mr6706303pll.20.1690295446533; Tue, 25 Jul 2023 07:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690295446; cv=none; d=google.com; s=arc-20160816; b=npibMIj6atL2xft8f6Z3PAlbWMr08uBq33Ob1ujKvqeSrdSfXyRNTnO/mqbG+gHjUQ 0jPndc5gvpSn3CQjnSiwD+H/hjCfw4QCusQlBk/52757/v2lq/W6Eut64ivs8ca+iSJg IQY95Uphzs++HTltzrJpzm5RtY+tzL1hxb7XjP9+NegPs3lWCA8WFTL7oOYKl5YNnI9T YVBApwwHvkZbwxtBzrulVeY/IwpXcv3+MsA/QQSkVGJLIaRnAnidoPhd51cS0dT9X1q8 bZrp60QEFGUR+y6UxUt/+TmVWNrtQ3tuSA1Pf+baC48PBne3sO+aaNUWiI2k9wPyCsBw 0PmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=P6gLA3cgegvRbC7LXs18deF6K32T+CIZJfA5vParMVw=; fh=6iQU/ZFDPB2EtbtrLPL1mq7BpEUKhm02utK8313rrOA=; b=gX8Tc6fWLCeYumPSKgO4K/VhOE3KFbrb7cLMq/IyAGWgxbmGyfH3cGg0UQqbLdfMcx 5TzlKVWa30+POdxMVHibBCfUbrpdrhSI9+5T+u1Ab1CtxpWN3OIuB8y1xQFP/aTDIr7I 2E4q+H0E7Mhgn30dKyuiKH4HXVYisWLuyKpCbPykGXpoKe1BuwOIM0Qiz2muEJNQLe9R liEmyvNm8rMW5Fnru/qlnpbzQg0a1M0oqw/IVT++DmQho8JtjxsfvGGsiW4RdHtuUWV0 2pR8WVA7hSsherdRPvTe3V5zdkBPxeBn+bbfdf2ny+v5P+HRh8qAhzMgW6IZm6zkQ5Sb l2xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=OQvZtsr4; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t3-20020a170902e84300b001b9fb1a0465si12002771plg.385.2023.07.25.07.30.32; Tue, 25 Jul 2023 07:30:46 -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=fail header.i=@hugovil.com header.s=x header.b=OQvZtsr4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232943AbjGYOYZ (ORCPT + 99 others); Tue, 25 Jul 2023 10:24:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232566AbjGYOYI (ORCPT ); Tue, 25 Jul 2023 10:24:08 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B651269F; Tue, 25 Jul 2023 07:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=P6gLA3cgegvRbC7LXs18deF6K32T+CIZJfA5vParMVw=; b=OQvZtsr4nL/FFGf88cw9gTlNvD 6V+ysGtUbLvw7wHqDJSm0ix1FVw11XvEJ0ZUZg4/dXfU1M2XBx+0vgRiusRJJDjhrZUgYBPQ6CZLB OiPLTXtANOBdFXA0iSZMkXWaZQ/ENinwvZamtYly4FHMgoPDgywULuYNU+ZvkWylsb3g=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:34256 helo=localhost.localdomain) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1qOIx6-0003Kt-A4; Tue, 25 Jul 2023 10:23:52 -0400 From: Hugo Villeneuve To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jirislaby@kernel.org, jringle@gridpoint.com, isaac.true@canonical.com, jesse.sung@canonical.com, l.perczak@camlintechnologies.com, tomasz.mon@camlingroup.com Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hugo@hugovil.com, linux-gpio@vger.kernel.org, Hugo Villeneuve , stable@vger.kernel.org, Lech Perczak Date: Tue, 25 Jul 2023 10:23:34 -0400 Message-Id: <20230725142343.1724130-3-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230725142343.1724130-1-hugo@hugovil.com> References: <20230725142343.1724130-1-hugo@hugovil.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 184.161.19.61 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v9 02/10] serial: sc16is7xx: mark IOCONTROL register as volatile X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772403237895646990 X-GMAIL-MSGID: 1772403237895646990 From: Hugo Villeneuve Bit SRESET (3) is cleared when a reset operation is completed. Having the IOCONTROL register as non-volatile will always read SRESET as 1, which is incorrect. Also, if IOCONTROL register is not a volatile register, the upcoming patch "serial: sc16is7xx: fix regression with GPIO configuration" doesn't work when setting some shared GPIO lines as modem control lines. Therefore mark IOCONTROL register as a volatile register. Cc: # 6.1.x Signed-off-by: Hugo Villeneuve Reviewed-by: Lech Perczak Tested-by: Lech Perczak --- drivers/tty/serial/sc16is7xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 8ae2afc76a9b..306ae512b38a 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -488,6 +488,7 @@ static bool sc16is7xx_regmap_volatile(struct device *dev, unsigned int reg) case SC16IS7XX_TXLVL_REG: case SC16IS7XX_RXLVL_REG: case SC16IS7XX_IOSTATE_REG: + case SC16IS7XX_IOCONTROL_REG: return true; default: break;