diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-02 17:19:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-02 17:19:19 -0500 |
commit | bf644990a796bd72d6f3977f3307169919a23f85 (patch) | |
tree | 812913216ec1ff6c8223169a743cbf0a0504291a /drivers/rtc/rtc-ac100.c | |
parent | b89e32ccd1be92a3643df3908d3026b09e271616 (diff) | |
parent | 4402be2b4ca7f53b6213a9e6b3abe9cdcc683e9b (diff) |
Merge tag 'rtc-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni:
"Not much this cycle. I've pushed the at32ap700x removal late but it is
unlikely to cause any issues.
Summary:
Subsystem:
- Move ABI documentation to Documentation/ABI
New driver:
- NXP i.MX53 SRTC
- Chrome OS EC RTC
Drivers:
- Remove at32ap700x
- Many fixes in various error paths"
* tag 'rtc-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
rtc: remove rtc-at32ap700x
Documentation: rtc: move iotcl interface documentation to ABI
Documentation: rtc: add sysfs file permissions
Documentation: rtc: move sysfs documentation to ABI
rtc: mxc_v2: remove __exit annotation
rtc: mxc_v2: Remove unnecessary platform_get_resource() error check
rtc: add mxc driver for i.MX53 SRTC
dt-bindings: rtc: add bindings for i.MX53 SRTC
rtc: r7301: Fix a possible sleep-in-atomic bug in rtc7301_set_time
rtc: r7301: Fix a possible sleep-in-atomic bug in rtc7301_read_time
rtc: omap: fix unbalanced clk_prepare_enable/clk_disable_unprepare
rtc: ac100: Fix multiple race conditions
rtc: sun6i: ensure rtc is kfree'd on error
rtc: cros-ec: add cros-ec-rtc driver.
mfd: cros_ec: Introduce RTC commands and events definitions.
rtc: stm32: Fix copyright
rtc: Remove unused RTC_DEVICE_NAME_SIZE
rtc: r9701: Remove r9701_remove function
rtc: brcmstb-waketimer: fix error handling in brcmstb_waketmr_probe()
Diffstat (limited to 'drivers/rtc/rtc-ac100.c')
-rw-r--r-- | drivers/rtc/rtc-ac100.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-ac100.c b/drivers/rtc/rtc-ac100.c index 0282ccc6181c..8ff9dc3fe5bf 100644 --- a/drivers/rtc/rtc-ac100.c +++ b/drivers/rtc/rtc-ac100.c | |||
@@ -569,6 +569,12 @@ static int ac100_rtc_probe(struct platform_device *pdev) | |||
569 | return chip->irq; | 569 | return chip->irq; |
570 | } | 570 | } |
571 | 571 | ||
572 | chip->rtc = devm_rtc_allocate_device(&pdev->dev); | ||
573 | if (IS_ERR(chip->rtc)) | ||
574 | return PTR_ERR(chip->rtc); | ||
575 | |||
576 | chip->rtc->ops = &ac100_rtc_ops; | ||
577 | |||
572 | ret = devm_request_threaded_irq(&pdev->dev, chip->irq, NULL, | 578 | ret = devm_request_threaded_irq(&pdev->dev, chip->irq, NULL, |
573 | ac100_rtc_irq, | 579 | ac100_rtc_irq, |
574 | IRQF_SHARED | IRQF_ONESHOT, | 580 | IRQF_SHARED | IRQF_ONESHOT, |
@@ -588,17 +594,16 @@ static int ac100_rtc_probe(struct platform_device *pdev) | |||
588 | /* clear counter alarm pending interrupts */ | 594 | /* clear counter alarm pending interrupts */ |
589 | regmap_write(chip->regmap, AC100_ALM_INT_STA, AC100_ALM_INT_ENABLE); | 595 | regmap_write(chip->regmap, AC100_ALM_INT_STA, AC100_ALM_INT_ENABLE); |
590 | 596 | ||
591 | chip->rtc = devm_rtc_device_register(&pdev->dev, "rtc-ac100", | ||
592 | &ac100_rtc_ops, THIS_MODULE); | ||
593 | if (IS_ERR(chip->rtc)) { | ||
594 | dev_err(&pdev->dev, "unable to register device\n"); | ||
595 | return PTR_ERR(chip->rtc); | ||
596 | } | ||
597 | |||
598 | ret = ac100_rtc_register_clks(chip); | 597 | ret = ac100_rtc_register_clks(chip); |
599 | if (ret) | 598 | if (ret) |
600 | return ret; | 599 | return ret; |
601 | 600 | ||
601 | ret = rtc_register_device(chip->rtc); | ||
602 | if (ret) { | ||
603 | dev_err(&pdev->dev, "unable to register device\n"); | ||
604 | return ret; | ||
605 | } | ||
606 | |||
602 | dev_info(&pdev->dev, "RTC enabled\n"); | 607 | dev_info(&pdev->dev, "RTC enabled\n"); |
603 | 608 | ||
604 | return 0; | 609 | return 0; |