From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Ran Bi <ran.bi@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Mark Rutland <mark.rutland@arm.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Linus Walleij <linus.walleij@linaro.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com,
YT Shen <yt.shen@mediatek.com>,
Eddie Huang <eddie.huang@mediatek.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
Flora Fu <flora.fu@mediatek.com>
Subject: Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC
Date: Thu, 22 Aug 2019 15:36:49 +0200 [thread overview]
Message-ID: <20190822133649.GT27031@piout.net> (raw)
In-Reply-To: <1566480361.12318.50.camel@mhfsdcap03>
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
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Ran Bi <ran.bi@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Mark Rutland <mark.rutland@arm.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Linus Walleij <linus.walleij@linaro.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com,
YT Shen <yt.shen@mediatek.com>,
Eddie Huang <eddie.huang@mediatek.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
Flora Fu <flora.fu@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>
Subject: Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC
Date: Thu, 22 Aug 2019 15:36:49 +0200 [thread overview]
Message-ID: <20190822133649.GT27031@piout.net> (raw)
In-Reply-To: <1566480361.12318.50.camel@mhfsdcap03>
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
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Ran Bi <ran.bi@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Alessandro Zummo <a.zummo@towertech.it>,
YT Shen <yt.shen@mediatek.com>, Flora Fu <flora.fu@mediatek.com>,
srv_heupstream@mediatek.com, devicetree@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>,
Sean Wang <sean.wang@mediatek.com>,
linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
Eddie Huang <eddie.huang@mediatek.com>,
"David S . Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org, linux-rtc@vger.kernel.org
Subject: Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC
Date: Thu, 22 Aug 2019 15:36:49 +0200 [thread overview]
Message-ID: <20190822133649.GT27031@piout.net> (raw)
In-Reply-To: <1566480361.12318.50.camel@mhfsdcap03>
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
next prev parent reply other threads:[~2019-08-22 13:36 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 11:01 [PATCH v2 0/4] Add Support for MediaTek MT2712 RTC Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-01 11:01 ` [PATCH v2 1/4] bindings: rtc: add bindings for " Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-22 9:17 ` Matthias Brugger
2019-08-22 9:17 ` Matthias Brugger
2019-08-23 6:35 ` Ran Bi
2019-08-23 6:35 ` Ran Bi
2019-08-23 6:35 ` Ran Bi
2019-08-01 11:01 ` [PATCH v2 2/4] rtc: Add support for the MediaTek " Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-20 20:17 ` Alexandre Belloni
2019-08-20 20:17 ` Alexandre Belloni
2019-08-20 20:17 ` Alexandre Belloni
2019-08-22 12:34 ` Ran Bi
2019-08-22 12:34 ` Ran Bi
2019-08-22 12:34 ` Ran Bi
2019-08-22 12:46 ` Alexandre Belloni
2019-08-22 12:46 ` Alexandre Belloni
2019-08-22 12:46 ` Alexandre Belloni
2019-08-22 13:26 ` Ran Bi
2019-08-22 13:26 ` Ran Bi
2019-08-22 13:26 ` Ran Bi
2019-08-22 13:36 ` Alexandre Belloni [this message]
2019-08-22 13:36 ` Alexandre Belloni
2019-08-22 13:36 ` Alexandre Belloni
2019-08-23 6:37 ` Ran Bi
2019-08-23 6:37 ` Ran Bi
2019-08-23 6:37 ` Ran Bi
2019-08-22 9:12 ` Matthias Brugger
2019-08-22 9:12 ` Matthias Brugger
2019-08-22 9:20 ` Alexandre Belloni
2019-08-22 9:20 ` Alexandre Belloni
2019-08-22 9:20 ` Alexandre Belloni
2019-08-22 11:50 ` Ran Bi
2019-08-22 11:50 ` Ran Bi
2019-08-22 11:50 ` Ran Bi
2019-08-22 11:47 ` Ran Bi
2019-08-22 11:47 ` Ran Bi
2019-08-22 11:47 ` Ran Bi
2019-08-01 11:01 ` [PATCH v2 3/4] arm64: dts: add RTC nodes for MT2712 Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-01 11:01 ` [PATCH v2 4/4] MAINTAINERS: add MT2712 RTC files Ran Bi
2019-08-01 11:01 ` Ran Bi
2019-08-01 11:01 ` Ran Bi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190822133649.GT27031@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=a.zummo@towertech.it \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=eddie.huang@mediatek.com \
--cc=flora.fu@mediatek.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab+samsung@kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=ran.bi@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=srv_heupstream@mediatek.com \
--cc=yingjoe.chen@mediatek.com \
--cc=yt.shen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.