[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c85933b7-e382-45c1-9491-1a791e8b7b91@oss.nxp.com>
Date: Fri, 18 Oct 2024 11:46:59 +0300
From: Ciprian Marian Costea <ciprianmarian.costea@....nxp.com>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Catalin Marinas
<catalin.marinas@....com>, Will Deacon <will@...nel.org>,
linux-rtc@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
NXP S32 Linux Team <s32@....com>, Christophe Lizzi <clizzi@...hat.com>,
Alberto Ruiz <aruizrui@...hat.com>, Enric Balletbo <eballetb@...hat.com>,
Bogdan Hamciuc <bogdan.hamciuc@....com>,
Ghennadi Procopciuc <Ghennadi.Procopciuc@....com>
Subject: Re: [PATCH v2 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support
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
Powered by blists - more mailing lists