Home
last modified time | relevance | path

Searched refs:rtc_data (Results 1 – 11 of 11) sorted by relevance

/Linux-v6.6/drivers/rtc/
Drtc-stmp3xxx.c79 struct stmp3xxx_rtc_data *rtc_data = dev_get_drvdata(dev); in stmp3xxx_wdt_set_timeout() local
82 writel(timeout, rtc_data->io + STMP3XXX_RTC_WATCHDOG); in stmp3xxx_wdt_set_timeout()
84 rtc_data->io + STMP3XXX_RTC_CTRL + STMP_OFFSET_REG_SET); in stmp3xxx_wdt_set_timeout()
86 rtc_data->io + STMP3XXX_RTC_PERSISTENT1 + STMP_OFFSET_REG_SET); in stmp3xxx_wdt_set_timeout()
89 rtc_data->io + STMP3XXX_RTC_CTRL + STMP_OFFSET_REG_CLR); in stmp3xxx_wdt_set_timeout()
91 rtc_data->io + STMP3XXX_RTC_PERSISTENT1 + STMP_OFFSET_REG_CLR); in stmp3xxx_wdt_set_timeout()
123 static int stmp3xxx_wait_time(struct stmp3xxx_rtc_data *rtc_data) in stmp3xxx_wait_time() argument
137 if (!(readl(rtc_data->io + STMP3XXX_RTC_STAT) & in stmp3xxx_wait_time()
142 return (readl(rtc_data->io + STMP3XXX_RTC_STAT) & in stmp3xxx_wait_time()
150 struct stmp3xxx_rtc_data *rtc_data = dev_get_drvdata(dev); in stmp3xxx_rtc_gettime() local
[all …]
Drtc-sd3078.c86 unsigned char rtc_data[NUM_TIME_REGS] = {0}; in sd3078_rtc_read_time() local
91 ret = regmap_bulk_read(sd3078->regmap, SD3078_REG_SC, rtc_data, in sd3078_rtc_read_time()
98 tm->tm_sec = bcd2bin(rtc_data[SD3078_REG_SC] & 0x7F); in sd3078_rtc_read_time()
99 tm->tm_min = bcd2bin(rtc_data[SD3078_REG_MN] & 0x7F); in sd3078_rtc_read_time()
106 hour = rtc_data[SD3078_REG_HR]; in sd3078_rtc_read_time()
108 tm->tm_hour = bcd2bin(rtc_data[SD3078_REG_HR] & 0x3F); in sd3078_rtc_read_time()
110 tm->tm_hour = bcd2bin(rtc_data[SD3078_REG_HR] & 0x1F) + 12; in sd3078_rtc_read_time()
112 tm->tm_hour = bcd2bin(rtc_data[SD3078_REG_HR] & 0x1F); in sd3078_rtc_read_time()
114 tm->tm_mday = bcd2bin(rtc_data[SD3078_REG_DM] & 0x3F); in sd3078_rtc_read_time()
115 tm->tm_wday = rtc_data[SD3078_REG_DW] & 0x07; in sd3078_rtc_read_time()
[all …]
Drtc-rc5t583.c62 u8 rtc_data[NUM_TIME_REGS]; in rc5t583_rtc_read_time() local
65 ret = regmap_bulk_read(rc5t583->regmap, RC5T583_RTC_SEC, rtc_data, in rc5t583_rtc_read_time()
72 tm->tm_sec = bcd2bin(rtc_data[0]); in rc5t583_rtc_read_time()
73 tm->tm_min = bcd2bin(rtc_data[1]); in rc5t583_rtc_read_time()
74 tm->tm_hour = bcd2bin(rtc_data[2]); in rc5t583_rtc_read_time()
75 tm->tm_wday = bcd2bin(rtc_data[3]); in rc5t583_rtc_read_time()
76 tm->tm_mday = bcd2bin(rtc_data[4]); in rc5t583_rtc_read_time()
77 tm->tm_mon = bcd2bin(rtc_data[5]) - 1; in rc5t583_rtc_read_time()
78 tm->tm_year = bcd2bin(rtc_data[6]) + 100; in rc5t583_rtc_read_time()
86 unsigned char rtc_data[NUM_TIME_REGS]; in rc5t583_rtc_set_time() local
[all …]
Drtc-twl.c261 unsigned char rtc_data[ALL_TIME_REGS]; in twl_rtc_read_time() local
298 ret = twl_i2c_read(TWL_MODULE_RTC, rtc_data, in twl_rtc_read_time()
316 tm->tm_sec = bcd2bin(rtc_data[0]); in twl_rtc_read_time()
317 tm->tm_min = bcd2bin(rtc_data[1]); in twl_rtc_read_time()
318 tm->tm_hour = bcd2bin(rtc_data[2]); in twl_rtc_read_time()
319 tm->tm_mday = bcd2bin(rtc_data[3]); in twl_rtc_read_time()
320 tm->tm_mon = bcd2bin(rtc_data[4]) - 1; in twl_rtc_read_time()
321 tm->tm_year = bcd2bin(rtc_data[5]) + 100; in twl_rtc_read_time()
330 unsigned char rtc_data[ALL_TIME_REGS]; in twl_rtc_set_time() local
333 rtc_data[0] = bin2bcd(tm->tm_sec); in twl_rtc_set_time()
[all …]
Drtc-palmas.c37 unsigned char rtc_data[PALMAS_NUM_TIME_REGS]; in palmas_rtc_read_time() local
50 rtc_data, PALMAS_NUM_TIME_REGS); in palmas_rtc_read_time()
56 tm->tm_sec = bcd2bin(rtc_data[0]); in palmas_rtc_read_time()
57 tm->tm_min = bcd2bin(rtc_data[1]); in palmas_rtc_read_time()
58 tm->tm_hour = bcd2bin(rtc_data[2]); in palmas_rtc_read_time()
59 tm->tm_mday = bcd2bin(rtc_data[3]); in palmas_rtc_read_time()
60 tm->tm_mon = bcd2bin(rtc_data[4]) - 1; in palmas_rtc_read_time()
61 tm->tm_year = bcd2bin(rtc_data[5]) + 100; in palmas_rtc_read_time()
68 unsigned char rtc_data[PALMAS_NUM_TIME_REGS]; in palmas_rtc_set_time() local
72 rtc_data[0] = bin2bcd(tm->tm_sec); in palmas_rtc_set_time()
[all …]
Drtc-rk808.c99 u8 rtc_data[NUM_TIME_REGS]; in rk808_rtc_readtime() local
126 rtc_data, NUM_TIME_REGS); in rk808_rtc_readtime()
132 tm->tm_sec = bcd2bin(rtc_data[0] & SECONDS_REG_MSK); in rk808_rtc_readtime()
133 tm->tm_min = bcd2bin(rtc_data[1] & MINUTES_REG_MAK); in rk808_rtc_readtime()
134 tm->tm_hour = bcd2bin(rtc_data[2] & HOURS_REG_MSK); in rk808_rtc_readtime()
135 tm->tm_mday = bcd2bin(rtc_data[3] & DAYS_REG_MSK); in rk808_rtc_readtime()
136 tm->tm_mon = (bcd2bin(rtc_data[4] & MONTHS_REG_MSK)) - 1; in rk808_rtc_readtime()
137 tm->tm_year = (bcd2bin(rtc_data[5] & YEARS_REG_MSK)) + 100; in rk808_rtc_readtime()
138 tm->tm_wday = bcd2bin(rtc_data[6] & WEEKS_REG_MSK); in rk808_rtc_readtime()
149 u8 rtc_data[NUM_TIME_REGS]; in rk808_rtc_set_time() local
[all …]
Drtc-tps65910.c70 unsigned char rtc_data[NUM_TIME_REGS]; in tps65910_rtc_read_time() local
82 ret = regmap_bulk_read(tps->regmap, TPS65910_SECONDS, rtc_data, in tps65910_rtc_read_time()
89 tm->tm_sec = bcd2bin(rtc_data[0]); in tps65910_rtc_read_time()
90 tm->tm_min = bcd2bin(rtc_data[1]); in tps65910_rtc_read_time()
91 tm->tm_hour = bcd2bin(rtc_data[2]); in tps65910_rtc_read_time()
92 tm->tm_mday = bcd2bin(rtc_data[3]); in tps65910_rtc_read_time()
93 tm->tm_mon = bcd2bin(rtc_data[4]) - 1; in tps65910_rtc_read_time()
94 tm->tm_year = bcd2bin(rtc_data[5]) + 100; in tps65910_rtc_read_time()
101 unsigned char rtc_data[NUM_TIME_REGS]; in tps65910_rtc_set_time() local
105 rtc_data[0] = bin2bcd(tm->tm_sec); in tps65910_rtc_set_time()
[all …]
Drtc-loongson.c172 u32 rtc_data[2]; in loongson_rtc_read_time() local
178 ret = regmap_bulk_read(priv->regmap, TOY_READ0_REG, rtc_data, in loongson_rtc_read_time()
179 ARRAY_SIZE(rtc_data)); in loongson_rtc_read_time()
183 tm->tm_sec = FIELD_GET(TOY_SEC, rtc_data[0]); in loongson_rtc_read_time()
184 tm->tm_min = FIELD_GET(TOY_MIN, rtc_data[0]); in loongson_rtc_read_time()
185 tm->tm_hour = FIELD_GET(TOY_HOUR, rtc_data[0]); in loongson_rtc_read_time()
186 tm->tm_mday = FIELD_GET(TOY_DAY, rtc_data[0]); in loongson_rtc_read_time()
187 tm->tm_mon = FIELD_GET(TOY_MON, rtc_data[0]) - 1; in loongson_rtc_read_time()
188 tm->tm_year = rtc_data[1]; in loongson_rtc_read_time()
198 u32 rtc_data[2]; in loongson_rtc_set_time() local
[all …]
Drtc-bd70528.c163 struct bd70528_rtc_data rtc_data; in bd71828_set_time() local
166 ret = regmap_bulk_read(r->regmap, r->reg_time_start, &rtc_data, in bd71828_set_time()
167 sizeof(rtc_data)); in bd71828_set_time()
172 tm2rtc(t, &rtc_data); in bd71828_set_time()
174 ret = regmap_bulk_write(r->regmap, r->reg_time_start, &rtc_data, in bd71828_set_time()
175 sizeof(rtc_data)); in bd71828_set_time()
185 struct bd70528_rtc_data rtc_data; in bd70528_get_time() local
189 ret = regmap_bulk_read(r->regmap, r->reg_time_start, &rtc_data, in bd70528_get_time()
190 sizeof(rtc_data)); in bd70528_get_time()
196 rtc2tm(&rtc_data, t); in bd70528_get_time()
Drtc-ab-b5ze-s3.c731 struct abb5zes3_rtc_data *rtc_data = dev_get_drvdata(dev); in abb5zes3_rtc_alarm_irq_enable() local
734 if (rtc_data->irq) { in abb5zes3_rtc_alarm_irq_enable()
735 if (rtc_data->timer_alarm) in abb5zes3_rtc_alarm_irq_enable()
748 struct abb5zes3_rtc_data *rtc_data = dev_get_drvdata(dev); in _abb5zes3_rtc_interrupt() local
749 struct rtc_device *rtc = rtc_data->rtc; in _abb5zes3_rtc_interrupt()
753 ret = regmap_bulk_read(rtc_data->regmap, 0, regs, in _abb5zes3_rtc_interrupt()
769 _abb5zes3_rtc_battery_low_irq_enable(rtc_data->regmap, false); in _abb5zes3_rtc_interrupt()
799 rtc_data->timer_alarm = 0; in _abb5zes3_rtc_interrupt()
905 struct abb5zes3_rtc_data *rtc_data = dev_get_drvdata(dev); in abb5zes3_rtc_suspend() local
908 return enable_irq_wake(rtc_data->irq); in abb5zes3_rtc_suspend()
[all …]
Drtc-optee.c101 void *rtc_data; in optee_rtc_settime() local
120 rtc_data = tee_shm_get_va(priv->shm, 0); in optee_rtc_settime()
121 if (IS_ERR(rtc_data)) in optee_rtc_settime()
122 return PTR_ERR(rtc_data); in optee_rtc_settime()
124 memcpy(rtc_data, &optee_tm, sizeof(struct optee_rtc_time)); in optee_rtc_settime()