Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-23 Thread Ran Bi
On Thu, 2019-08-22 at 15:36 +0200, Alexandre Belloni wrote: > 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 */ > >

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-22 Thread Alexandre Belloni
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,

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-22 Thread Ran Bi
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,

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-22 Thread Alexandre Belloni
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

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-22 Thread Ran Bi
Hi, > > + > > +#define MTK_RTC_DEVKBUILD_MODNAME > > You probably shouldn't do that and have a static string for the driver > name. I probably doesn't matter much though because DT is used to probe > the driver. > Will change it at next patch. > > +/* we map HW YEAR 0 to 2000

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-22 Thread Ran Bi
On Thu, 2019-08-22 at 11:20 +0200, Alexandre Belloni wrote: > On 22/08/2019 11:12:29+0200, Matthias Brugger wrote: > > > > > > On 01/08/2019 13:01, Ran Bi wrote: > > > This add support for the MediaTek MT2712 RTC. It was SoC based RTC, but > > > had different architecture compared with MT7622

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-22 Thread Ran Bi
On Thu, 2019-08-22 at 11:12 +0200, Matthias Brugger wrote: > > On 01/08/2019 13:01, Ran Bi wrote: > > This add support for the MediaTek MT2712 RTC. It was SoC based RTC, but > > had different architecture compared with MT7622 RTC. > > > > Signed-off-by: Ran Bi > > --- > > drivers/rtc/Kconfig

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-22 Thread Alexandre Belloni
On 22/08/2019 11:12:29+0200, Matthias Brugger wrote: > > > On 01/08/2019 13:01, Ran Bi wrote: > > This add support for the MediaTek MT2712 RTC. It was SoC based RTC, but > > had different architecture compared with MT7622 RTC. > > > > Signed-off-by: Ran Bi > > --- > > drivers/rtc/Kconfig

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-22 Thread Matthias Brugger
On 01/08/2019 13:01, Ran Bi wrote: > This add support for the MediaTek MT2712 RTC. It was SoC based RTC, but > had different architecture compared with MT7622 RTC. > > Signed-off-by: Ran Bi > --- > drivers/rtc/Kconfig | 10 + > drivers/rtc/Makefile | 1 + >

Re: [PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-20 Thread Alexandre Belloni
Hi, On 01/08/2019 19:01:20+0800, Ran Bi wrote: > diff --git a/drivers/rtc/rtc-mt2712.c b/drivers/rtc/rtc-mt2712.c > new file mode 100644 > index ..1eb71ca64c2c > --- /dev/null > +++ b/drivers/rtc/rtc-mt2712.c > @@ -0,0 +1,444 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + *

[PATCH v2 2/4] rtc: Add support for the MediaTek MT2712 RTC

2019-08-01 Thread Ran Bi
This add support for the MediaTek MT2712 RTC. It was SoC based RTC, but had different architecture compared with MT7622 RTC. Signed-off-by: Ran Bi --- drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-mt2712.c | 444 +++ 3