Home
last modified time | relevance | path

Searched refs:time (Results 1 – 25 of 565) sorted by relevance

12345678910>>...23

/drivers/rtc/
Drtc-mc146818-lib.c106 int mc146818_get_time(struct rtc_time *time) in mc146818_get_time() argument
120 memset(time, 0, sizeof(*time)); in mc146818_get_time()
136 time->tm_sec = CMOS_READ(RTC_SECONDS); in mc146818_get_time()
145 if (time->tm_sec != CMOS_READ(RTC_SECONDS)) { in mc146818_get_time()
156 time->tm_min = CMOS_READ(RTC_MINUTES); in mc146818_get_time()
157 time->tm_hour = CMOS_READ(RTC_HOURS); in mc146818_get_time()
158 time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); in mc146818_get_time()
159 time->tm_mon = CMOS_READ(RTC_MONTH); in mc146818_get_time()
160 time->tm_year = CMOS_READ(RTC_YEAR); in mc146818_get_time()
181 retry |= time->tm_sec != CMOS_READ(RTC_SECONDS); in mc146818_get_time()
[all …]
Drtc-pcf50633.c51 u_int8_t time[PCF50633_TI_EXTENT]; member
64 rtc->tm_sec = bcd2bin(pcf->time[PCF50633_TI_SEC]); in pcf2rtc_time()
65 rtc->tm_min = bcd2bin(pcf->time[PCF50633_TI_MIN]); in pcf2rtc_time()
66 rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); in pcf2rtc_time()
67 rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); in pcf2rtc_time()
68 rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); in pcf2rtc_time()
69 rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]) - 1; in pcf2rtc_time()
70 rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; in pcf2rtc_time()
75 pcf->time[PCF50633_TI_SEC] = bin2bcd(rtc->tm_sec); in rtc2pcf_time()
76 pcf->time[PCF50633_TI_MIN] = bin2bcd(rtc->tm_min); in rtc2pcf_time()
[all …]
Drtc-wm8350.c93 u16 time[4]; in wm8350_rtc_settime() local
97 time[0] = tm->tm_sec; in wm8350_rtc_settime()
98 time[0] |= tm->tm_min << WM8350_RTC_MINS_SHIFT; in wm8350_rtc_settime()
99 time[1] = tm->tm_hour; in wm8350_rtc_settime()
100 time[1] |= (tm->tm_wday + 1) << WM8350_RTC_DAY_SHIFT; in wm8350_rtc_settime()
101 time[2] = tm->tm_mday; in wm8350_rtc_settime()
102 time[2] |= (tm->tm_mon + 1) << WM8350_RTC_MTH_SHIFT; in wm8350_rtc_settime()
103 time[3] = ((tm->tm_year + 1900) / 100) << WM8350_RTC_YHUNDREDS_SHIFT; in wm8350_rtc_settime()
104 time[3] |= (tm->tm_year + 1900) % 100; in wm8350_rtc_settime()
107 time[0], time[1], time[2], time[3]); in wm8350_rtc_settime()
[all …]
Drtc-dm355evm.c35 union evm_time time; in dm355evm_rtc_read_time() local
48 if (tries && time.bytes[0] == status) in dm355evm_rtc_read_time()
50 time.bytes[0] = status; in dm355evm_rtc_read_time()
55 if (tries && time.bytes[1] == status) in dm355evm_rtc_read_time()
57 time.bytes[1] = status; in dm355evm_rtc_read_time()
62 if (tries && time.bytes[2] == status) in dm355evm_rtc_read_time()
64 time.bytes[2] = status; in dm355evm_rtc_read_time()
69 if (tries && time.bytes[3] == status) in dm355evm_rtc_read_time()
71 time.bytes[3] = status; in dm355evm_rtc_read_time()
75 dev_dbg(dev, "read timestamp %08x\n", time.value); in dm355evm_rtc_read_time()
[all …]
Dinterface.c70 time64_t time = rtc_tm_to_time64(tm); in rtc_valid_range() local
77 if (time < range_min || time > range_max) in rtc_valid_range()
194 alarm->time.tm_sec = -1; in rtc_read_alarm_internal()
195 alarm->time.tm_min = -1; in rtc_read_alarm_internal()
196 alarm->time.tm_hour = -1; in rtc_read_alarm_internal()
197 alarm->time.tm_mday = -1; in rtc_read_alarm_internal()
198 alarm->time.tm_mon = -1; in rtc_read_alarm_internal()
199 alarm->time.tm_year = -1; in rtc_read_alarm_internal()
200 alarm->time.tm_wday = -1; in rtc_read_alarm_internal()
201 alarm->time.tm_yday = -1; in rtc_read_alarm_internal()
[all …]
Drtc-ds1305.c170 static int ds1305_get_time(struct device *dev, struct rtc_time *time) in ds1305_get_time() argument
188 time->tm_sec = bcd2bin(buf[DS1305_SEC]); in ds1305_get_time()
189 time->tm_min = bcd2bin(buf[DS1305_MIN]); in ds1305_get_time()
190 time->tm_hour = bcd2hour(buf[DS1305_HOUR]); in ds1305_get_time()
191 time->tm_wday = buf[DS1305_WDAY] - 1; in ds1305_get_time()
192 time->tm_mday = bcd2bin(buf[DS1305_MDAY]); in ds1305_get_time()
193 time->tm_mon = bcd2bin(buf[DS1305_MON]) - 1; in ds1305_get_time()
194 time->tm_year = bcd2bin(buf[DS1305_YEAR]) + 100; in ds1305_get_time()
198 "read", time->tm_sec, time->tm_min, in ds1305_get_time()
199 time->tm_hour, time->tm_mday, in ds1305_get_time()
[all …]
Drtc-spear.c202 unsigned int time, date; in spear_rtc_read_time() local
207 time = readl(config->ioaddr + TIME_REG); in spear_rtc_read_time()
209 tm->tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; in spear_rtc_read_time()
210 tm->tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; in spear_rtc_read_time()
211 tm->tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; in spear_rtc_read_time()
231 unsigned int time, date; in spear_rtc_set_time() local
236 time = (tm->tm_sec << SECOND_SHIFT) | (tm->tm_min << MINUTE_SHIFT) | in spear_rtc_set_time()
240 writel(time, config->ioaddr + TIME_REG); in spear_rtc_set_time()
257 unsigned int time, date; in spear_rtc_read_alarm() local
261 time = readl(config->ioaddr + ALARM_TIME_REG); in spear_rtc_read_alarm()
[all …]
Drtc-mcp795.c274 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()
300 tmp[4] = (tmp[4] & 0xC0) | bin2bcd(alm->time.tm_mday); in mcp795_set_alarm()
[all …]
Drtc-ds1302.c37 static int ds1302_rtc_set_time(struct device *dev, struct rtc_time *time) in ds1302_rtc_set_time() argument
58 *bp++ = bin2bcd(time->tm_sec); in ds1302_rtc_set_time()
59 *bp++ = bin2bcd(time->tm_min); in ds1302_rtc_set_time()
60 *bp++ = bin2bcd(time->tm_hour); in ds1302_rtc_set_time()
61 *bp++ = bin2bcd(time->tm_mday); in ds1302_rtc_set_time()
62 *bp++ = bin2bcd(time->tm_mon + 1); in ds1302_rtc_set_time()
63 *bp++ = time->tm_wday + 1; in ds1302_rtc_set_time()
64 *bp++ = bin2bcd(time->tm_year % 100); in ds1302_rtc_set_time()
72 static int ds1302_rtc_get_time(struct device *dev, struct rtc_time *time) in ds1302_rtc_get_time() argument
88 time->tm_sec = bcd2bin(buf[RTC_ADDR_SEC]); in ds1302_rtc_get_time()
[all …]
Drtc-rk808.c77 time64_t time = rtc_tm_to_time64(tm); in rockchip_to_gregorian() local
78 rtc_time64_to_tm(time + nov2dec_transitions(tm) * 86400, tm); in rockchip_to_gregorian()
84 time64_t time = rtc_tm_to_time64(tm); in gregorian_to_rockchip() local
85 rtc_time64_to_tm(time - extra_days * 86400, tm); in gregorian_to_rockchip()
92 rtc_time64_to_tm(time - (extra_days - 1) * 86400, tm); in gregorian_to_rockchip()
207 alrm->time.tm_sec = bcd2bin(alrm_data[0] & SECONDS_REG_MSK); in rk808_rtc_readalarm()
208 alrm->time.tm_min = bcd2bin(alrm_data[1] & MINUTES_REG_MAK); in rk808_rtc_readalarm()
209 alrm->time.tm_hour = bcd2bin(alrm_data[2] & HOURS_REG_MSK); in rk808_rtc_readalarm()
210 alrm->time.tm_mday = bcd2bin(alrm_data[3] & DAYS_REG_MSK); in rk808_rtc_readalarm()
211 alrm->time.tm_mon = (bcd2bin(alrm_data[4] & MONTHS_REG_MSK)) - 1; in rk808_rtc_readalarm()
[all …]
Drtc-mv.c116 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()
127 return rtc_valid_tm(&alm->time); in mv_rtc_read_alarm()
136 if (alm->time.tm_sec >= 0) in mv_rtc_set_alarm()
137 rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_sec)) in mv_rtc_set_alarm()
[all …]
Drtc-cmos.c254 struct rtc_time *time; member
263 struct rtc_time *time = p->time; in cmos_read_alarm_callback() local
265 time->tm_sec = CMOS_READ(RTC_SECONDS_ALARM); in cmos_read_alarm_callback()
266 time->tm_min = CMOS_READ(RTC_MINUTES_ALARM); in cmos_read_alarm_callback()
267 time->tm_hour = CMOS_READ(RTC_HOURS_ALARM); in cmos_read_alarm_callback()
271 time->tm_mday = CMOS_READ(p->cmos->day_alrm) & 0x3f; in cmos_read_alarm_callback()
272 if (!time->tm_mday) in cmos_read_alarm_callback()
273 time->tm_mday = -1; in cmos_read_alarm_callback()
276 time->tm_mon = CMOS_READ(p->cmos->mon_alrm); in cmos_read_alarm_callback()
277 if (!time->tm_mon) in cmos_read_alarm_callback()
[all …]
Drtc-ds3232.c97 static int ds3232_read_time(struct device *dev, struct rtc_time *time) in ds3232_read_time() argument
126 time->tm_sec = bcd2bin(second); in ds3232_read_time()
127 time->tm_min = bcd2bin(minute); in ds3232_read_time()
131 time->tm_hour = bcd2bin(hour & 0x1F) + 12; in ds3232_read_time()
133 time->tm_hour = bcd2bin(hour & 0x1F); in ds3232_read_time()
135 time->tm_hour = bcd2bin(hour); in ds3232_read_time()
139 time->tm_wday = bcd2bin(week) - 1; in ds3232_read_time()
140 time->tm_mday = bcd2bin(day); in ds3232_read_time()
142 time->tm_mon = bcd2bin(month & 0x7F) - 1; in ds3232_read_time()
146 time->tm_year = bcd2bin(year) + add_century; in ds3232_read_time()
[all …]
Drtc-ds1307.c434 t->time.tm_sec = bcd2bin(regs[0] & 0x7f); in ds1337_read_alarm()
435 t->time.tm_min = bcd2bin(regs[1] & 0x7f); in ds1337_read_alarm()
436 t->time.tm_hour = bcd2bin(regs[2] & 0x3f); in ds1337_read_alarm()
437 t->time.tm_mday = bcd2bin(regs[3] & 0x3f); in ds1337_read_alarm()
445 "alarm read", t->time.tm_sec, t->time.tm_min, in ds1337_read_alarm()
446 t->time.tm_hour, t->time.tm_mday, in ds1337_read_alarm()
461 "alarm set", t->time.tm_sec, t->time.tm_min, in ds1337_set_alarm()
462 t->time.tm_hour, t->time.tm_mday, in ds1337_set_alarm()
479 regs[0] = bin2bcd(t->time.tm_sec); in ds1337_set_alarm()
480 regs[1] = bin2bcd(t->time.tm_min); in ds1337_set_alarm()
[all …]
Drtc-vt8500.c104 u32 date, time; in vt8500_rtc_read_time() local
107 time = readl(vt8500_rtc->regbase + VT8500_RTC_TR); in vt8500_rtc_read_time()
109 tm->tm_sec = bcd2bin(time & TIME_SEC_MASK); in vt8500_rtc_read_time()
110 tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S); in vt8500_rtc_read_time()
111 tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S); in vt8500_rtc_read_time()
116 tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S; in vt8500_rtc_read_time()
147 alrm->time.tm_mday = bcd2bin((alarm & ALARM_DAY_MASK) >> ALARM_DAY_S); in vt8500_rtc_read_alarm()
148 alrm->time.tm_hour = bcd2bin((alarm & TIME_HOUR_MASK) >> TIME_HOUR_S); in vt8500_rtc_read_alarm()
149 alrm->time.tm_min = bcd2bin((alarm & TIME_MIN_MASK) >> TIME_MIN_S); in vt8500_rtc_read_alarm()
150 alrm->time.tm_sec = bcd2bin((alarm & TIME_SEC_MASK)); in vt8500_rtc_read_alarm()
[all …]
Drtc-s35390a.c284 "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()
288 if (alm->time.tm_sec != 0) in s35390a_rtc_set_alarm()
311 if (alm->time.tm_wday != -1) in s35390a_rtc_set_alarm()
312 buf[S35390A_ALRM_BYTE_WDAY] = bin2bcd(alm->time.tm_wday) | 0x80; in s35390a_rtc_set_alarm()
317 alm->time.tm_hour) | 0x80; in s35390a_rtc_set_alarm()
318 buf[S35390A_ALRM_BYTE_MINS] = bin2bcd(alm->time.tm_min) | 0x80; in s35390a_rtc_set_alarm()
320 if (alm->time.tm_hour >= 12) in s35390a_rtc_set_alarm()
367 alm->time.tm_wday = in s35390a_rtc_read_alarm()
[all …]
Drtc-wm831x.c152 u32 time = (time1[0] << 16) | time1[1]; in wm831x_rtc_readtime() local
154 rtc_time64_to_tm(time, tm); in wm831x_rtc_readtime()
173 unsigned long time, new_time; in wm831x_rtc_settime() local
177 time = rtc_tm_to_time64(tm); in wm831x_rtc_settime()
180 (time >> 16) & 0xffff); in wm831x_rtc_settime()
186 ret = wm831x_reg_write(wm831x, WM831X_RTC_TIME_2, time & 0xffff); in wm831x_rtc_settime()
219 if (new_time - time > 1) { in wm831x_rtc_settime()
235 u32 time; in wm831x_rtc_readalarm() local
244 time = (data[0] << 16) | data[1]; in wm831x_rtc_readalarm()
246 rtc_time64_to_tm(time, &alrm->time); in wm831x_rtc_readalarm()
[all …]
Drtc-asm9260.c195 alrm->time.tm_year = ioread32(priv->iobase + HW_ALYEAR); in asm9260_rtc_read_alarm()
196 alrm->time.tm_mon = ioread32(priv->iobase + HW_ALMON); in asm9260_rtc_read_alarm()
197 alrm->time.tm_mday = ioread32(priv->iobase + HW_ALDOM); in asm9260_rtc_read_alarm()
198 alrm->time.tm_wday = ioread32(priv->iobase + HW_ALDOW); in asm9260_rtc_read_alarm()
199 alrm->time.tm_yday = ioread32(priv->iobase + HW_ALDOY); in asm9260_rtc_read_alarm()
200 alrm->time.tm_hour = ioread32(priv->iobase + HW_ALHOUR); in asm9260_rtc_read_alarm()
201 alrm->time.tm_min = ioread32(priv->iobase + HW_ALMIN); in asm9260_rtc_read_alarm()
202 alrm->time.tm_sec = ioread32(priv->iobase + HW_ALSEC); in asm9260_rtc_read_alarm()
207 return rtc_valid_tm(&alrm->time); in asm9260_rtc_read_alarm()
214 iowrite32(alrm->time.tm_year, priv->iobase + HW_ALYEAR); in asm9260_rtc_set_alarm()
[all …]
Drtc-meson-vrtc.c23 struct timespec64 time; in meson_vrtc_read_time() local
26 ktime_get_real_ts64(&time); in meson_vrtc_read_time()
27 rtc_time64_to_tm(time.tv_sec, tm); in meson_vrtc_read_time()
33 unsigned long time) in meson_vrtc_set_wakeup_time() argument
35 writel_relaxed(time, vrtc->io_alarm); in meson_vrtc_set_wakeup_time()
44 vrtc->alarm_time = rtc_tm_to_time64(&alarm->time); in meson_vrtc_set_alarm()
97 struct timespec64 time; in meson_vrtc_suspend() local
99 ktime_get_real_ts64(&time); in meson_vrtc_suspend()
100 local_time = time.tv_sec; in meson_vrtc_suspend()
/drivers/gpu/drm/nouveau/nvkm/core/
Dsubdev.c58 s64 time; in nvkm_subdev_fini() local
61 time = ktime_to_us(ktime_get()); in nvkm_subdev_fini()
74 time = ktime_to_us(ktime_get()) - time; in nvkm_subdev_fini()
75 nvkm_trace(subdev, "%s completed in %lldus\n", action, time); in nvkm_subdev_fini()
82 s64 time; in nvkm_subdev_preinit() local
85 time = ktime_to_us(ktime_get()); in nvkm_subdev_preinit()
95 time = ktime_to_us(ktime_get()) - time; in nvkm_subdev_preinit()
96 nvkm_trace(subdev, "preinit completed in %lldus\n", time); in nvkm_subdev_preinit()
103 s64 time; in nvkm_subdev_init() local
107 time = ktime_to_us(ktime_get()); in nvkm_subdev_init()
[all …]
/drivers/base/power/
Dtrace.c91 static struct rtc_time time = { in set_magic_time() local
103 time.tm_year = (n % 100); in set_magic_time()
105 time.tm_mon = (n % 12); in set_magic_time()
107 time.tm_mday = (n % 28) + 1; in set_magic_time()
109 time.tm_hour = (n % 24); in set_magic_time()
111 time.tm_min = (n % 20) * 3; in set_magic_time()
113 mc146818_set_time(&time); in set_magic_time()
120 struct rtc_time time; in read_magic_time() local
123 if (mc146818_get_time(&time) < 0) { in read_magic_time()
128 pr_info("RTC time: %ptRt, date: %ptRd\n", &time, &time); in read_magic_time()
[all …]
/drivers/input/misc/
Daxp20x-pek.c48 unsigned int time; member
53 { .time = 128, .idx = 0 },
54 { .time = 1000, .idx = 2 },
55 { .time = 3000, .idx = 1 },
56 { .time = 2000, .idx = 3 },
60 { .time = 128, .idx = 0 },
61 { .time = 1000, .idx = 1 },
62 { .time = 2000, .idx = 2 },
63 { .time = 3000, .idx = 3 },
67 { .time = 4000, .idx = 0 },
[all …]
/drivers/firmware/efi/
Defi-pstore.c52 u64 time; in efi_pstore_read_func() local
61 &record->type, &part, &cnt, &time, &data_type) == 5) { in efi_pstore_read_func()
62 record->id = generic_id(time, part, cnt); in efi_pstore_read_func()
65 record->time.tv_sec = time; in efi_pstore_read_func()
66 record->time.tv_nsec = 0; in efi_pstore_read_func()
73 &record->type, &part, &cnt, &time) == 4) { in efi_pstore_read_func()
74 record->id = generic_id(time, part, cnt); in efi_pstore_read_func()
77 record->time.tv_sec = time; in efi_pstore_read_func()
78 record->time.tv_nsec = 0; in efi_pstore_read_func()
82 &record->type, &part, &time) == 3) { in efi_pstore_read_func()
[all …]
/drivers/gpu/drm/radeon/
Dradeon_benchmark.c76 unsigned int time, in radeon_benchmark_log_results() argument
80 unsigned int throughput = (n * (size >> 10)) / time; in radeon_benchmark_log_results()
83 kind, n, size >> 10, sdomain, ddomain, time, in radeon_benchmark_log_results()
94 int time; in radeon_benchmark_move() local
123 time = radeon_benchmark_do_move(rdev, size, saddr, daddr, in radeon_benchmark_move()
126 if (time < 0) in radeon_benchmark_move()
128 if (time > 0) in radeon_benchmark_move()
129 radeon_benchmark_log_results(n, size, time, in radeon_benchmark_move()
134 time = radeon_benchmark_do_move(rdev, size, saddr, daddr, in radeon_benchmark_move()
137 if (time < 0) in radeon_benchmark_move()
[all …]
/drivers/net/fddi/skfp/
Dhwt.c55 void hwt_start(struct s_smc *smc, u_long time) in hwt_start() argument
59 if (time > HWT_MAX) in hwt_start()
60 time = HWT_MAX ; in hwt_start()
62 smc->hw.t_start = time ; in hwt_start()
65 cnt = (u_short)time ; in hwt_start()
194 u_long time ; in hwt_quick_read() local
198 time = inpd(ADDR(B2_TI_VAL)) ; in hwt_quick_read()
199 outpd(ADDR(B2_TI_INI),time) ; in hwt_quick_read()
203 return time; in hwt_quick_read()

12345678910>>...23