Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Shunxi Zhang (章顺喜)" <ot_shunxi.zhang@mediatek.com>
To: "giorgitchankvetadze1997@gmail.com"
	<giorgitchankvetadze1997@gmail.com>,
	"krzk@kernel.org" <krzk@kernel.org>
Cc: "linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"Eddie Huang (黃智傑)" <eddie.huang@mediatek.com>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Jh Hsu (許希孜)" <Jh.Hsu@mediatek.com>,
	"Vince-WL Liu (劉文龍)" <Vince-WL.Liu@mediatek.com>,
	"Sean Wang" <Sean.Wang@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"lee@kernel.org" <lee@kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
	"Sirius Wang (王皓昱)" <Sirius.Wang@mediatek.com>
Subject: Re: [PATCH v1 1/2] mfd: mt6397: Add new bit definitions for RTC_BBPU register
Date: Tue, 19 Aug 2025 07:53:34 +0000	[thread overview]
Message-ID: <272b601e803474ad1048f1957142a234f03892af.camel@mediatek.com> (raw)
In-Reply-To: <CAE7dp2rxfgj6FKoM-kesX8632t3AA7Lk5rC-uasyQUS2hQuUfQ@mail.gmail.com>

On Mon, 2025-08-11 at 15:21 +0400, Giorgi Tchankvetadze wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> Cc: Krzysztof Kozlowski <krzk@kernel.org>,
>     linux-mediatek@lists.infradead.org,
>     linux-rtc@vger.kernel.org,
>     linux-kernel@vger.kernel.org
> 
> Shunxi,
> 
> Can you confirm whether `RTC_BBPU_PWREN` (bit 0),
> `RTC_BBPU_CLR` (bit 1) and `RTC_BBPU_RESET_AL` (bit 3) are documented
> in the MT6397 datasheet (please cite section/page)? They look like
> standard RTC controls (power enable, clear/reset, alarm reset) and
> might be useful to include, but I agree with Krzysztof that adding
> definitions with no users can accumulate technical debt.
> 
> Suggestion: either
> - add the definitions when a driver actually needs them, or
> - keep them now but add a short rationale in the commit message
>   (datasheet reference + intended use) so future reviewers understand
>   why they exist.
> 
> Also: please split cosmetic whitespace fixes (RTC_BBPU_KEY) into a
> separate patch to make review/merge easier.
> 
> Thanks for the patch; I’m following the thread.
> 
> — Giorgi

Dear sir,
The MT6397 is an integration of several ICs and does not have a
separate IC specification. I will check the relevant IC datasheets
again. I will remove the useless define in next version.

Thanks for your commnets.

Best regards
Shunxi Zhangus
> 
> 
> On Mon, Aug 11, 2025 at 3:03 PM Krzysztof Kozlowski <krzk@kernel.org>
> wrote:
> > 
> > On 11/08/2025 10:15, ot_shunxi.zhang@mediatek.com wrote:
> > > From: Shunxi Zhang <ot_shunxi.zhang@mediatek.com>
> > > 
> > > This patch adds new bit definitions for the RTC_BBPU register in
> > > the
> > 
> > Why? There is no user of these. Don't add useless defines.
> > 
> > > mt6397 RTC header file. The following bit definitions are
> > > introduced:
> > 
> > Hm?
> > 
> > > 
> > > Signed-off-by: Shunxi Zhang <ot_shunxi.zhang@mediatek.com>
> > > ---
> > >  include/linux/mfd/mt6397/rtc.h | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/include/linux/mfd/mt6397/rtc.h
> > > b/include/linux/mfd/mt6397/rtc.h
> > > index 27883af44f87..001cef6b7302 100644
> > > --- a/include/linux/mfd/mt6397/rtc.h
> > > +++ b/include/linux/mfd/mt6397/rtc.h
> > > @@ -15,8 +15,11 @@
> > >  #include <linux/rtc.h>
> > > 
> > >  #define RTC_BBPU               0x0000
> > > +#define RTC_BBPU_PWREN         BIT(0)
> > > +#define RTC_BBPU_CLR           BIT(1)
> > > +#define RTC_BBPU_RESET_AL      BIT(3)
> > >  #define RTC_BBPU_CBUSY         BIT(6)
> > > -#define RTC_BBPU_KEY            (0x43 << 8)
> > > +#define RTC_BBPU_KEY           (0x43 << 8)
> > 
> > 
> > Why?
> > 
> > 
> > 
> > Best regards,
> > Krzysztof
> > 

  reply	other threads:[~2025-08-19  8:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11  8:15 [PATCH v1 0/2] rtc: Enhance RTC driver with BBPU bit definitions and shutdown handling ot_shunxi.zhang
2025-08-11  8:15 ` [PATCH v1 1/2] mfd: mt6397: Add new bit definitions for RTC_BBPU register ot_shunxi.zhang
2025-08-11 11:02   ` Krzysztof Kozlowski
2025-08-11 11:21     ` Giorgi Tchankvetadze
2025-08-19  7:53       ` Shunxi Zhang (章顺喜) [this message]
2025-08-19  7:54     ` Shunxi Zhang (章顺喜)
2025-08-19  8:16       ` Krzysztof Kozlowski
2025-08-19  8:32         ` Shunxi Zhang (章顺喜)
2025-08-11  8:15 ` [PATCH v1 2/2] rtc: mt6397: Add BBPU alarm status reset and shutdown handling ot_shunxi.zhang
2025-08-11 13:09   ` Alexandre Belloni
2025-08-19  7:48     ` Shunxi Zhang (章顺喜)

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=272b601e803474ad1048f1957142a234f03892af.camel@mediatek.com \
    --to=ot_shunxi.zhang@mediatek.com \
    --cc=Jh.Hsu@mediatek.com \
    --cc=Sean.Wang@mediatek.com \
    --cc=Sirius.Wang@mediatek.com \
    --cc=Vince-WL.Liu@mediatek.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=eddie.huang@mediatek.com \
    --cc=giorgitchankvetadze1997@gmail.com \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.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=matthias.bgg@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox