Home
last modified time | relevance | path

Searched refs:alm (Results 1 – 24 of 24) sorted by relevance

/linux-6.1.9/drivers/rtc/
Drtc-mcp795.c260 static int mcp795_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in mcp795_set_alarm() argument
274 later = rtc_tm_to_time64(&alm->time); in mcp795_set_alarm()
279 (SEC_PER_DAY * (365 + is_leap_year(alm->time.tm_year)))) in mcp795_set_alarm()
290 alm->time.tm_year = -1; in mcp795_set_alarm()
291 alm->time.tm_isdst = -1; in mcp795_set_alarm()
292 alm->time.tm_yday = -1; in mcp795_set_alarm()
294 tmp[0] = (tmp[0] & 0x80) | bin2bcd(alm->time.tm_sec); in mcp795_set_alarm()
295 tmp[1] = (tmp[1] & 0x80) | bin2bcd(alm->time.tm_min); in mcp795_set_alarm()
296 tmp[2] = (tmp[2] & 0xE0) | bin2bcd(alm->time.tm_hour); in mcp795_set_alarm()
297 tmp[3] = (tmp[3] & 0x80) | bin2bcd(alm->time.tm_wday + 1); in mcp795_set_alarm()
[all …]
Drtc-mv.c97 static int mv_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in mv_rtc_read_alarm() argument
116 alm->time.tm_sec = bcd2bin(second); in mv_rtc_read_alarm()
117 alm->time.tm_min = bcd2bin(minute); in mv_rtc_read_alarm()
118 alm->time.tm_hour = bcd2bin(hour); in mv_rtc_read_alarm()
119 alm->time.tm_mday = bcd2bin(day); in mv_rtc_read_alarm()
120 alm->time.tm_wday = bcd2bin(wday); in mv_rtc_read_alarm()
121 alm->time.tm_mon = bcd2bin(month) - 1; in mv_rtc_read_alarm()
123 alm->time.tm_year = bcd2bin(year) + 100; in mv_rtc_read_alarm()
125 alm->enabled = !!readl(ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS); in mv_rtc_read_alarm()
127 return rtc_valid_tm(&alm->time); in mv_rtc_read_alarm()
[all …]
Drtc-s35390a.c276 static int s35390a_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in s35390a_rtc_set_alarm() argument
284 "mon=%d, year=%d, wday=%d\n", __func__, alm->time.tm_sec, in s35390a_rtc_set_alarm()
285 alm->time.tm_min, alm->time.tm_hour, alm->time.tm_mday, in s35390a_rtc_set_alarm()
286 alm->time.tm_mon, alm->time.tm_year, alm->time.tm_wday); in s35390a_rtc_set_alarm()
298 if (alm->enabled) in s35390a_rtc_set_alarm()
308 if (alm->time.tm_wday != -1) in s35390a_rtc_set_alarm()
309 buf[S35390A_ALRM_BYTE_WDAY] = bin2bcd(alm->time.tm_wday) | 0x80; in s35390a_rtc_set_alarm()
314 alm->time.tm_hour) | 0x80; in s35390a_rtc_set_alarm()
315 buf[S35390A_ALRM_BYTE_MINS] = bin2bcd(alm->time.tm_min) | 0x80; in s35390a_rtc_set_alarm()
317 if (alm->time.tm_hour >= 12) in s35390a_rtc_set_alarm()
[all …]
Drtc-efi.c191 efi_time_t eft, alm; in efi_procfs() local
196 memset(&alm, 0, sizeof(alm)); in efi_procfs()
200 efi.get_wakeup_time(&enabled, &pending, &alm); in efi_procfs()
222 alm.hour, alm.minute, alm.second, alm.nanosecond, in efi_procfs()
223 alm.year, alm.month, alm.day, in efi_procfs()
224 alm.daylight, in efi_procfs()
232 seq_printf(seq, "Timezone\t: %u\n", alm.timezone); in efi_procfs()
Drtc-rc5t583.c107 static int rc5t583_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in rc5t583_rtc_read_alarm() argument
121 alm->time.tm_sec = 0; in rc5t583_rtc_read_alarm()
122 alm->time.tm_min = bcd2bin(alarm_data[0]); in rc5t583_rtc_read_alarm()
123 alm->time.tm_hour = bcd2bin(alarm_data[1]); in rc5t583_rtc_read_alarm()
124 alm->time.tm_mday = bcd2bin(alarm_data[2]); in rc5t583_rtc_read_alarm()
125 alm->time.tm_mon = bcd2bin(alarm_data[3]) - 1; in rc5t583_rtc_read_alarm()
126 alm->time.tm_year = bcd2bin(alarm_data[4]) + 100; in rc5t583_rtc_read_alarm()
134 alm->enabled = 1; in rc5t583_rtc_read_alarm()
139 static int rc5t583_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in rc5t583_rtc_set_alarm() argument
149 alarm_data[0] = bin2bcd(alm->time.tm_min); in rc5t583_rtc_set_alarm()
[all …]
Drtc-palmas.c112 static int palmas_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in palmas_rtc_read_alarm() argument
127 alm->time.tm_sec = bcd2bin(alarm_data[0]); in palmas_rtc_read_alarm()
128 alm->time.tm_min = bcd2bin(alarm_data[1]); in palmas_rtc_read_alarm()
129 alm->time.tm_hour = bcd2bin(alarm_data[2]); in palmas_rtc_read_alarm()
130 alm->time.tm_mday = bcd2bin(alarm_data[3]); in palmas_rtc_read_alarm()
131 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; in palmas_rtc_read_alarm()
132 alm->time.tm_year = bcd2bin(alarm_data[5]) + 100; in palmas_rtc_read_alarm()
142 alm->enabled = 1; in palmas_rtc_read_alarm()
146 static int palmas_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in palmas_rtc_set_alarm() argument
158 alarm_data[0] = bin2bcd(alm->time.tm_sec); in palmas_rtc_set_alarm()
[all …]
Dsysfs.c131 struct rtc_wkalrm alm; in wakealarm_show() local
141 retval = rtc_read_alarm(to_rtc_device(dev), &alm); in wakealarm_show()
142 if (retval == 0 && alm.enabled) { in wakealarm_show()
143 alarm = rtc_tm_to_time64(&alm.time); in wakealarm_show()
157 struct rtc_wkalrm alm; in wakealarm_store() local
165 retval = rtc_read_time(rtc, &alm.time); in wakealarm_store()
168 now = rtc_tm_to_time64(&alm.time); in wakealarm_store()
190 retval = rtc_read_alarm(rtc, &alm); in wakealarm_store()
193 if (alm.enabled) { in wakealarm_store()
195 push = rtc_tm_to_time64(&alm.time); in wakealarm_store()
[all …]
Drtc-spear.c256 static int spear_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in spear_rtc_read_alarm() argument
265 alm->time.tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; in spear_rtc_read_alarm()
266 alm->time.tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; in spear_rtc_read_alarm()
267 alm->time.tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; in spear_rtc_read_alarm()
268 alm->time.tm_mday = (date >> MDAY_SHIFT) & DAY_MASK; in spear_rtc_read_alarm()
269 alm->time.tm_mon = (date >> MONTH_SHIFT) & MONTH_MASK; in spear_rtc_read_alarm()
270 alm->time.tm_year = (date >> YEAR_SHIFT) & YEAR_MASK; in spear_rtc_read_alarm()
272 bcd2tm(&alm->time); in spear_rtc_read_alarm()
273 alm->enabled = readl(config->ioaddr + CTRL_REG) & INT_ENABLE; in spear_rtc_read_alarm()
286 static int spear_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in spear_rtc_set_alarm() argument
[all …]
Drtc-tps65910.c140 static int tps65910_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in tps65910_rtc_read_alarm() argument
154 alm->time.tm_sec = bcd2bin(alarm_data[0]); in tps65910_rtc_read_alarm()
155 alm->time.tm_min = bcd2bin(alarm_data[1]); in tps65910_rtc_read_alarm()
156 alm->time.tm_hour = bcd2bin(alarm_data[2]); in tps65910_rtc_read_alarm()
157 alm->time.tm_mday = bcd2bin(alarm_data[3]); in tps65910_rtc_read_alarm()
158 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; in tps65910_rtc_read_alarm()
159 alm->time.tm_year = bcd2bin(alarm_data[5]) + 100; in tps65910_rtc_read_alarm()
166 alm->enabled = 1; in tps65910_rtc_read_alarm()
171 static int tps65910_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in tps65910_rtc_set_alarm() argument
181 alarm_data[0] = bin2bcd(alm->time.tm_sec); in tps65910_rtc_set_alarm()
[all …]
Drtc-bd70528.c111 struct bd71828_rtc_alm alm; in bd71828_set_alarm() local
114 ret = regmap_bulk_read(r->regmap, r->bd718xx_alm_block_start, &alm, in bd71828_set_alarm()
115 sizeof(alm)); in bd71828_set_alarm()
121 tm2rtc(&a->time, &alm.alm0); in bd71828_set_alarm()
124 alm.alm_mask &= ~BD70528_MASK_ALM_EN; in bd71828_set_alarm()
126 alm.alm_mask |= BD70528_MASK_ALM_EN; in bd71828_set_alarm()
128 ret = regmap_bulk_write(r->regmap, r->bd718xx_alm_block_start, &alm, in bd71828_set_alarm()
129 sizeof(alm)); in bd71828_set_alarm()
140 struct bd71828_rtc_alm alm; in bd71828_read_alarm() local
143 ret = regmap_bulk_read(r->regmap, r->bd718xx_alm_block_start, &alm, in bd71828_read_alarm()
[all …]
Drtc-ds1286.c262 static int ds1286_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1286_read_alarm() argument
272 alm->time.tm_min = ds1286_rtc_read(priv, RTC_MINUTES_ALARM) & 0x7f; in ds1286_read_alarm()
273 alm->time.tm_hour = ds1286_rtc_read(priv, RTC_HOURS_ALARM) & 0x1f; in ds1286_read_alarm()
274 alm->time.tm_wday = ds1286_rtc_read(priv, RTC_DAY_ALARM) & 0x07; in ds1286_read_alarm()
278 alm->time.tm_min = bcd2bin(alm->time.tm_min); in ds1286_read_alarm()
279 alm->time.tm_hour = bcd2bin(alm->time.tm_hour); in ds1286_read_alarm()
280 alm->time.tm_sec = 0; in ds1286_read_alarm()
284 static int ds1286_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1286_set_alarm() argument
289 hrs = alm->time.tm_hour; in ds1286_set_alarm()
290 min = alm->time.tm_min; in ds1286_set_alarm()
[all …]
Drtc-pcf2123.c247 static int pcf2123_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in pcf2123_rtc_read_alarm() argument
259 alm->time.tm_min = bcd2bin(rxbuf[0] & 0x7F); in pcf2123_rtc_read_alarm()
260 alm->time.tm_hour = bcd2bin(rxbuf[1] & 0x3F); in pcf2123_rtc_read_alarm()
261 alm->time.tm_mday = bcd2bin(rxbuf[2] & 0x3F); in pcf2123_rtc_read_alarm()
262 alm->time.tm_wday = bcd2bin(rxbuf[3] & 0x07); in pcf2123_rtc_read_alarm()
264 dev_dbg(dev, "%s: alm is %ptR\n", __func__, &alm->time); in pcf2123_rtc_read_alarm()
270 alm->enabled = !!(val & CTRL2_AIE); in pcf2123_rtc_read_alarm()
275 static int pcf2123_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in pcf2123_rtc_set_alarm() argument
281 dev_dbg(dev, "%s: alm is %ptR\n", __func__, &alm->time); in pcf2123_rtc_set_alarm()
294 txbuf[0] = bin2bcd(alm->time.tm_min & 0x7F); in pcf2123_rtc_set_alarm()
[all …]
Drtc-twl.c369 static int twl_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in twl_rtc_read_alarm() argument
383 alm->time.tm_sec = bcd2bin(rtc_data[0]); in twl_rtc_read_alarm()
384 alm->time.tm_min = bcd2bin(rtc_data[1]); in twl_rtc_read_alarm()
385 alm->time.tm_hour = bcd2bin(rtc_data[2]); in twl_rtc_read_alarm()
386 alm->time.tm_mday = bcd2bin(rtc_data[3]); in twl_rtc_read_alarm()
387 alm->time.tm_mon = bcd2bin(rtc_data[4]) - 1; in twl_rtc_read_alarm()
388 alm->time.tm_year = bcd2bin(rtc_data[5]) + 100; in twl_rtc_read_alarm()
392 alm->enabled = 1; in twl_rtc_read_alarm()
397 static int twl_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in twl_rtc_set_alarm() argument
408 alarm_data[0] = bin2bcd(alm->time.tm_sec); in twl_rtc_set_alarm()
[all …]
Drtc-davinci.c362 static int davinci_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in davinci_rtc_read_alarm() argument
369 alm->time.tm_sec = 0; in davinci_rtc_read_alarm()
374 alm->time.tm_min = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_AMIN)); in davinci_rtc_read_alarm()
377 alm->time.tm_hour = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_AHOUR)); in davinci_rtc_read_alarm()
390 convertfromdays(days, &alm->time); in davinci_rtc_read_alarm()
392 alm->pending = !!(rtcss_read(davinci_rtc, in davinci_rtc_read_alarm()
395 alm->enabled = alm->pending && device_may_wakeup(dev); in davinci_rtc_read_alarm()
400 static int davinci_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in davinci_rtc_set_alarm() argument
406 convert2days(&days, &alm->time); in davinci_rtc_set_alarm()
411 rtcss_write(davinci_rtc, bin2bcd(alm->time.tm_min), PRTCSS_RTC_AMIN); in davinci_rtc_set_alarm()
[all …]
Drtc-omap.c339 static int omap_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in omap_rtc_read_alarm() argument
347 alm->time.tm_sec = rtc_read(rtc, OMAP_RTC_ALARM_SECONDS_REG); in omap_rtc_read_alarm()
348 alm->time.tm_min = rtc_read(rtc, OMAP_RTC_ALARM_MINUTES_REG); in omap_rtc_read_alarm()
349 alm->time.tm_hour = rtc_read(rtc, OMAP_RTC_ALARM_HOURS_REG); in omap_rtc_read_alarm()
350 alm->time.tm_mday = rtc_read(rtc, OMAP_RTC_ALARM_DAYS_REG); in omap_rtc_read_alarm()
351 alm->time.tm_mon = rtc_read(rtc, OMAP_RTC_ALARM_MONTHS_REG); in omap_rtc_read_alarm()
352 alm->time.tm_year = rtc_read(rtc, OMAP_RTC_ALARM_YEARS_REG); in omap_rtc_read_alarm()
356 bcd2tm(&alm->time); in omap_rtc_read_alarm()
359 alm->enabled = !!(interrupts & OMAP_RTC_INTERRUPTS_IT_ALARM); in omap_rtc_read_alarm()
364 static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in omap_rtc_set_alarm() argument
[all …]
Drtc-ds1305.c266 static int ds1305_get_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1305_get_alarm() argument
285 alm->enabled = !!(ds1305->ctrl[0] & DS1305_AEI0); in ds1305_get_alarm()
286 alm->pending = !!(ds1305->ctrl[1] & DS1305_AEI0); in ds1305_get_alarm()
308 alm->time.tm_sec = bcd2bin(buf[DS1305_SEC]); in ds1305_get_alarm()
309 alm->time.tm_min = bcd2bin(buf[DS1305_MIN]); in ds1305_get_alarm()
310 alm->time.tm_hour = bcd2hour(buf[DS1305_HOUR]); in ds1305_get_alarm()
318 static int ds1305_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1305_set_alarm() argument
328 later = rtc_tm_to_time64(&alm->time); in ds1305_set_alarm()
355 buf[1 + DS1305_SEC] = bin2bcd(alm->time.tm_sec); in ds1305_set_alarm()
356 buf[1 + DS1305_MIN] = bin2bcd(alm->time.tm_min); in ds1305_set_alarm()
[all …]
Drtc-mt2712.c193 static int mt2712_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in mt2712_rtc_read_alarm() argument
196 struct rtc_time *tm = &alm->time; in mt2712_rtc_read_alarm()
200 alm->enabled = !!(irqen & MT2712_IRQ_EN_AL); in mt2712_rtc_read_alarm()
231 static int mt2712_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in mt2712_rtc_set_alarm() argument
234 struct rtc_time *tm = &alm->time; in mt2712_rtc_set_alarm()
237 tm, alm->enabled); in mt2712_rtc_set_alarm()
264 mt2712_rtc_alarm_irq_enable(dev, alm->enabled); in mt2712_rtc_set_alarm()
Drtc-mt6397.c149 static int mtk_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in mtk_rtc_read_alarm() argument
151 struct rtc_time *tm = &alm->time; in mtk_rtc_read_alarm()
170 alm->enabled = !!(irqen & RTC_IRQ_EN_AL); in mtk_rtc_read_alarm()
171 alm->pending = !!(pdn2 & RTC_PDN2_PWRON_ALARM); in mtk_rtc_read_alarm()
190 static int mtk_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in mtk_rtc_set_alarm() argument
192 struct rtc_time *tm = &alm->time; in mtk_rtc_set_alarm()
219 if (alm->enabled) { in mtk_rtc_set_alarm()
Drtc-stmp3xxx.c207 static int stmp3xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in stmp3xxx_rtc_read_alarm() argument
211 rtc_time64_to_tm(readl(rtc_data->io + STMP3XXX_RTC_ALARM), &alm->time); in stmp3xxx_rtc_read_alarm()
215 static int stmp3xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in stmp3xxx_rtc_set_alarm() argument
219 writel(rtc_tm_to_time64(&alm->time), rtc_data->io + STMP3XXX_RTC_ALARM); in stmp3xxx_rtc_set_alarm()
221 stmp3xxx_alarm_irq_enable(dev, alm->enabled); in stmp3xxx_rtc_set_alarm()
Drtc-hym8563.c179 static int hym8563_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in hym8563_rtc_read_alarm() argument
182 struct rtc_time *alm_tm = &alm->time; in hym8563_rtc_read_alarm()
211 alm->enabled = 1; in hym8563_rtc_read_alarm()
216 static int hym8563_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in hym8563_rtc_set_alarm() argument
219 struct rtc_time *alm_tm = &alm->time; in hym8563_rtc_set_alarm()
249 return hym8563_rtc_alarm_irq_enable(dev, alm->enabled); in hym8563_rtc_set_alarm()
Drtc-fsl-ftm-alarm.c192 static int ftm_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in ftm_rtc_read_alarm() argument
208 static int ftm_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in ftm_rtc_set_alarm() argument
214 alm_time = rtc_tm_to_time64(&alm->time); in ftm_rtc_set_alarm()
/linux-6.1.9/kernel/power/
Dsuspend_test.c74 struct rtc_wkalrm alm; in test_wakealarm() local
79 status = rtc_read_time(rtc, &alm.time); in test_wakealarm()
84 now = rtc_tm_to_time64(&alm.time); in test_wakealarm()
86 memset(&alm, 0, sizeof alm); in test_wakealarm()
87 rtc_time64_to_tm(now + TEST_SUSPEND_SECONDS, &alm.time); in test_wakealarm()
88 alm.enabled = true; in test_wakealarm()
90 status = rtc_set_alarm(rtc, &alm); in test_wakealarm()
124 alm.enabled = false; in test_wakealarm()
125 rtc_set_alarm(rtc, &alm); in test_wakealarm()
/linux-6.1.9/drivers/clocksource/
Dtimer-atmel-st.c141 u32 alm; in clkevt32k_next_event() local
155 alm = read_CRTR(); in clkevt32k_next_event()
158 regmap_write(regmap_st, AT91_ST_RTAR, alm); in clkevt32k_next_event()
162 alm += delta; in clkevt32k_next_event()
163 regmap_write(regmap_st, AT91_ST_RTAR, alm); in clkevt32k_next_event()
/linux-6.1.9/tools/perf/util/
Dhist.c1209 struct map *alm = NULL; in hist_entry_iter__add() local
1212 alm = map__get(al->map); in hist_entry_iter__add()
1217 map__put(alm); in hist_entry_iter__add()
1252 map__put(alm); in hist_entry_iter__add()