linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] rtc: wm831x: set range
@ 2019-03-22  7:16 Alexandre Belloni
  2019-03-22  7:16 ` [PATCH 2/4] rtc: wm831x: remove unnecessary goto Alexandre Belloni
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Alexandre Belloni @ 2019-03-22  7:16 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, patches, Alexandre Belloni

The wm831x has a 32bit second counter.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-wm831x.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index 7b824dabf104..deaffe0eaf2f 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -436,12 +436,16 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(&pdev->dev, 1);
 
-	wm831x_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm831x",
-					      &wm831x_rtc_ops, THIS_MODULE);
-	if (IS_ERR(wm831x_rtc->rtc)) {
-		ret = PTR_ERR(wm831x_rtc->rtc);
-		goto err;
-	}
+	wm831x_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
+	if (IS_ERR(wm831x_rtc->rtc))
+		return PTR_ERR(wm831x_rtc->rtc);
+
+	wm831x_rtc->rtc->ops = &wm831x_rtc_ops;
+	wm831x_rtc->rtc->range_max = U32_MAX;
+
+	ret = rtc_register_device(wm831x_rtc->rtc);
+	if (ret)
+		return ret;
 
 	ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL,
 				wm831x_alm_irq,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH 1/4] rtc: wm831x: set range
@ 2019-03-22  7:13 Alexandre Belloni
  2019-03-22  7:13 ` [PATCH 4/4] rtc: wm831x: convert to SPDX identifier Alexandre Belloni
  0 siblings, 1 reply; 9+ messages in thread
From: Alexandre Belloni @ 2019-03-22  7:13 UTC (permalink / raw)
  To: linux-rtc; +Cc: linux-kernel, Alexandre Belloni

The wm831x has a 32bit second counter.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-wm831x.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index 7b824dabf104..deaffe0eaf2f 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -436,12 +436,16 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
 
 	device_init_wakeup(&pdev->dev, 1);
 
-	wm831x_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm831x",
-					      &wm831x_rtc_ops, THIS_MODULE);
-	if (IS_ERR(wm831x_rtc->rtc)) {
-		ret = PTR_ERR(wm831x_rtc->rtc);
-		goto err;
-	}
+	wm831x_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
+	if (IS_ERR(wm831x_rtc->rtc))
+		return PTR_ERR(wm831x_rtc->rtc);
+
+	wm831x_rtc->rtc->ops = &wm831x_rtc_ops;
+	wm831x_rtc->rtc->range_max = U32_MAX;
+
+	ret = rtc_register_device(wm831x_rtc->rtc);
+	if (ret)
+		return ret;
 
 	ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL,
 				wm831x_alm_irq,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-22  9:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-22  7:16 [PATCH 1/4] rtc: wm831x: set range Alexandre Belloni
2019-03-22  7:16 ` [PATCH 2/4] rtc: wm831x: remove unnecessary goto Alexandre Belloni
2019-03-22  9:36   ` Charles Keepax
2019-03-22  7:16 ` [PATCH 3/4] rtc: wm831x: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
2019-03-22  9:37   ` Charles Keepax
2019-03-22  7:16 ` [PATCH 4/4] rtc: wm831x: convert to SPDX identifier Alexandre Belloni
2019-03-22  9:37   ` Charles Keepax
2019-03-22  9:36 ` [PATCH 1/4] rtc: wm831x: set range Charles Keepax
  -- strict thread matches above, loose matches on Subject: below --
2019-03-22  7:13 Alexandre Belloni
2019-03-22  7:13 ` [PATCH 4/4] rtc: wm831x: convert to SPDX identifier Alexandre Belloni

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).