aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-rx8025.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-rx8025.c')
-rw-r--r--drivers/rtc/rtc-rx8025.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
index af32a62e12a8..fde172fb2abe 100644
--- a/drivers/rtc/rtc-rx8025.c
+++ b/drivers/rtc/rtc-rx8025.c
@@ -424,37 +424,12 @@ static int rx8025_alarm_irq_enable(struct device *dev, unsigned int enabled)
424 return 0; 424 return 0;
425} 425}
426 426
427static int rx8025_irq_set_state(struct device *dev, int enabled)
428{
429 struct i2c_client *client = to_i2c_client(dev);
430 struct rx8025_data *rx8025 = i2c_get_clientdata(client);
431 int ctrl1;
432 int err;
433
434 if (client->irq <= 0)
435 return -ENXIO;
436
437 ctrl1 = rx8025->ctrl1 & ~RX8025_BIT_CTRL1_CT;
438 if (enabled)
439 ctrl1 |= RX8025_BIT_CTRL1_CT_1HZ;
440 if (ctrl1 != rx8025->ctrl1) {
441 rx8025->ctrl1 = ctrl1;
442 err = rx8025_write_reg(rx8025->client, RX8025_REG_CTRL1,
443 rx8025->ctrl1);
444 if (err)
445 return err;
446 }
447
448 return 0;
449}
450
451static struct rtc_class_ops rx8025_rtc_ops = { 427static struct rtc_class_ops rx8025_rtc_ops = {
452 .read_time = rx8025_get_time, 428 .read_time = rx8025_get_time,
453 .set_time = rx8025_set_time, 429 .set_time = rx8025_set_time,
454 .read_alarm = rx8025_read_alarm, 430 .read_alarm = rx8025_read_alarm,
455 .set_alarm = rx8025_set_alarm, 431 .set_alarm = rx8025_set_alarm,
456 .alarm_irq_enable = rx8025_alarm_irq_enable, 432 .alarm_irq_enable = rx8025_alarm_irq_enable,
457 .irq_set_state = rx8025_irq_set_state,
458}; 433};
459 434
460/* 435/*