diff options
author | 2021-02-22 09:54:19 -0800 | |
---|---|---|
committer | 2021-02-22 09:54:19 -0800 | |
commit | 0328b5f2ef4af8ba060e64baa928c94037e7308f (patch) | |
tree | e9f0f54ca32399ac6a08024c788e5870e50c8cc4 /drivers/rtc/rtc-tps65910.c | |
parent | Merge tag 'i3c/for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c... (diff) | |
parent | rtc: abx80x: Add utility function for writing configuration key (diff) | |
download | linux-0328b5f2ef4af8ba060e64baa928c94037e7308f.tar.gz linux-0328b5f2ef4af8ba060e64baa928c94037e7308f.tar.bz2 linux-0328b5f2ef4af8ba060e64baa928c94037e7308f.zip |
Merge tag 'rtc-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni:
"Many cleanups and a few drivers removal this cycle.
Subsystem:
- Introduce features bitfield and the first feature: RTC_FEATURE_ALARM
Removed drivers:
- ab3100
- coh901331
- tx4939
- sirfsoc
Drivers:
- use rtc_lock and rtc_unlock instead of opencoding
- constify all struct rtc_class_ops
- quiet maybe-unused variable warning
- replace spin_lock_irqsave with spin_lock in hard IRQ
- pcf2127: disable Power-On Reset Override and run OTP refresh"
* tag 'rtc-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (81 commits)
rtc: abx80x: Add utility function for writing configuration key
rtc: pcf2127: properly set flag WD_CD for rtc chips(pcf2129, pca2129)
rtc: pcf8563: Add NXP PCA8565 compatible
rtc: s3c: quiet maybe-unused variable warning
rtc: s3c: stop setting bogus time
rtc: sd3078: quiet maybe-unused variable warning
rtc: s35390a: quiet maybe-unused variable warning
rtc: rx8581: quiet maybe-unused variable warning
rtc: rx8010: quiet maybe-unused variable warning
rtc: rv8803: quiet maybe-unused variable warning
rtc: rv3032: quiet maybe-unused variable warning
rtc: rv3029: quiet maybe-unused variable warning
rtc: rv3028: quiet maybe-unused variable warning
rtc: rs5c372: quiet maybe-unused variable warning
rtc: pcf85363: quiet maybe-unused variable warning
rtc: pcf85063: quiet maybe-unused variable warnings
rtc: meson: quiet maybe-unused variable warning
rtc: m41t80: quiet maybe-unused variable warning
rtc: isl1208: quiet maybe-unused variable warning
rtc: ds3232: quiet maybe-unused variable warning
...
Diffstat (limited to 'drivers/rtc/rtc-tps65910.c')
-rw-r--r-- | drivers/rtc/rtc-tps65910.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c index 2d87b62826a8..288abb1abdb8 100644 --- a/drivers/rtc/rtc-tps65910.c +++ b/drivers/rtc/rtc-tps65910.c @@ -361,13 +361,6 @@ static const struct rtc_class_ops tps65910_rtc_ops = { .set_offset = tps65910_set_offset, }; -static const struct rtc_class_ops tps65910_rtc_ops_noirq = { - .read_time = tps65910_rtc_read_time, - .set_time = tps65910_rtc_set_time, - .read_offset = tps65910_read_offset, - .set_offset = tps65910_set_offset, -}; - static int tps65910_rtc_probe(struct platform_device *pdev) { struct tps65910 *tps65910 = NULL; @@ -426,11 +419,15 @@ static int tps65910_rtc_probe(struct platform_device *pdev) tps_rtc->irq = irq; if (irq != -1) { - device_set_wakeup_capable(&pdev->dev, 1); - tps_rtc->rtc->ops = &tps65910_rtc_ops; - } else - tps_rtc->rtc->ops = &tps65910_rtc_ops_noirq; + if (device_property_present(tps65910->dev, "wakeup-source")) + device_init_wakeup(&pdev->dev, 1); + else + device_set_wakeup_capable(&pdev->dev, 1); + } else { + clear_bit(RTC_FEATURE_ALARM, tps_rtc->rtc->features); + } + tps_rtc->rtc->ops = &tps65910_rtc_ops; tps_rtc->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; tps_rtc->rtc->range_max = RTC_TIMESTAMP_END_2099; |