lkml.org 
[lkml]   [2019]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/7] rtc: jz4740: set range
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
>

\
 
 \ /
  Last update: 2019-04-26 16:32    [W:0.104 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site