From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
To: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
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:45:41 +0300 [thread overview]
Message-ID: <6ba15d8f-f7dc-49bb-883a-a478532d1df9@oss.nxp.com> (raw)
In-Reply-To: <CABMQnVJp_j4mMg-TXogM-cBSBMkpF=CUrGE=q+QCiz0arBJxyw@mail.gmail.com>
On 10/17/2024 11:34 AM, Nobuhiro Iwamatsu wrote:
Hello Nobuhiro,
Thanks for your review!
> Hello,
>
> 2024年10月15日(火) 19:52 Ciprian Costea <ciprianmarian.costea@oss.nxp.com>:
>>
>> From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
>>
>> Add a RTC driver for NXP S32G2/S32G3 SoCs.
>>
>> The RTC module is used to enable Suspend to RAM (STR) support
>> on NXP S32G2/S32G3 SoC based boards.
>> RTC tracks clock time during system suspend.
>>
>> RTC from S32G2/S32G3 is not battery-powered and it is not
>> kept alive during system reset.
>>
>> Co-developed-by: Bogdan Hamciuc <bogdan.hamciuc@nxp.com>
>> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@nxp.com>
>> Co-developed-by: Ghennadi Procopciuc <Ghennadi.Procopciuc@nxp.com>
>> Signed-off-by: Ghennadi Procopciuc <Ghennadi.Procopciuc@nxp.com>
>> Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
>> ---
>> drivers/rtc/Kconfig | 11 +
>> drivers/rtc/Makefile | 1 +
>> drivers/rtc/rtc-s32g.c | 778 +++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 790 insertions(+)
>> create mode 100644 drivers/rtc/rtc-s32g.c
>>
>> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
>> index e87c3d74565c..18fc3577f6cd 100644
>> --- a/drivers/rtc/Kconfig
>> +++ b/drivers/rtc/Kconfig
>> @@ -2054,4 +2054,15 @@ config RTC_DRV_SSD202D
>> This driver can also be built as a module, if so, the module
>> will be called "rtc-ssd20xd".
>>
>> +config RTC_DRV_S32G
>> + tristate "RTC driver for S32G2/S32G3 SoCs"
>> + depends on ARCH_S32 || COMPILE_TEST
>> + depends on COMMON_CLK
>> + help
>> + Say yes to enable RTC driver for platforms based on the
>> + S32G2/S32G3 SoC family.
>> +
>> + This RTC module can be used as a wakeup source.
>> + Please note that it is not battery-powered.
>> +
>> endif # RTC_CLASS
>> diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
>> index 8ee79cb18322..a63d010a753c 100644
>> --- a/drivers/rtc/Makefile
>> +++ b/drivers/rtc/Makefile
>> @@ -158,6 +158,7 @@ obj-$(CONFIG_RTC_DRV_RX8025) += rtc-rx8025.o
>> obj-$(CONFIG_RTC_DRV_RX8111) += rtc-rx8111.o
>> obj-$(CONFIG_RTC_DRV_RX8581) += rtc-rx8581.o
>> obj-$(CONFIG_RTC_DRV_RZN1) += rtc-rzn1.o
>> +obj-$(CONFIG_RTC_DRV_S32G) += rtc-s32g.o
>> obj-$(CONFIG_RTC_DRV_S35390A) += rtc-s35390a.o
>> obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
>> obj-$(CONFIG_RTC_DRV_S5M) += rtc-s5m.o
>> diff --git a/drivers/rtc/rtc-s32g.c b/drivers/rtc/rtc-s32g.c
>> new file mode 100644
>> index 000000000000..d6502d8bf616
>> --- /dev/null
>> +++ b/drivers/rtc/rtc-s32g.c
>
> [...]
>
>> +enum {
>> + DIV1 = 1,
>> + DIV32 = 32,
>> + DIV512 = 512,
>> + DIV512_32 = 16384
>> +};
>> +
>> +struct rtc_time_base {
>> + s64 sec;
>> + u64 cycles;
>> + u64 rollovers;
>> + struct rtc_time tm;
>> +};
>> +
>> +struct rtc_priv {
>> + struct rtc_device *rdev;
>> + struct device *dev;
>
> You don't have to have 'struct device' here. You can refer to 'struct
> device' from
> member variable dev.parent of 'struct rtc_device'.
>
Thanks for your suggestion. I will update accordingly in V3.
> Best regards,
> Nobuhiro
>
Best Regards,
Ciprian
next prev parent reply other threads:[~2024-10-18 8:45 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
2024-10-17 8:34 ` Nobuhiro Iwamatsu
2024-10-18 8:45 ` Ciprian Marian Costea [this message]
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=6ba15d8f-f7dc-49bb-883a-a478532d1df9@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=iwamatsu@nigauri.org \
--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=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).