aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-rs5c372.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-02-04 19:16:12 -0500
committerJohn Stultz <john.stultz@linaro.org>2011-03-09 14:24:54 -0500
commite428c6a2772bcf6b022baf7c8267cca3634c0c3e (patch)
treee53361c43ae67102e1050361ef432ac0401f8191 /drivers/rtc/rtc-rs5c372.c
parent51ba60c5bb3b0f71bee26404ddc22d8e4109e88a (diff)
RTC: Clean out UIE icotl implementations
With the generic RTC rework, the UIE mode irqs are handled in the generic layer, and only hardware specific ioctls get passed down to the rtc driver layer. So this patch removes the UIE mode ioctl handling in the rtc driver layer, which never get used. CC: Thomas Gleixner <tglx@linutronix.de> CC: Alessandro Zummo <a.zummo@towertech.it> CC: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> CC: rtc-linux@googlegroups.com Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/rtc/rtc-rs5c372.c')
-rw-r--r--drivers/rtc/rtc-rs5c372.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c
index 6aaa1550e3b1..85c1b848dd72 100644
--- a/drivers/rtc/rtc-rs5c372.c
+++ b/drivers/rtc/rtc-rs5c372.c
@@ -281,57 +281,6 @@ static int rs5c372_rtc_set_time(struct device *dev, struct rtc_time *tm)
281 return rs5c372_set_datetime(to_i2c_client(dev), tm); 281 return rs5c372_set_datetime(to_i2c_client(dev), tm);
282} 282}
283 283
284#if defined(CONFIG_RTC_INTF_DEV) || defined(CONFIG_RTC_INTF_DEV_MODULE)
285
286static int
287rs5c_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
288{
289 struct i2c_client *client = to_i2c_client(dev);
290 struct rs5c372 *rs5c = i2c_get_clientdata(client);
291 unsigned char buf;
292 int status, addr;
293
294 buf = rs5c->regs[RS5C_REG_CTRL1];
295 switch (cmd) {
296 case RTC_UIE_OFF:
297 case RTC_UIE_ON:
298 /* some 327a modes use a different IRQ pin for 1Hz irqs */
299 if (rs5c->type == rtc_rs5c372a
300 && (buf & RS5C372A_CTRL1_SL1))
301 return -ENOIOCTLCMD;
302 default:
303 return -ENOIOCTLCMD;
304 }
305
306 status = rs5c_get_regs(rs5c);
307 if (status < 0)
308 return status;
309
310 addr = RS5C_ADDR(RS5C_REG_CTRL1);
311 switch (cmd) {
312 case RTC_UIE_OFF: /* update off */
313 buf &= ~RS5C_CTRL1_CT_MASK;
314 break;
315 case RTC_UIE_ON: /* update on */
316 buf &= ~RS5C_CTRL1_CT_MASK;
317 buf |= RS5C_CTRL1_CT4;
318 break;
319 }
320
321 if (i2c_smbus_write_byte_data(client, addr, buf) < 0) {
322 printk(KERN_WARNING "%s: can't update alarm\n",
323 rs5c->rtc->name);
324 status = -EIO;
325 } else
326 rs5c->regs[RS5C_REG_CTRL1] = buf;
327
328 return status;
329}
330
331#else
332#define rs5c_rtc_ioctl NULL
333#endif
334
335 284
336static int rs5c_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) 285static int rs5c_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
337{ 286{
@@ -480,7 +429,6 @@ static int rs5c372_rtc_proc(struct device *dev, struct seq_file *seq)
480 429
481static const struct rtc_class_ops rs5c372_rtc_ops = { 430static const struct rtc_class_ops rs5c372_rtc_ops = {
482 .proc = rs5c372_rtc_proc, 431 .proc = rs5c372_rtc_proc,
483 .ioctl = rs5c_rtc_ioctl,
484 .read_time = rs5c372_rtc_read_time, 432 .read_time = rs5c372_rtc_read_time,
485 .set_time = rs5c372_rtc_set_time, 433 .set_time = rs5c372_rtc_set_time,
486 .read_alarm = rs5c_read_alarm, 434 .read_alarm = rs5c_read_alarm,