rtc-ds1305.c (25ece30561d247b2931b0d11d92e9c976a668771) rtc-ds1305.c (3a905c2d9544a418953d6c18668f0f853fbd9be9)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * rtc-ds1305.c -- driver for DS1305 and DS1306 SPI RTC chips
4 *
5 * Copyright (C) 2008 David Brownell
6 */
7#include <linux/kernel.h>
8#include <linux/init.h>

--- 684 unchanged lines hidden (view full) ---

693 ds1305->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
694 ds1305->rtc->range_max = RTC_TIMESTAMP_END_2099;
695
696 ds1305_nvmem_cfg.priv = ds1305;
697 status = rtc_register_device(ds1305->rtc);
698 if (status)
699 return status;
700
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * rtc-ds1305.c -- driver for DS1305 and DS1306 SPI RTC chips
4 *
5 * Copyright (C) 2008 David Brownell
6 */
7#include <linux/kernel.h>
8#include <linux/init.h>

--- 684 unchanged lines hidden (view full) ---

693 ds1305->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
694 ds1305->rtc->range_max = RTC_TIMESTAMP_END_2099;
695
696 ds1305_nvmem_cfg.priv = ds1305;
697 status = rtc_register_device(ds1305->rtc);
698 if (status)
699 return status;
700
701 rtc_nvmem_register(ds1305->rtc, &ds1305_nvmem_cfg);
701 devm_rtc_nvmem_register(ds1305->rtc, &ds1305_nvmem_cfg);
702
703 /* Maybe set up alarm IRQ; be ready to handle it triggering right
704 * away. NOTE that we don't share this. The signal is active low,
705 * and we can't ack it before a SPI message delay. We temporarily
706 * disable the IRQ until it's acked, which lets us work with more
707 * IRQ trigger modes (not all IRQ controllers can do falling edge).
708 */
709 if (spi->irq) {

--- 40 unchanged lines hidden ---
702
703 /* Maybe set up alarm IRQ; be ready to handle it triggering right
704 * away. NOTE that we don't share this. The signal is active low,
705 * and we can't ack it before a SPI message delay. We temporarily
706 * disable the IRQ until it's acked, which lets us work with more
707 * IRQ trigger modes (not all IRQ controllers can do falling edge).
708 */
709 if (spi->irq) {

--- 40 unchanged lines hidden ---