rtc-pcf2127.c (0ea8a56de21be24cb79abb03dee79aabcd60a316) | rtc-pcf2127.c (35425bafc772ee189e3c3790d7c672b80ba65909) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * An I2C and SPI driver for the NXP PCF2127/29 RTC 4 * Copyright 2013 Til-Technologies 5 * 6 * Author: Renaud Cerrato <r.cerrato@til-technologies.fr> 7 * 8 * Watchdog and tamper functions --- 545 unchanged lines hidden (view full) --- 554 return PTR_ERR(pcf2127->rtc); 555 556 pcf2127->rtc->ops = &pcf2127_rtc_ops; 557 pcf2127->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; 558 pcf2127->rtc->range_max = RTC_TIMESTAMP_END_2099; 559 pcf2127->rtc->set_start_time = true; /* Sets actual start to 1970 */ 560 pcf2127->rtc->uie_unsupported = 1; 561 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * An I2C and SPI driver for the NXP PCF2127/29 RTC 4 * Copyright 2013 Til-Technologies 5 * 6 * Author: Renaud Cerrato <r.cerrato@til-technologies.fr> 7 * 8 * Watchdog and tamper functions --- 545 unchanged lines hidden (view full) --- 554 return PTR_ERR(pcf2127->rtc); 555 556 pcf2127->rtc->ops = &pcf2127_rtc_ops; 557 pcf2127->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000; 558 pcf2127->rtc->range_max = RTC_TIMESTAMP_END_2099; 559 pcf2127->rtc->set_start_time = true; /* Sets actual start to 1970 */ 560 pcf2127->rtc->uie_unsupported = 1; 561 |
562 if (alarm_irq >= 0) { | 562 if (alarm_irq > 0) { |
563 ret = devm_request_threaded_irq(dev, alarm_irq, NULL, 564 pcf2127_rtc_irq, 565 IRQF_TRIGGER_LOW | IRQF_ONESHOT, 566 dev_name(dev), dev); 567 if (ret) { 568 dev_err(dev, "failed to request alarm irq\n"); 569 return ret; 570 } 571 } 572 | 563 ret = devm_request_threaded_irq(dev, alarm_irq, NULL, 564 pcf2127_rtc_irq, 565 IRQF_TRIGGER_LOW | IRQF_ONESHOT, 566 dev_name(dev), dev); 567 if (ret) { 568 dev_err(dev, "failed to request alarm irq\n"); 569 return ret; 570 } 571 } 572 |
573 if (alarm_irq >= 0 || device_property_read_bool(dev, "wakeup-source")) { | 573 if (alarm_irq > 0 || device_property_read_bool(dev, "wakeup-source")) { |
574 device_init_wakeup(dev, true); 575 pcf2127->rtc->ops = &pcf2127_rtc_alrm_ops; 576 } 577 578 pcf2127->wdd.parent = dev; 579 pcf2127->wdd.info = &pcf2127_wdt_info; 580 pcf2127->wdd.ops = &pcf2127_watchdog_ops; 581 pcf2127->wdd.min_timeout = PCF2127_WD_VAL_MIN; --- 354 unchanged lines hidden --- | 574 device_init_wakeup(dev, true); 575 pcf2127->rtc->ops = &pcf2127_rtc_alrm_ops; 576 } 577 578 pcf2127->wdd.parent = dev; 579 pcf2127->wdd.info = &pcf2127_wdt_info; 580 pcf2127->wdd.ops = &pcf2127_watchdog_ops; 581 pcf2127->wdd.min_timeout = PCF2127_WD_VAL_MIN; --- 354 unchanged lines hidden --- |