diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-10 13:01:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-10 13:01:21 -0500 |
commit | 7d884710bb3635f94dac152ae226ca54a585a223 (patch) | |
tree | b38909954296f90a954264d1c3be4d597b67d5d4 /drivers/rtc/rtc-ds1343.c | |
parent | 3b13866869b8407497d20a916450594e117583e6 (diff) | |
parent | 1e3929ef0e1c4c7127b785ce7a236965b3739406 (diff) |
Merge tag 'rtc-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni:
"Core:
- Fix rtctest error path
New drivers:
- Microcrystal RV8803
Subsystem wide cleanups:
- remove misuse of IRQF_NO_SUSPEND flag
Drivers:
- at91rm9200: clear RTC alarm status flag prior to suspending
- davinci: remove incorrect reference to probe function
- ds1307: Fix alarm programming for mcp794xx
- ds1390: trickle charger support, fix ds1390_get_reg
- isl1208: Pass the IRQF_ONESHOT flag
- opal: fix type of token
- pcf2127: fix RTC_READ_VL, remove useless driver version
- pcf85063: return an error when date is invalid
- pcf8563: add CLKOUT to common clock framework
- rx8025: remove unnecessary braces
- s3c: Set year, month, day value for setting alarm
- stmp3xxx: unify register access macros
- License fixes: pcf2127, da9063
- wakeup-source support for isl12057 and opal"
* tag 'rtc-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (23 commits)
rtc: Add a driver for Micro Crystal RV8803
rtc: s3c: Set year, month, day value for setting alarm
rtc: ds1307: Fix alarm programming for mcp794xx
rtc: isl12057: enable support for the standard "wakeup-source" property
rtc: opal: enable support for the stardard "wakeup-source" property
rtc: isl1208: Pass the IRQF_ONESHOT flag
rtc: pcf8563: add CLKOUT to common clock framework
rtc: davinci: remove incorrect reference to probe function
rtc: at91rm9200: clear RTC alarm status flag prior to suspending
rtc: pcf2127: remove useless driver version
rtc: pcf2127: fix reading uninitialized value on RTC_READ_VL ioctl
rtc: stmp3xxx: unify register access macros
rtc: da9063: GPL copyright inconsistency fix
rtc: pcf85063: return an error when date is invalid
rtc: rx8025: remove unnecessary braces
rtc: ds1343: remove misuse of IRQF_NO_SUSPEND flag
rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag
rtc: pl031: remove misuse of IRQF_NO_SUSPEND flag
rtc: opal: fix type of token
rtc: ds1390: Add trickle charger device tree binding
...
Diffstat (limited to 'drivers/rtc/rtc-ds1343.c')
-rw-r--r-- | drivers/rtc/rtc-ds1343.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c index 07371a9e3793..3d389bd8a289 100644 --- a/drivers/rtc/rtc-ds1343.c +++ b/drivers/rtc/rtc-ds1343.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/rtc.h> | 21 | #include <linux/rtc.h> |
22 | #include <linux/bcd.h> | 22 | #include <linux/bcd.h> |
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/pm_wakeirq.h> | ||
24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
25 | 26 | ||
26 | #define DS1343_DRV_VERSION "01.00" | 27 | #define DS1343_DRV_VERSION "01.00" |
@@ -663,15 +664,15 @@ static int ds1343_probe(struct spi_device *spi) | |||
663 | 664 | ||
664 | if (priv->irq >= 0) { | 665 | if (priv->irq >= 0) { |
665 | res = devm_request_threaded_irq(&spi->dev, spi->irq, NULL, | 666 | res = devm_request_threaded_irq(&spi->dev, spi->irq, NULL, |
666 | ds1343_thread, | 667 | ds1343_thread, IRQF_ONESHOT, |
667 | IRQF_NO_SUSPEND | IRQF_ONESHOT, | ||
668 | "ds1343", priv); | 668 | "ds1343", priv); |
669 | if (res) { | 669 | if (res) { |
670 | priv->irq = -1; | 670 | priv->irq = -1; |
671 | dev_err(&spi->dev, | 671 | dev_err(&spi->dev, |
672 | "unable to request irq for rtc ds1343\n"); | 672 | "unable to request irq for rtc ds1343\n"); |
673 | } else { | 673 | } else { |
674 | device_set_wakeup_capable(&spi->dev, 1); | 674 | device_init_wakeup(&spi->dev, true); |
675 | dev_pm_set_wake_irq(&spi->dev, spi->irq); | ||
675 | } | 676 | } |
676 | } | 677 | } |
677 | 678 | ||
@@ -692,6 +693,8 @@ static int ds1343_remove(struct spi_device *spi) | |||
692 | priv->irqen &= ~RTC_AF; | 693 | priv->irqen &= ~RTC_AF; |
693 | mutex_unlock(&priv->mutex); | 694 | mutex_unlock(&priv->mutex); |
694 | 695 | ||
696 | dev_pm_clear_wake_irq(&spi->dev); | ||
697 | device_init_wakeup(&spi->dev, false); | ||
695 | devm_free_irq(&spi->dev, spi->irq, priv); | 698 | devm_free_irq(&spi->dev, spi->irq, priv); |
696 | } | 699 | } |
697 | 700 | ||