Home
last modified time | relevance | path

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

/drivers/rtc/
Drtc-mv.c99 static int mv_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in mv_rtc_read_alarm() argument
118 alm->time.tm_sec = bcd2bin(second); in mv_rtc_read_alarm()
119 alm->time.tm_min = bcd2bin(minute); in mv_rtc_read_alarm()
120 alm->time.tm_hour = bcd2bin(hour); in mv_rtc_read_alarm()
121 alm->time.tm_mday = bcd2bin(day); in mv_rtc_read_alarm()
122 alm->time.tm_wday = bcd2bin(wday); in mv_rtc_read_alarm()
123 alm->time.tm_mon = bcd2bin(month) - 1; in mv_rtc_read_alarm()
125 alm->time.tm_year = bcd2bin(year) + 100; in mv_rtc_read_alarm()
127 if (rtc_valid_tm(&alm->time) < 0) { in mv_rtc_read_alarm()
129 rtc_time_to_tm(0, &alm->time); in mv_rtc_read_alarm()
[all …]
Drtc-s35390a.c209 static int s35390a_set_alarm(struct i2c_client *client, struct rtc_wkalrm *alm) in s35390a_set_alarm() argument
216 "mon=%d, year=%d, wday=%d\n", __func__, alm->time.tm_sec, in s35390a_set_alarm()
217 alm->time.tm_min, alm->time.tm_hour, alm->time.tm_mday, in s35390a_set_alarm()
218 alm->time.tm_mon, alm->time.tm_year, alm->time.tm_wday); in s35390a_set_alarm()
230 if (alm->enabled) in s35390a_set_alarm()
243 if (alm->time.tm_wday != -1) in s35390a_set_alarm()
244 buf[S35390A_ALRM_BYTE_WDAY] = bin2bcd(alm->time.tm_wday) | 0x80; in s35390a_set_alarm()
247 alm->time.tm_hour) | 0x80; in s35390a_set_alarm()
248 buf[S35390A_ALRM_BYTE_MINS] = bin2bcd(alm->time.tm_min) | 0x80; in s35390a_set_alarm()
250 if (alm->time.tm_hour >= 12) in s35390a_set_alarm()
[all …]
Drtc-sysfs.c142 struct rtc_wkalrm alm; in rtc_sysfs_show_wakealarm() local
152 retval = rtc_read_alarm(to_rtc_device(dev), &alm); in rtc_sysfs_show_wakealarm()
153 if (retval == 0 && alm.enabled) { in rtc_sysfs_show_wakealarm()
154 rtc_tm_to_time(&alm.time, &alarm); in rtc_sysfs_show_wakealarm()
167 struct rtc_wkalrm alm; in rtc_sysfs_set_wakealarm() local
175 retval = rtc_read_time(rtc, &alm.time); in rtc_sysfs_set_wakealarm()
178 rtc_tm_to_time(&alm.time, &now); in rtc_sysfs_set_wakealarm()
194 retval = rtc_read_alarm(rtc, &alm); in rtc_sysfs_set_wakealarm()
197 if (alm.enabled) in rtc_sysfs_set_wakealarm()
200 alm.enabled = 1; in rtc_sysfs_set_wakealarm()
[all …]
Drtc-tps65910.c129 static int tps65910_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in tps65910_rtc_read_alarm() argument
143 alm->time.tm_sec = bcd2bin(alarm_data[0]); in tps65910_rtc_read_alarm()
144 alm->time.tm_min = bcd2bin(alarm_data[1]); in tps65910_rtc_read_alarm()
145 alm->time.tm_hour = bcd2bin(alarm_data[2]); in tps65910_rtc_read_alarm()
146 alm->time.tm_mday = bcd2bin(alarm_data[3]); in tps65910_rtc_read_alarm()
147 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; in tps65910_rtc_read_alarm()
148 alm->time.tm_year = bcd2bin(alarm_data[5]) + 100; in tps65910_rtc_read_alarm()
155 alm->enabled = 1; in tps65910_rtc_read_alarm()
160 static int tps65910_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in tps65910_rtc_set_alarm() argument
170 alarm_data[0] = bin2bcd(alm->time.tm_sec); in tps65910_rtc_set_alarm()
[all …]
Drtc-palmas.c161 static int palmas_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in palmas_rtc_read_alarm() argument
176 alm->time.tm_sec = bcd2bin(alarm_data[0]); in palmas_rtc_read_alarm()
177 alm->time.tm_min = bcd2bin(alarm_data[1]); in palmas_rtc_read_alarm()
178 alm->time.tm_hour = bcd2bin(alarm_data[2]); in palmas_rtc_read_alarm()
179 alm->time.tm_mday = bcd2bin(alarm_data[3]); in palmas_rtc_read_alarm()
180 alm->time.tm_mon = bcd2bin(alarm_data[4]) - 1; in palmas_rtc_read_alarm()
181 alm->time.tm_year = year_bcd2bin(alarm_data[5]); in palmas_rtc_read_alarm()
191 alm->enabled = 1; in palmas_rtc_read_alarm()
195 static int palmas_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in palmas_rtc_set_alarm() argument
207 alarm_data[0] = bin2bcd(alm->time.tm_sec); in palmas_rtc_set_alarm()
[all …]
Drtc-omap.c243 static int omap_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in omap_rtc_read_alarm() argument
248 alm->time.tm_sec = rtc_read(OMAP_RTC_ALARM_SECONDS_REG); in omap_rtc_read_alarm()
249 alm->time.tm_min = rtc_read(OMAP_RTC_ALARM_MINUTES_REG); in omap_rtc_read_alarm()
250 alm->time.tm_hour = rtc_read(OMAP_RTC_ALARM_HOURS_REG); in omap_rtc_read_alarm()
251 alm->time.tm_mday = rtc_read(OMAP_RTC_ALARM_DAYS_REG); in omap_rtc_read_alarm()
252 alm->time.tm_mon = rtc_read(OMAP_RTC_ALARM_MONTHS_REG); in omap_rtc_read_alarm()
253 alm->time.tm_year = rtc_read(OMAP_RTC_ALARM_YEARS_REG); in omap_rtc_read_alarm()
257 bcd2tm(&alm->time); in omap_rtc_read_alarm()
258 alm->enabled = !!(rtc_read(OMAP_RTC_INTERRUPTS_REG) in omap_rtc_read_alarm()
264 static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in omap_rtc_set_alarm() argument
[all …]
Drtc-rc5t583.c117 static int rc5t583_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in rc5t583_rtc_read_alarm() argument
131 alm->time.tm_min = bcd2bin(alarm_data[0]); in rc5t583_rtc_read_alarm()
132 alm->time.tm_hour = bcd2bin(alarm_data[1]); in rc5t583_rtc_read_alarm()
133 alm->time.tm_mday = bcd2bin(alarm_data[2]); in rc5t583_rtc_read_alarm()
134 alm->time.tm_mon = bcd2bin(alarm_data[3]) - 1; in rc5t583_rtc_read_alarm()
135 alm->time.tm_year = bcd2bin(alarm_data[4]) + 100; in rc5t583_rtc_read_alarm()
143 alm->enabled = 1; in rc5t583_rtc_read_alarm()
148 static int rc5t583_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in rc5t583_rtc_set_alarm() argument
158 alarm_data[0] = bin2bcd(alm->time.tm_min); in rc5t583_rtc_set_alarm()
159 alarm_data[1] = bin2bcd(alm->time.tm_hour); in rc5t583_rtc_set_alarm()
[all …]
Drtc-davinci.c386 static int davinci_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in davinci_rtc_read_alarm() argument
396 alm->time.tm_min = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_AMIN)); in davinci_rtc_read_alarm()
399 alm->time.tm_hour = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_AHOUR)); in davinci_rtc_read_alarm()
412 if (convertfromdays(days, &alm->time) < 0) in davinci_rtc_read_alarm()
415 alm->pending = !!(rtcss_read(davinci_rtc, in davinci_rtc_read_alarm()
418 alm->enabled = alm->pending && device_may_wakeup(dev); in davinci_rtc_read_alarm()
423 static int davinci_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in davinci_rtc_set_alarm() argument
429 if (alm->time.tm_mday <= 0 && alm->time.tm_mon < 0 in davinci_rtc_set_alarm()
430 && alm->time.tm_year < 0) { in davinci_rtc_set_alarm()
437 alm->time.tm_mday = tm.tm_mday; in davinci_rtc_set_alarm()
[all …]
Drtc-spear.c262 static int spear_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in spear_rtc_read_alarm() argument
271 alm->time.tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; in spear_rtc_read_alarm()
272 alm->time.tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; in spear_rtc_read_alarm()
273 alm->time.tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; in spear_rtc_read_alarm()
274 alm->time.tm_mday = (date >> MDAY_SHIFT) & DAY_MASK; in spear_rtc_read_alarm()
275 alm->time.tm_mon = (date >> MONTH_SHIFT) & MONTH_MASK; in spear_rtc_read_alarm()
276 alm->time.tm_year = (date >> YEAR_SHIFT) & YEAR_MASK; in spear_rtc_read_alarm()
278 bcd2tm(&alm->time); in spear_rtc_read_alarm()
279 alm->enabled = readl(config->ioaddr + CTRL_REG) & INT_ENABLE; in spear_rtc_read_alarm()
292 static int spear_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in spear_rtc_set_alarm() argument
[all …]
Drtc-twl.c343 static int twl_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in twl_rtc_read_alarm() argument
356 alm->time.tm_sec = bcd2bin(rtc_data[0]); in twl_rtc_read_alarm()
357 alm->time.tm_min = bcd2bin(rtc_data[1]); in twl_rtc_read_alarm()
358 alm->time.tm_hour = bcd2bin(rtc_data[2]); in twl_rtc_read_alarm()
359 alm->time.tm_mday = bcd2bin(rtc_data[3]); in twl_rtc_read_alarm()
360 alm->time.tm_mon = bcd2bin(rtc_data[4]) - 1; in twl_rtc_read_alarm()
361 alm->time.tm_year = bcd2bin(rtc_data[5]) + 100; in twl_rtc_read_alarm()
365 alm->enabled = 1; in twl_rtc_read_alarm()
370 static int twl_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in twl_rtc_set_alarm() argument
379 alarm_data[0] = bin2bcd(alm->time.tm_sec); in twl_rtc_set_alarm()
[all …]
Drtc-ds1286.c268 static int ds1286_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1286_read_alarm() argument
278 alm->time.tm_min = ds1286_rtc_read(priv, RTC_MINUTES_ALARM) & 0x7f; in ds1286_read_alarm()
279 alm->time.tm_hour = ds1286_rtc_read(priv, RTC_HOURS_ALARM) & 0x1f; in ds1286_read_alarm()
280 alm->time.tm_wday = ds1286_rtc_read(priv, RTC_DAY_ALARM) & 0x07; in ds1286_read_alarm()
284 alm->time.tm_min = bcd2bin(alm->time.tm_min); in ds1286_read_alarm()
285 alm->time.tm_hour = bcd2bin(alm->time.tm_hour); in ds1286_read_alarm()
286 alm->time.tm_sec = 0; in ds1286_read_alarm()
290 static int ds1286_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1286_set_alarm() argument
295 hrs = alm->time.tm_hour; in ds1286_set_alarm()
296 min = alm->time.tm_min; in ds1286_set_alarm()
[all …]
Drtc-ds1305.c275 static int ds1305_get_alarm(struct device *dev, struct rtc_wkalrm *alm) in ds1305_get_alarm() argument
294 alm->enabled = !!(ds1305->ctrl[0] & DS1305_AEI0); in ds1305_get_alarm()
295 alm->pending = !!(ds1305->ctrl[1] & DS1305_AEI0); in ds1305_get_alarm()
317 alm->time.tm_sec = bcd2bin(buf[DS1305_SEC]); in ds1305_get_alarm()
318 alm->time.tm_min = bcd2bin(buf[DS1305_MIN]); in ds1305_get_alarm()
319 alm->time.tm_hour = bcd2hour(buf[DS1305_HOUR]); in ds1305_get_alarm()
320 alm->time.tm_mday = -1; in ds1305_get_alarm()
321 alm->time.tm_mon = -1; in ds1305_get_alarm()
322 alm->time.tm_year = -1; in ds1305_get_alarm()
324 alm->time.tm_wday = -1; in ds1305_get_alarm()
[all …]
Drtc-stmp3xxx.c189 static int stmp3xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) in stmp3xxx_rtc_read_alarm() argument
193 rtc_time_to_tm(readl(rtc_data->io + STMP3XXX_RTC_ALARM), &alm->time); in stmp3xxx_rtc_read_alarm()
197 static int stmp3xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm) in stmp3xxx_rtc_set_alarm() argument
202 rtc_tm_to_time(&alm->time, &t); in stmp3xxx_rtc_set_alarm()
205 stmp3xxx_alarm_irq_enable(dev, alm->enabled); in stmp3xxx_rtc_set_alarm()
/drivers/char/
Defirtc.c302 efi_time_t eft, alm; in efi_rtc_proc_show() local
308 memset(&alm, 0, sizeof(alm)); in efi_rtc_proc_show()
314 efi.get_wakeup_time(&enabled, &pending, &alm); in efi_rtc_proc_show()
339 alm.hour, alm.minute, alm.second, alm.nanosecond, in efi_rtc_proc_show()
340 alm.year, alm.month, alm.day, in efi_rtc_proc_show()
341 alm.daylight, in efi_rtc_proc_show()
349 seq_printf(m, "Timezone : %u\n", alm.timezone); in efi_rtc_proc_show()