Skip to content

Commit be76865

Browse files
committed
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
2 parents f654f0f + 882c5e5 commit be76865

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

drivers/rtc/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,9 @@ config RTC_DRV_S5M
667667
will be called rtc-s5m.
668668

669669
config RTC_DRV_SD3078
670-
tristate "ZXW Crystal SD3078"
670+
tristate "ZXW Shenzhen whwave SD3078"
671671
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
673673
SD3078 RTC chips.
674674

675675
This driver can also be built as a module. If so, the module

drivers/rtc/rtc-cros-ec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ static int cros_ec_rtc_suspend(struct device *dev)
298298
struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev);
299299

300300
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);
302302

303303
return 0;
304304
}
@@ -309,7 +309,7 @@ static int cros_ec_rtc_resume(struct device *dev)
309309
struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev);
310310

311311
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);
313313

314314
return 0;
315315
}

drivers/rtc/rtc-da9063.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,13 @@ static int da9063_rtc_probe(struct platform_device *pdev)
480480
da9063_data_to_tm(data, &rtc->alarm_time, rtc);
481481
rtc->rtc_sync = false;
482482

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+
483490
irq_alarm = platform_get_irq_byname(pdev, "ALARM");
484491
ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL,
485492
da9063_alarm_event,

drivers/rtc/rtc-sh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ static int sh_rtc_set_time(struct device *dev, struct rtc_time *tm)
374374
static inline int sh_rtc_read_alarm_value(struct sh_rtc *rtc, int reg_off)
375375
{
376376
unsigned int byte;
377-
int value = 0xff; /* return 0xff for ignored values */
377+
int value = -1; /* return -1 for ignored values */
378378

379379
byte = readb(rtc->regbase + reg_off);
380380
if (byte & AR_ENB) {

0 commit comments

Comments
 (0)