From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
NXP S32 Linux Team <s32@nxp.com>,
Christophe Lizzi <clizzi@redhat.com>,
Alberto Ruiz <aruizrui@redhat.com>,
Enric Balletbo <eballetb@redhat.com>,
Bogdan Hamciuc <bogdan.hamciuc@nxp.com>,
Ghennadi Procopciuc <Ghennadi.Procopciuc@nxp.com>
Subject: Re: [PATCH v2 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support
Date: Fri, 18 Oct 2024 11:46:59 +0300 [thread overview]
Message-ID: <c85933b7-e382-45c1-9491-1a791e8b7b91@oss.nxp.com> (raw)
In-Reply-To: <turfqcpjz2dxrng73v5iphpsh3pvhhv73guo4m2vvzplqycsa3@iyrzsimppo57>
On 10/16/2024 12:42 PM, Uwe Kleine-König wrote:
Hello Uwe,
Thanks for your review!
> Hello,
>
> On Tue, Oct 15, 2024 at 01:51:31PM +0300, Ciprian Costea wrote:
>> +static void rtc_disable(struct rtc_priv *priv)
>
> A very generic name for a driver specific function. I'm a big fan of
> driver specific prefixes and I wonder why this isn't called
> s34g_rtc_disable().
>
> Also a comment about what is actually disabled here would be nice (or
> maybe a better name). I hope this doesn't stop the RTC ticking??
>
Indeed, 's32g_rtc_disable' would be a better name. I will update in V3
and add a comment before the function definition.
It does stop the RTC running counter because as per RTC module
documentation from S32G2/S32G3 SoC Reference Manual, the clock source
and divisors selection should be performed with RTC counter disabled in
order to not cause any synchronization issues.
So following this limitation, when the clock source is switched (as it
is the case for S32G2 and S32G3 and Suspend to RAM) the RTC counter
should be disabled.
>> +static struct platform_driver rtc_driver = {
>> + .driver = {
>> + .name = "s32g-rtc",
>> + .pm = &rtc_pm_ops,
>> + .of_match_table = rtc_dt_ids,
>> + },
>> + .probe = rtc_probe,
>> + .remove_new = rtc_remove,
>> +};
>
> After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
> return void") .remove() is (again) the right callback to implement for
> platform drivers. Please just drop "_new".
>
Thanks for pointing this out. I was not aware of this change. I will
update in V3.
> Best regards
> Uwe
Best Regards,
Ciprian
next prev parent reply other threads:[~2024-10-18 8:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 10:51 [PATCH v2 0/4] add NXP RTC driver support for S32G2/S32G3 SoCs Ciprian Costea
2024-10-15 10:51 ` [PATCH v2 1/4] dt-bindings: rtc: add schema for NXP " Ciprian Costea
2024-10-15 21:15 ` Rob Herring
2024-10-15 21:27 ` Rob Herring
2024-10-16 16:08 ` Alexandre Belloni
2024-10-18 8:54 ` Ciprian Marian Costea
2024-11-04 15:29 ` Rob Herring
2024-11-04 15:37 ` Ciprian Marian Costea
2024-10-15 10:51 ` [PATCH v2 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support Ciprian Costea
2024-10-15 21:04 ` Rob Herring
2024-10-18 8:45 ` Ciprian Marian Costea
2024-10-16 9:42 ` Uwe Kleine-König
2024-10-18 8:46 ` Ciprian Marian Costea [this message]
2024-10-17 8:34 ` Nobuhiro Iwamatsu
2024-10-18 8:45 ` Ciprian Marian Costea
2024-10-19 9:43 ` kernel test robot
2024-10-19 10:36 ` kernel test robot
2024-10-19 14:12 ` kernel test robot
2024-10-15 10:51 ` [PATCH v2 3/4] arm64: defconfig: add S32G RTC module support Ciprian Costea
2024-10-15 10:51 ` [PATCH v2 4/4] MAINTAINERS: add NXP S32G RTC driver Ciprian Costea
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=c85933b7-e382-45c1-9491-1a791e8b7b91@oss.nxp.com \
--to=ciprianmarian.costea@oss.nxp.com \
--cc=Ghennadi.Procopciuc@nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=aruizrui@redhat.com \
--cc=bogdan.hamciuc@nxp.com \
--cc=catalin.marinas@arm.com \
--cc=clizzi@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eballetb@redhat.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=robh@kernel.org \
--cc=s32@nxp.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).