Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1058936rwd; Thu, 1 Jun 2023 09:55:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KD1TT9pur05ibGJaKigI4EnoV2qvwASVzvGiEFpCgbHEg8LQNFkmYkivbJzRWuz2dq1OC X-Received: by 2002:a05:6a20:7daa:b0:10b:6e18:b690 with SMTP id v42-20020a056a207daa00b0010b6e18b690mr8003946pzj.32.1685638525535; Thu, 01 Jun 2023 09:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685638525; cv=none; d=google.com; s=arc-20160816; b=Lmc2pZDqXNF2D/pI+PALfEQwaqzqaz7rQScN7v2lh4X1/KPnWnRQDIYrTS5+YSSx7J V717Xg/3SMeqJRzKv37i/0XOnF1BB2Kvfdb/LErhbJwH6i0p3PjNzFHd65+pZLOCuQ89 NQjdXfTAcLvZcffkokKqlEuo1eGoI5Tq3zuSZiUb+OipoB3lWN+wkeKVTklQK3kPuDcb D/LV7sFe5exFbCZRyw5lKFhf2UuDWkWOmLvLgiEbyIR+5mQwitE8kmuWXb7NOAQ0tarX AEmGqurAmWTCLPcgLLHfc1Ts9S1krwpeUqAjp7HndzDx5e7+YbvQMn8mwmGUsZWq73xn UsXw== 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=T/ybH+luXFJtRUNLsANdxNj5MlosRcBXIwuB3tKL/mQ=; b=c8u/JsLzx9NKMnHavQFPK0LGlZf9WYr7cmehE4ALUKod6Y9kxm28WWFpcaDyra1fPo lxunr/XsSSeXsV/GTP6ppigVLtCFucpSgARQDI/YO/792/aAXBuohUuBfTKXMzhO1tAt GAvrhpDJ7vFX1pO4WIolbTYHjRTGx5o2pvK56SuDa42OhlMcoHqpu5reSBCwPkJv+lhU 3vlESRs5gAu9ITgVkz3MYXiBf+J13YKl1bhQgCin9+Wlbq4TAEonF34xhRN9opokr2zj 0x+zjlqhjlCqMr8mXnPcPjo4g9JnSdG6aPDzvFTEM2ulX/sYlQFuNp9Wq331Q1lQNmgX EPeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=wVhISoIw; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o27-20020a63921b000000b0053f280bacc6si3200463pgd.166.2023.06.01.09.55.12; Thu, 01 Jun 2023 09:55:25 -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=wVhISoIw; 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 S231696AbjFAQtI (ORCPT + 99 others); Thu, 1 Jun 2023 12:49:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231660AbjFAQtH (ORCPT ); Thu, 1 Jun 2023 12:49:07 -0400 X-Greylist: delayed 1057 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 01 Jun 2023 09:49:05 PDT Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8623196; Thu, 1 Jun 2023 09:49:05 -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=T/ybH+luXFJtRUNLsANdxNj5MlosRcBXIwuB3tKL/mQ=; b=wVhISoIwL5hksN6p+elY2HQiFF DAVLnXvGOziGmoVz9nYX2+n5N+PPgjqbnClXTMJPs6wUQWAJUPGtfUyl02WLN7xekGy+HgQ235Qcx pBvQ5AR+w9buKl7si+As/yhm/ZEbeZ7LvHCQH/j8ql3yhmDh9oAuTxH4MNW68+myskEE=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:53588 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1q4lCp-0003BU-FL; Thu, 01 Jun 2023 12:31:20 -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, 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: Thu, 1 Jun 2023 12:31:06 -0400 Message-Id: <20230601163113.2785657-3-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230601163113.2785657-1-hugo@hugovil.com> References: <20230601163113.2785657-1-hugo@hugovil.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 70.80.174.168 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 autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v5 2/9] 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 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 faa51a58671f..0c903d44429c 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; -- 2.30.2