Home
last modified time | relevance | path

Searched full:rtc (Results 1 – 25 of 3241) sorted by relevance

12345678910>>...130

/kernel/linux/linux-5.10/drivers/rtc/
DMakefile3 # Makefile for RTC class/drivers.
10 obj-$(CONFIG_RTC_CLASS) += rtc-core.o
11 obj-$(CONFIG_RTC_MC146818_LIB) += rtc-mc146818-lib.o
12 rtc-core-y := class.o interface.o
14 rtc-core-$(CONFIG_RTC_NVMEM) += nvmem.o
15 rtc-core-$(CONFIG_RTC_INTF_DEV) += dev.o
16 rtc-core-$(CONFIG_RTC_INTF_PROC) += proc.o
17 rtc-core-$(CONFIG_RTC_INTF_SYSFS) += sysfs.o
21 obj-$(CONFIG_RTC_DRV_88PM80X) += rtc-88pm80x.o
22 obj-$(CONFIG_RTC_DRV_88PM860X) += rtc-88pm860x.o
[all …]
Dclass.c3 * RTC subsystem, base class
15 #include <linux/rtc.h>
21 #include "rtc-core.h"
28 struct rtc_device *rtc = to_rtc_device(dev); in rtc_device_release() local
29 struct timerqueue_head *head = &rtc->timerqueue; in rtc_device_release()
32 mutex_lock(&rtc->ops_lock); in rtc_device_release()
35 mutex_unlock(&rtc->ops_lock); in rtc_device_release()
37 cancel_work_sync(&rtc->irqwork); in rtc_device_release()
39 ida_simple_remove(&rtc_ida, rtc->id); in rtc_device_release()
40 kfree(rtc); in rtc_device_release()
[all …]
Drtc-ds1685.c3 * An rtc driver for the Dallas/Maxim DS1685/DS1687 and related real-time
13 * Application Note 90, Using the Multiplex Bus RTC Extended Features.
23 #include <linux/rtc.h>
26 #include <linux/rtc/ds1685.h>
40 * ds1685_read - read a value from an rtc register.
41 * @rtc: pointer to the ds1685 rtc structure.
45 ds1685_read(struct ds1685_priv *rtc, int reg) in ds1685_read() argument
47 return readb((u8 __iomem *)rtc->regs + in ds1685_read()
48 (reg * rtc->regstep)); in ds1685_read()
52 * ds1685_write - write a value to an rtc register.
[all …]
Drtc-omap.c8 * Copyright (C) 2006 David Brownell (new RTC framework)
27 #include <linux/rtc.h>
28 #include <linux/rtc/rtc-omap.h>
31 * The OMAP RTC is a year/month/day/hours/minutes/seconds BCD clock
39 * RTC_OFF_NOFF used as the reset signal (so the RTC won't be reset),
40 * and wiring RTC_WAKE_INT (so the RTC alarm can wake the system from
45 /* RTC registers */
137 void (*lock)(struct omap_rtc *rtc);
138 void (*unlock)(struct omap_rtc *rtc);
142 struct rtc_device *rtc; member
[all …]
Dinterface.c3 * RTC subsystem, interface functions
11 #include <linux/rtc.h>
18 #include <trace/events/rtc.h>
20 static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer);
21 static void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer);
23 static void rtc_add_offset(struct rtc_device *rtc, struct rtc_time *tm) in rtc_add_offset() argument
27 if (!rtc->offset_secs) in rtc_add_offset()
33 * Since the reading time values from RTC device are always in the RTC in rtc_add_offset()
38 if ((rtc->start_secs > rtc->range_min && secs >= rtc->start_secs) || in rtc_add_offset()
39 (rtc->start_secs < rtc->range_min && in rtc_add_offset()
[all …]
Drtc-sh.c3 * SuperH On-Chip RTC Support
9 * Based on the old arch/sh/kernel/cpu/rtc.c by:
18 #include <linux/rtc.h>
29 #include <asm/rtc.h>
31 /* Default values for RZ/A RTC */
38 #define DRV_NAME "sh-rtc"
44 #define RSECCNT RTC_REG(1) /* RTC sec */
45 #define RMINCNT RTC_REG(2) /* RTC min */
46 #define RHRCNT RTC_REG(3) /* RTC hour */
47 #define RWKCNT RTC_REG(4) /* RTC week */
[all …]
Drtc-lpc32xx.c11 #include <linux/rtc.h>
51 struct rtc_device *rtc; member
58 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); in lpc32xx_rtc_read_time() local
60 elapsed_sec = rtc_readl(rtc, LPC32XX_RTC_UCOUNT); in lpc32xx_rtc_read_time()
68 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); in lpc32xx_rtc_set_time() local
72 spin_lock_irq(&rtc->lock); in lpc32xx_rtc_set_time()
74 /* RTC must be disabled during count update */ in lpc32xx_rtc_set_time()
75 tmp = rtc_readl(rtc, LPC32XX_RTC_CTRL); in lpc32xx_rtc_set_time()
76 rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp | LPC32XX_RTC_CTRL_CNTR_DIS); in lpc32xx_rtc_set_time()
77 rtc_writel(rtc, LPC32XX_RTC_UCOUNT, secs); in lpc32xx_rtc_set_time()
[all …]
DKconfig3 # RTC class/drivers configuration
19 Generic RTC class support. If you say yes here, you will
26 bool "Set system time from RTC on startup and resume"
30 the value read from a specified RTC device. This is useful to avoid
34 string "RTC used to set the system time"
38 The RTC device that will be used to (re)initialize the system
50 sleep states. Do not specify an RTC here unless it stays powered
54 bool "Set the RTC time based on NTP synchronization"
58 in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11
62 string "RTC used to synchronize NTP adjustment"
[all …]
Drtc-sc27xx.c14 #include <linux/rtc.h>
104 struct rtc_device *rtc; member
113 * The Spreadtrum RTC controller has 3 groups registers, including time, normal
114 * alarm and auxiliary alarm. The time group registers are used to set RTC time,
126 static int sprd_rtc_clear_alarm_ints(struct sprd_rtc *rtc) in sprd_rtc_clear_alarm_ints() argument
128 return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, in sprd_rtc_clear_alarm_ints()
132 static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock) in sprd_rtc_lock_alarm() argument
137 ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_SPG_VALUE, &val); in sprd_rtc_lock_alarm()
147 ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_SPG_UPD, val); in sprd_rtc_lock_alarm()
152 ret = regmap_read_poll_timeout(rtc->regmap, in sprd_rtc_lock_alarm()
[all …]
Drtc-armada38x.c3 * RTC driver for the Armada 38x Marvell SoCs
16 #include <linux/rtc.h>
86 /* Initialize the RTC-MBUS bridge timing */
87 void (*update_mbus_timing)(struct armada38x_rtc *rtc);
88 u32 (*read_rtc_reg)(struct armada38x_rtc *rtc, u8 rtc_reg);
89 void (*clear_isr)(struct armada38x_rtc *rtc);
90 void (*unmask_interrupt)(struct armada38x_rtc *rtc);
96 * register write to the RTC hard macro so that the required update
98 * According to errata RES-3124064, Write to any RTC register
99 * may fail. As a workaround, before writing to RTC
[all …]
Ddev.c3 * RTC subsystem, dev interface
15 #include <linux/rtc.h>
17 #include "rtc-core.h"
25 struct rtc_device *rtc = container_of(inode->i_cdev, in rtc_dev_open() local
28 if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) in rtc_dev_open()
31 file->private_data = rtc; in rtc_dev_open()
33 spin_lock_irq(&rtc->irq_lock); in rtc_dev_open()
34 rtc->irq_data = 0; in rtc_dev_open()
35 spin_unlock_irq(&rtc->irq_lock); in rtc_dev_open()
42 * Routine to poll RTC seconds field for change as often as possible,
[all …]
Drtc-at91sam9.c7 * Based on rtc-at91rm9200.c by Rick Bronson
20 #include <linux/rtc.h>
38 * The RTC's value is the RTT counter plus that offset. The RTC's alarm
42 * choose from, or a "real" RTC module. All systems have multiple GPBR
43 * registers available, likewise usable for more than "RTC" support.
81 #define rtt_readl(rtc, field) \ argument
82 readl((rtc)->rtt + AT91_RTT_ ## field)
83 #define rtt_writel(rtc, field, val) \ argument
84 writel((val), (rtc)->rtt + AT91_RTT_ ## field)
86 static inline unsigned int gpbr_readl(struct sam9_rtc *rtc) in gpbr_readl() argument
[all …]
Drtc-st-lpc.c3 * rtc-st-lpc.c - ST's LPC RTC, powered by the Low Power Timer
23 #include <linux/rtc.h>
52 static void st_rtc_set_hw_alarm(struct st_rtc *rtc, in st_rtc_set_hw_alarm() argument
57 spin_lock_irqsave(&rtc->lock, flags); in st_rtc_set_hw_alarm()
59 writel_relaxed(1, rtc->ioaddr + LPC_WDT_OFF); in st_rtc_set_hw_alarm()
61 writel_relaxed(msb, rtc->ioaddr + LPC_LPA_MSB_OFF); in st_rtc_set_hw_alarm()
62 writel_relaxed(lsb, rtc->ioaddr + LPC_LPA_LSB_OFF); in st_rtc_set_hw_alarm()
63 writel_relaxed(1, rtc->ioaddr + LPC_LPA_START_OFF); in st_rtc_set_hw_alarm()
65 writel_relaxed(0, rtc->ioaddr + LPC_WDT_OFF); in st_rtc_set_hw_alarm()
67 spin_unlock_irqrestore(&rtc->lock, flags); in st_rtc_set_hw_alarm()
[all …]
/kernel/linux/linux-6.6/drivers/rtc/
DMakefile3 # Makefile for RTC class/drivers.
9 obj-$(CONFIG_RTC_CLASS) += rtc-core.o
10 obj-$(CONFIG_RTC_MC146818_LIB) += rtc-mc146818-lib.o
11 rtc-core-y := class.o interface.o
13 rtc-core-$(CONFIG_RTC_NVMEM) += nvmem.o
14 rtc-core-$(CONFIG_RTC_INTF_DEV) += dev.o
15 rtc-core-$(CONFIG_RTC_INTF_PROC) += proc.o
16 rtc-core-$(CONFIG_RTC_INTF_SYSFS) += sysfs.o
22 obj-$(CONFIG_RTC_DRV_88PM80X) += rtc-88pm80x.o
23 obj-$(CONFIG_RTC_DRV_88PM860X) += rtc-88pm860x.o
[all …]
Dclass.c3 * RTC subsystem, base class
15 #include <linux/rtc.h>
21 #include "rtc-core.h"
28 struct rtc_device *rtc = to_rtc_device(dev); in rtc_device_release() local
29 struct timerqueue_head *head = &rtc->timerqueue; in rtc_device_release()
32 mutex_lock(&rtc->ops_lock); in rtc_device_release()
35 mutex_unlock(&rtc->ops_lock); in rtc_device_release()
37 cancel_work_sync(&rtc->irqwork); in rtc_device_release()
39 ida_free(&rtc_ida, rtc->id); in rtc_device_release()
40 mutex_destroy(&rtc->ops_lock); in rtc_device_release()
[all …]
Drtc-ds1685.c3 * An rtc driver for the Dallas/Maxim DS1685/DS1687 and related real-time
13 * Application Note 90, Using the Multiplex Bus RTC Extended Features.
23 #include <linux/rtc.h>
26 #include <linux/rtc/ds1685.h>
40 * ds1685_read - read a value from an rtc register.
41 * @rtc: pointer to the ds1685 rtc structure.
45 ds1685_read(struct ds1685_priv *rtc, int reg) in ds1685_read() argument
47 return readb((u8 __iomem *)rtc->regs + in ds1685_read()
48 (reg * rtc->regstep)); in ds1685_read()
52 * ds1685_write - write a value to an rtc register.
[all …]
Drtc-omap.c8 * Copyright (C) 2006 David Brownell (new RTC framework)
27 #include <linux/rtc.h>
28 #include <linux/rtc/rtc-omap.h>
31 * The OMAP RTC is a year/month/day/hours/minutes/seconds BCD clock
39 * RTC_OFF_NOFF used as the reset signal (so the RTC won't be reset),
40 * and wiring RTC_WAKE_INT (so the RTC alarm can wake the system from
45 /* RTC registers */
137 void (*lock)(struct omap_rtc *rtc);
138 void (*unlock)(struct omap_rtc *rtc);
142 struct rtc_device *rtc; member
[all …]
Dinterface.c3 * RTC subsystem, interface functions
11 #include <linux/rtc.h>
18 #include <trace/events/rtc.h>
20 static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer);
21 static void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer);
23 static void rtc_add_offset(struct rtc_device *rtc, struct rtc_time *tm) in rtc_add_offset() argument
27 if (!rtc->offset_secs) in rtc_add_offset()
33 * Since the reading time values from RTC device are always in the RTC in rtc_add_offset()
38 if ((rtc->start_secs > rtc->range_min && secs >= rtc->start_secs) || in rtc_add_offset()
39 (rtc->start_secs < rtc->range_min && in rtc_add_offset()
[all …]
Drtc-lpc32xx.c11 #include <linux/rtc.h>
51 struct rtc_device *rtc; member
58 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); in lpc32xx_rtc_read_time() local
60 elapsed_sec = rtc_readl(rtc, LPC32XX_RTC_UCOUNT); in lpc32xx_rtc_read_time()
68 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); in lpc32xx_rtc_set_time() local
72 spin_lock_irq(&rtc->lock); in lpc32xx_rtc_set_time()
74 /* RTC must be disabled during count update */ in lpc32xx_rtc_set_time()
75 tmp = rtc_readl(rtc, LPC32XX_RTC_CTRL); in lpc32xx_rtc_set_time()
76 rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp | LPC32XX_RTC_CTRL_CNTR_DIS); in lpc32xx_rtc_set_time()
77 rtc_writel(rtc, LPC32XX_RTC_UCOUNT, secs); in lpc32xx_rtc_set_time()
[all …]
Drtc-armada38x.c3 * RTC driver for the Armada 38x Marvell SoCs
15 #include <linux/rtc.h>
85 /* Initialize the RTC-MBUS bridge timing */
86 void (*update_mbus_timing)(struct armada38x_rtc *rtc);
87 u32 (*read_rtc_reg)(struct armada38x_rtc *rtc, u8 rtc_reg);
88 void (*clear_isr)(struct armada38x_rtc *rtc);
89 void (*unmask_interrupt)(struct armada38x_rtc *rtc);
95 * register write to the RTC hard macro so that the required update
97 * According to errata RES-3124064, Write to any RTC register
98 * may fail. As a workaround, before writing to RTC
[all …]
DKconfig3 # RTC class/drivers configuration
19 Generic RTC class support. If you say yes here, you will
26 bool "Set system time from RTC on startup and resume"
30 the value read from a specified RTC device. This is useful to avoid
34 string "RTC used to set the system time"
38 The RTC device that will be used to (re)initialize the system
50 sleep states. Do not specify an RTC here unless it stays powered
54 bool "Set the RTC time based on NTP synchronization"
58 in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11
62 string "RTC used to synchronize NTP adjustment"
[all …]
Ddev.c3 * RTC subsystem, dev interface
15 #include <linux/rtc.h>
17 #include "rtc-core.h"
25 struct rtc_device *rtc = container_of(inode->i_cdev, in rtc_dev_open() local
28 if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) in rtc_dev_open()
31 file->private_data = rtc; in rtc_dev_open()
33 spin_lock_irq(&rtc->irq_lock); in rtc_dev_open()
34 rtc->irq_data = 0; in rtc_dev_open()
35 spin_unlock_irq(&rtc->irq_lock); in rtc_dev_open()
42 * Routine to poll RTC seconds field for change as often as possible,
[all …]
Drtc-sh.c3 * SuperH On-Chip RTC Support
9 * Based on the old arch/sh/kernel/cpu/rtc.c by:
18 #include <linux/rtc.h>
29 #include <asm/rtc.h>
31 /* Default values for RZ/A RTC */
38 #define DRV_NAME "sh-rtc"
44 #define RSECCNT RTC_REG(1) /* RTC sec */
45 #define RMINCNT RTC_REG(2) /* RTC min */
46 #define RHRCNT RTC_REG(3) /* RTC hour */
47 #define RWKCNT RTC_REG(4) /* RTC week */
[all …]
Drtc-sc27xx.c14 #include <linux/rtc.h>
104 struct rtc_device *rtc; member
113 * The Spreadtrum RTC controller has 3 groups registers, including time, normal
114 * alarm and auxiliary alarm. The time group registers are used to set RTC time,
126 static int sprd_rtc_clear_alarm_ints(struct sprd_rtc *rtc) in sprd_rtc_clear_alarm_ints() argument
128 return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, in sprd_rtc_clear_alarm_ints()
132 static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock) in sprd_rtc_lock_alarm() argument
137 ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_SPG_VALUE, &val); in sprd_rtc_lock_alarm()
147 ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_SPG_UPD, val); in sprd_rtc_lock_alarm()
152 ret = regmap_read_poll_timeout(rtc->regmap, in sprd_rtc_lock_alarm()
[all …]
Drtc-at91sam9.c7 * Based on rtc-at91rm9200.c by Rick Bronson
20 #include <linux/rtc.h>
38 * The RTC's value is the RTT counter plus that offset. The RTC's alarm
42 * choose from, or a "real" RTC module. All systems have multiple GPBR
43 * registers available, likewise usable for more than "RTC" support.
81 #define rtt_readl(rtc, field) \ argument
82 readl((rtc)->rtt + AT91_RTT_ ## field)
83 #define rtt_writel(rtc, field, val) \ argument
84 writel((val), (rtc)->rtt + AT91_RTT_ ## field)
86 static inline unsigned int gpbr_readl(struct sam9_rtc *rtc) in gpbr_readl() argument
[all …]

12345678910>>...130