diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-06 12:26:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-04-06 12:26:36 -0400 |
commit | be76865df56f22f29ab20e671143761d78ed09c8 (patch) | |
tree | e80ba58a3f927e6fb00bbab47c0aaee74a31e2d1 | |
parent | f654f0fc0bd3f1b0ec76e654bf1cc21f33382241 (diff) | |
parent | 882c5e552ffd06856de42261460f46e18319d259 (diff) |
Merge tag 'rtc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC fixes from Alexandre Belloni:
- Various alarm fixes for da9063, cros-ec and sh
- sd3078 manufacturer name fix as this was introduced this cycle
* tag 'rtc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
rtc: da9063: set uie_unsupported when relevant
rtc: sd3078: fix manufacturer name
rtc: sh: Fix invalid alarm warning for non-enabled alarm
rtc: cros-ec: Fail suspend/resume if wake IRQ can't be configured
-rw-r--r-- | drivers/rtc/Kconfig | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-cros-ec.c | 4 | ||||
-rw-r--r-- | drivers/rtc/rtc-da9063.c | 7 | ||||
-rw-r--r-- | drivers/rtc/rtc-sh.c | 2 |
4 files changed, 12 insertions, 5 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index a71734c41693..f933c06bff4f 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -667,9 +667,9 @@ config RTC_DRV_S5M | |||
667 | will be called rtc-s5m. | 667 | will be called rtc-s5m. |
668 | 668 | ||
669 | config RTC_DRV_SD3078 | 669 | config RTC_DRV_SD3078 |
670 | tristate "ZXW Crystal SD3078" | 670 | tristate "ZXW Shenzhen whwave SD3078" |
671 | help | 671 | help |
672 | If you say yes here you get support for the ZXW Crystal | 672 | If you say yes here you get support for the ZXW Shenzhen whwave |
673 | SD3078 RTC chips. | 673 | SD3078 RTC chips. |
674 | 674 | ||
675 | This driver can also be built as a module. If so, the module | 675 | This driver can also be built as a module. If so, the module |
diff --git a/drivers/rtc/rtc-cros-ec.c b/drivers/rtc/rtc-cros-ec.c index e5444296075e..4d6bf9304ceb 100644 --- a/drivers/rtc/rtc-cros-ec.c +++ b/drivers/rtc/rtc-cros-ec.c | |||
@@ -298,7 +298,7 @@ static int cros_ec_rtc_suspend(struct device *dev) | |||
298 | struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev); | 298 | struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev); |
299 | 299 | ||
300 | if (device_may_wakeup(dev)) | 300 | if (device_may_wakeup(dev)) |
301 | enable_irq_wake(cros_ec_rtc->cros_ec->irq); | 301 | return enable_irq_wake(cros_ec_rtc->cros_ec->irq); |
302 | 302 | ||
303 | return 0; | 303 | return 0; |
304 | } | 304 | } |
@@ -309,7 +309,7 @@ static int cros_ec_rtc_resume(struct device *dev) | |||
309 | struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev); | 309 | struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev); |
310 | 310 | ||
311 | if (device_may_wakeup(dev)) | 311 | if (device_may_wakeup(dev)) |
312 | disable_irq_wake(cros_ec_rtc->cros_ec->irq); | 312 | return disable_irq_wake(cros_ec_rtc->cros_ec->irq); |
313 | 313 | ||
314 | return 0; | 314 | return 0; |
315 | } | 315 | } |
diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c index b4e054c64bad..69b54e5556c0 100644 --- a/drivers/rtc/rtc-da9063.c +++ b/drivers/rtc/rtc-da9063.c | |||
@@ -480,6 +480,13 @@ static int da9063_rtc_probe(struct platform_device *pdev) | |||
480 | da9063_data_to_tm(data, &rtc->alarm_time, rtc); | 480 | da9063_data_to_tm(data, &rtc->alarm_time, rtc); |
481 | rtc->rtc_sync = false; | 481 | rtc->rtc_sync = false; |
482 | 482 | ||
483 | /* | ||
484 | * TODO: some models have alarms on a minute boundary but still support | ||
485 | * real hardware interrupts. Add this once the core supports it. | ||
486 | */ | ||
487 | if (config->rtc_data_start != RTC_SEC) | ||
488 | rtc->rtc_dev->uie_unsupported = 1; | ||
489 | |||
483 | irq_alarm = platform_get_irq_byname(pdev, "ALARM"); | 490 | irq_alarm = platform_get_irq_byname(pdev, "ALARM"); |
484 | ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL, | 491 | ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL, |
485 | da9063_alarm_event, | 492 | da9063_alarm_event, |
diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c index d417b203cbc5..1d3de2a3d1a4 100644 --- a/drivers/rtc/rtc-sh.c +++ b/drivers/rtc/rtc-sh.c | |||
@@ -374,7 +374,7 @@ static int sh_rtc_set_time(struct device *dev, struct rtc_time *tm) | |||
374 | static inline int sh_rtc_read_alarm_value(struct sh_rtc *rtc, int reg_off) | 374 | static inline int sh_rtc_read_alarm_value(struct sh_rtc *rtc, int reg_off) |
375 | { | 375 | { |
376 | unsigned int byte; | 376 | unsigned int byte; |
377 | int value = 0xff; /* return 0xff for ignored values */ | 377 | int value = -1; /* return -1 for ignored values */ |
378 | 378 | ||
379 | byte = readb(rtc->regbase + reg_off); | 379 | byte = readb(rtc->regbase + reg_off); |
380 | if (byte & AR_ENB) { | 380 | if (byte & AR_ENB) { |