From: Mathieu Malaterre <malat@debian.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org, Paul Cercueil <paul@crapouillou.net>,
linux-arm-kernel@lists.infradead.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/7] rtc: jz4740: set range
Date: Fri, 26 Apr 2019 16:31:35 +0200 [thread overview]
Message-ID: <CA+7wUsxD1ydvS3yA_ZTvTRXZcg8F4SFTwa2yArq7J00KxFZgiw@mail.gmail.com> (raw)
In-Reply-To: <20190418100045.29288-1-alexandre.belloni@bootlin.com>
On Thu, Apr 18, 2019 at 12:01 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> RTC_SEC is a 32-bit seconds counter.
For the entire series:
Tested-by: Mathieu Malaterre <malat@debian.org>
Arch is MIPS Creator CI20
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
> drivers/rtc/rtc-jz4740.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
> index d0a891777f44..079469627bd7 100644
> --- a/drivers/rtc/rtc-jz4740.c
> +++ b/drivers/rtc/rtc-jz4740.c
> @@ -348,10 +348,18 @@ static int jz4740_rtc_probe(struct platform_device *pdev)
>
> device_init_wakeup(&pdev->dev, 1);
>
> - rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
> - &jz4740_rtc_ops, THIS_MODULE);
> + rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
> if (IS_ERR(rtc->rtc)) {
> ret = PTR_ERR(rtc->rtc);
> + dev_err(&pdev->dev, "Failed to allocate rtc device: %d\n", ret);
> + return ret;
> + }
> +
> + rtc->rtc->ops = &jz4740_rtc_ops;
> + rtc->rtc->range_max = U32_MAX;
> +
> + ret = rtc_register_device(rtc->rtc);
> + if (ret) {
> dev_err(&pdev->dev, "Failed to register rtc device: %d\n", ret);
> return ret;
> }
> --
> 2.20.1
>
prev parent reply other threads:[~2019-04-26 14:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 10:00 [PATCH 1/7] rtc: jz4740: set range Alexandre Belloni
2019-04-18 10:00 ` [PATCH 2/7] rtc: jz4740: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
2019-04-26 14:29 ` Mathieu Malaterre
2019-04-26 14:38 ` Alexandre Belloni
2019-04-18 10:00 ` [PATCH 3/7] rtc: jz4740: remove useless check Alexandre Belloni
2019-04-18 10:00 ` [PATCH 4/7] rtc: jz4740: use .set_time Alexandre Belloni
2019-04-18 10:00 ` [PATCH 5/7] rtc: jz4740: use dev_pm_set_wake_irq() to simplify code Alexandre Belloni
2019-04-18 10:00 ` [PATCH 6/7] rtc: jz4740: rework invalid time detection Alexandre Belloni
2019-04-18 10:00 ` [PATCH 7/7] rtc: jz4740: convert to SPDX identifier Alexandre Belloni
2019-04-26 14:31 ` Mathieu Malaterre [this message]
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=CA+7wUsxD1ydvS3yA_ZTvTRXZcg8F4SFTwa2yArq7J00KxFZgiw@mail.gmail.com \
--to=malat@debian.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=paul@crapouillou.net \
/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).