Skip to content

Commit

Permalink
Merge tag 'rtc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/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
  • Loading branch information
torvalds committed Apr 6, 2019
2 parents f654f0f + 882c5e5 commit be76865
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,9 @@ config RTC_DRV_S5M
will be called rtc-s5m.

config RTC_DRV_SD3078
tristate "ZXW Crystal SD3078"
tristate "ZXW Shenzhen whwave SD3078"
help
If you say yes here you get support for the ZXW Crystal
If you say yes here you get support for the ZXW Shenzhen whwave
SD3078 RTC chips.

This driver can also be built as a module. If so, the module
Expand Down
4 changes: 2 additions & 2 deletions drivers/rtc/rtc-cros-ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ static int cros_ec_rtc_suspend(struct device *dev)
struct cros_ec_rtc *cros_ec_rtc = dev_get_drvdata(&pdev->dev);

if (device_may_wakeup(dev))
enable_irq_wake(cros_ec_rtc->cros_ec->irq);
return enable_irq_wake(cros_ec_rtc->cros_ec->irq);

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

if (device_may_wakeup(dev))
disable_irq_wake(cros_ec_rtc->cros_ec->irq);
return disable_irq_wake(cros_ec_rtc->cros_ec->irq);

return 0;
}
Expand Down
7 changes: 7 additions & 0 deletions drivers/rtc/rtc-da9063.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,13 @@ static int da9063_rtc_probe(struct platform_device *pdev)
da9063_data_to_tm(data, &rtc->alarm_time, rtc);
rtc->rtc_sync = false;

/*
* TODO: some models have alarms on a minute boundary but still support
* real hardware interrupts. Add this once the core supports it.
*/
if (config->rtc_data_start != RTC_SEC)
rtc->rtc_dev->uie_unsupported = 1;

irq_alarm = platform_get_irq_byname(pdev, "ALARM");
ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL,
da9063_alarm_event,
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ static int sh_rtc_set_time(struct device *dev, struct rtc_time *tm)
static inline int sh_rtc_read_alarm_value(struct sh_rtc *rtc, int reg_off)
{
unsigned int byte;
int value = 0xff; /* return 0xff for ignored values */
int value = -1; /* return -1 for ignored values */

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

0 comments on commit be76865

Please sign in to comment.