diff options
Diffstat (limited to 'drivers/rtc/rtc-vr41xx.c')
| -rw-r--r-- | drivers/rtc/rtc-vr41xx.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index 769190ac6d1..c5698cda366 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c | |||
| @@ -207,36 +207,6 @@ static int vr41xx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) | |||
| 207 | return 0; | 207 | return 0; |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | static int vr41xx_rtc_irq_set_freq(struct device *dev, int freq) | ||
| 211 | { | ||
| 212 | u64 count; | ||
| 213 | |||
| 214 | if (!is_power_of_2(freq)) | ||
| 215 | return -EINVAL; | ||
| 216 | count = RTC_FREQUENCY; | ||
| 217 | do_div(count, freq); | ||
| 218 | |||
| 219 | spin_lock_irq(&rtc_lock); | ||
| 220 | |||
| 221 | periodic_count = count; | ||
| 222 | rtc1_write(RTCL1LREG, periodic_count); | ||
| 223 | rtc1_write(RTCL1HREG, periodic_count >> 16); | ||
| 224 | |||
| 225 | spin_unlock_irq(&rtc_lock); | ||
| 226 | |||
| 227 | return 0; | ||
| 228 | } | ||
| 229 | |||
| 230 | static int vr41xx_rtc_irq_set_state(struct device *dev, int enabled) | ||
| 231 | { | ||
| 232 | if (enabled) | ||
| 233 | enable_irq(pie_irq); | ||
| 234 | else | ||
| 235 | disable_irq(pie_irq); | ||
| 236 | |||
| 237 | return 0; | ||
| 238 | } | ||
| 239 | |||
| 240 | static int vr41xx_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) | 210 | static int vr41xx_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) |
| 241 | { | 211 | { |
| 242 | switch (cmd) { | 212 | switch (cmd) { |
| @@ -308,8 +278,6 @@ static const struct rtc_class_ops vr41xx_rtc_ops = { | |||
| 308 | .set_time = vr41xx_rtc_set_time, | 278 | .set_time = vr41xx_rtc_set_time, |
| 309 | .read_alarm = vr41xx_rtc_read_alarm, | 279 | .read_alarm = vr41xx_rtc_read_alarm, |
| 310 | .set_alarm = vr41xx_rtc_set_alarm, | 280 | .set_alarm = vr41xx_rtc_set_alarm, |
| 311 | .irq_set_freq = vr41xx_rtc_irq_set_freq, | ||
| 312 | .irq_set_state = vr41xx_rtc_irq_set_state, | ||
| 313 | }; | 281 | }; |
| 314 | 282 | ||
| 315 | static int __devinit rtc_probe(struct platform_device *pdev) | 283 | static int __devinit rtc_probe(struct platform_device *pdev) |
