diff options
author | Colin Cross <ccross@android.com> | 2011-03-03 14:17:49 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-03-03 14:17:49 -0800 |
commit | c871fe663a6368fd0e98f5a3bfd81b0b9c591266 (patch) | |
tree | d09c244e94c09f985caf259c434c7eda8ff53229 /drivers/rtc/rtc-vr41xx.c | |
parent | d5fdafd38ca0c28c4648909ce0afd0a5420309ca (diff) | |
parent | db811ca0f48578f9940f49f284ac81e336b264ad (diff) | |
download | kernel_samsung_aries-c871fe663a6368fd0e98f5a3bfd81b0b9c591266.zip kernel_samsung_aries-c871fe663a6368fd0e98f5a3bfd81b0b9c591266.tar.gz kernel_samsung_aries-c871fe663a6368fd0e98f5a3bfd81b0b9c591266.tar.bz2 |
Merge branch 'for-2639/i2c/i2c-tegra' of git://git.fluff.org/bjdooks/linux into for-next-i2c
Diffstat (limited to 'drivers/rtc/rtc-vr41xx.c')
-rw-r--r-- | drivers/rtc/rtc-vr41xx.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index c324424..769190a 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -240,26 +240,6 @@ static int vr41xx_rtc_irq_set_state(struct device *dev, int enabled) static int vr41xx_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) { switch (cmd) { - case RTC_AIE_ON: - spin_lock_irq(&rtc_lock); - - if (!alarm_enabled) { - enable_irq(aie_irq); - alarm_enabled = 1; - } - - spin_unlock_irq(&rtc_lock); - break; - case RTC_AIE_OFF: - spin_lock_irq(&rtc_lock); - - if (alarm_enabled) { - disable_irq(aie_irq); - alarm_enabled = 0; - } - - spin_unlock_irq(&rtc_lock); - break; case RTC_EPOCH_READ: return put_user(epoch, (unsigned long __user *)arg); case RTC_EPOCH_SET: @@ -275,6 +255,24 @@ static int vr41xx_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long return 0; } +static int vr41xx_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) +{ + spin_lock_irq(&rtc_lock); + if (enabled) { + if (!alarm_enabled) { + enable_irq(aie_irq); + alarm_enabled = 1; + } + } else { + if (alarm_enabled) { + disable_irq(aie_irq); + alarm_enabled = 0; + } + } + spin_unlock_irq(&rtc_lock); + return 0; +} + static irqreturn_t elapsedtime_interrupt(int irq, void *dev_id) { struct platform_device *pdev = (struct platform_device *)dev_id; |