From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FF18C3A5A1 for ; Thu, 22 Aug 2019 13:37:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1388A21743 for ; Thu, 22 Aug 2019 13:37:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bobjV/WW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1388A21743 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=truiqItHJ0ljcoCZgaJQRYnwS+1yngL0Ob/1LAhjphU=; b=bobjV/WWYEU4wE CjuSs0Ae5vR4rk3ak+qMEFM4L21iJtiGZVuqQO57exGqtbhDHTFXTdH9m3sG+gGggk5UKele8Df3x lAlNcm7tDCVHgA1AgoS1M3NyNoaysoK0vAFB5MFPOFleteBtc9CT7bZQabQmiFB09ABjNaCihoYJR i+nZ1V8UiFQ6csUCviJLGA7u9twEZb0KK7+POhrWX9Y3tTmdQ1kX/TbhVXsQW1kjEbRevaFRX1a8z 9fqAGWMI55b5GQNg5bqVP4MPZTzWMv3vQNG/mNN4rgepSw5W4xIcGCnGTxM7RJu8DPffIaXbbAVF+ YVHfPbzn0HlJDELeZmVA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i0nGy-00061M-FO; Thu, 22 Aug 2019 13:37:04 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0nGu-00060O-Th; Thu, 22 Aug 2019 13:37:02 +0000 X-Originating-IP: 86.207.98.53 Received: from localhost (aclermont-ferrand-651-1-259-53.w86-207.abo.wanadoo.fr [86.207.98.53]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id BDE321C000D; Thu, 22 Aug 2019 13:36:50 +0000 (UTC) Date: Thu, 22 Aug 2019 15:36:49 +0200 From: Alexandre Belloni To: Ran Bi Subject: Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC Message-ID: <20190822133649.GT27031@piout.net> References: <20190801110122.26834-1-ran.bi@mediatek.com> <20190801110122.26834-3-ran.bi@mediatek.com> <20190820201744.GZ3545@piout.net> <1566477254.12318.41.camel@mhfsdcap03> <20190822124628.GS27031@piout.net> <1566480361.12318.50.camel@mhfsdcap03> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1566480361.12318.50.camel@mhfsdcap03> User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190822_063701_111921_20CCF3AD X-CRM114-Status: GOOD ( 13.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Alessandro Zummo , YT Shen , Flora Fu , srv_heupstream@mediatek.com, devicetree@vger.kernel.org, Greg Kroah-Hartman , Linus Walleij , Sean Wang , linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Rob Herring , linux-mediatek@lists.infradead.org, Jonathan Cameron , Matthias Brugger , Yingjoe Chen , Eddie Huang , "David S . Miller" , linux-arm-kernel@lists.infradead.org, linux-rtc@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 22/08/2019 21:26:01+0800, Ran Bi wrote: > On Thu, 2019-08-22 at 14:46 +0200, Alexandre Belloni wrote: > > On 22/08/2019 20:34:14+0800, Ran Bi wrote: > > > > > + /* RTC need POWERKEY1/2 match, then goto normal work mode */ > > > > > + mt2712_writel(rtc, MT2712_POWERKEY1, MT2712_POWERKEY1_KEY); > > > > > + mt2712_writel(rtc, MT2712_POWERKEY2, MT2712_POWERKEY2_KEY); > > > > > > > > This should be written when setting the time after power was lost. > > > > > > > > > > I suppose we can move this into mt2712_rtc_read_time function's "if > > > (p1 != MT2712_POWERKEY1_KEY || p2 != MT2712_POWERKEY2_KEY)" condition > > > which will be added at next patch. We need additional flag to mark this > > > condition or another if condition in mt2712_rtc_set_time fucntion if we > > > put these code in mt2712_rtc_set_time function. > > > > > > > It is fine to test both in read_time and in set_time. > > > > Do you mean that we can test powerkey and then set powerkey both in > read_time and in set_time? > I mean that can test in read_time and test and set in set_time -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel