Home
last modified time | relevance | path

Searched refs:hour (Results 1 – 25 of 98) sorted by relevance

1234

/Linux-v5.4/arch/m68k/atari/
Dtime.c141 int hour, year; in atari_mste_hwclk() local
156 hour = t->tm_hour; in atari_mste_hwclk()
158 if (hour > 11) in atari_mste_hwclk()
159 hour += 20 - 12; in atari_mste_hwclk()
160 if (hour == 0 || hour == 20) in atari_mste_hwclk()
161 hour += 12; in atari_mste_hwclk()
163 val.hr_ones = hour % 10; in atari_mste_hwclk()
164 val.hr_tens = hour / 10; in atari_mste_hwclk()
182 hour = val.hr_ones + val.hr_tens * 10; in atari_mste_hwclk()
184 if (hour == 12 || hour == 12 + 20) in atari_mste_hwclk()
[all …]
/Linux-v5.4/arch/mips/sibyte/swarm/
Drtc_xicor1241.c169 unsigned int year, mon, day, hour, min, sec, y2k; in xicor_get_time() local
175 hour = xicor_read(X1241REG_HR); in xicor_get_time()
177 if (hour & X1241REG_HR_MIL) { in xicor_get_time()
178 hour &= 0x3f; in xicor_get_time()
180 if (hour & 0x20) in xicor_get_time()
181 hour = (hour & 0xf) + 0x12; in xicor_get_time()
192 hour = bcd2bin(hour); in xicor_get_time()
200 return mktime64(year, mon, day, hour, min, sec); in xicor_get_time()
Drtc_m41t81.c188 unsigned int year, mon, day, hour, min, sec; in m41t81_get_time() local
201 hour = m41t81_read(M41T81REG_HR) & 0x3f; in m41t81_get_time()
209 hour = bcd2bin(hour); in m41t81_get_time()
216 return mktime64(year, mon, day, hour, min, sec); in m41t81_get_time()
/Linux-v5.4/drivers/rtc/
Drtc-ds1216.c19 u8 hour; member
88 if (regs.hour & DS1216_HOUR_1224) { in ds1216_rtc_read_time()
90 tm->tm_hour = bcd2bin(regs.hour & 0x1f); in ds1216_rtc_read_time()
91 if (regs.hour & DS1216_HOUR_AMPM) in ds1216_rtc_read_time()
94 tm->tm_hour = bcd2bin(regs.hour & 0x3f); in ds1216_rtc_read_time()
116 regs.hour &= DS1216_HOUR_1224; in ds1216_rtc_set_time()
117 if (regs.hour && tm->tm_hour > 12) { in ds1216_rtc_set_time()
118 regs.hour |= DS1216_HOUR_AMPM; in ds1216_rtc_set_time()
121 regs.hour |= bin2bcd(tm->tm_hour); in ds1216_rtc_set_time()
Drtc-ftrtc010.c68 u32 days, hour, min, sec, offset; in ftrtc010_rtc_read_time() local
73 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_read_time()
77 time = offset + days * 86400 + hour * 3600 + min * 60 + sec; in ftrtc010_rtc_read_time()
87 u32 sec, min, hour, day, offset; in ftrtc010_rtc_set_time() local
94 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_set_time()
97 offset = time - (day * 86400 + hour * 3600 + min * 60 + sec); in ftrtc010_rtc_set_time()
112 u32 days, hour, min, sec; in ftrtc010_rtc_probe() local
167 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_probe()
170 rtc->rtc_dev->range_min = (u64)days * 86400 + hour * 3600 + in ftrtc010_rtc_probe()
Drtc-rs5c372.c182 unsigned hour; in rs5c_reg2hr() local
187 hour = bcd2bin(reg & 0x1f); in rs5c_reg2hr()
188 if (hour == 12) in rs5c_reg2hr()
189 hour = 0; in rs5c_reg2hr()
191 hour += 12; in rs5c_reg2hr()
192 return hour; in rs5c_reg2hr()
195 static unsigned rs5c_hr2reg(struct rs5c372 *rs5c, unsigned hour) in rs5c_hr2reg() argument
198 return bin2bcd(hour); in rs5c_hr2reg()
200 if (hour > 12) in rs5c_hr2reg()
201 return 0x20 | bin2bcd(hour - 12); in rs5c_hr2reg()
[all …]
Drtc-m41t94.c60 int ret, hour; in m41t94_read_time() local
84 hour = spi_w8r8(spi, M41T94_REG_HOURS); in m41t94_read_time()
85 tm->tm_hour = bcd2bin(hour & 0x3f); in m41t94_read_time()
90 if ((hour & M41T94_BIT_CB) || !(hour & M41T94_BIT_CEB)) in m41t94_read_time()
Drtc-s35390a.c185 static char s35390a_hr2reg(struct s35390a *s35390a, int hour) in s35390a_hr2reg() argument
188 return bin2bcd(hour); in s35390a_hr2reg()
190 if (hour < 12) in s35390a_hr2reg()
191 return bin2bcd(hour); in s35390a_hr2reg()
193 return 0x40 | bin2bcd(hour - 12); in s35390a_hr2reg()
198 unsigned hour; in s35390a_reg2hr() local
203 hour = bcd2bin(reg & 0x3f); in s35390a_reg2hr()
205 hour += 12; in s35390a_reg2hr()
207 return hour; in s35390a_reg2hr()
Drtc-ds1305.c108 unsigned hour = 0; in bcd2hour() local
112 hour = 12; in bcd2hour()
115 hour += bcd2bin(bcd); in bcd2hour()
116 return hour - 1; in bcd2hour()
121 static u8 hour2bcd(bool hr12, int hour) in hour2bcd() argument
124 hour++; in hour2bcd()
125 if (hour <= 12) in hour2bcd()
126 return DS1305_HR_12 | bin2bcd(hour); in hour2bcd()
127 hour -= 12; in hour2bcd()
128 return DS1305_HR_12 | DS1305_HR_PM | bin2bcd(hour); in hour2bcd()
[all …]
Drtc-bd70528.c23 u8 hour; member
168 d->hour &= ~BD70528_MASK_RTC_HOUR; in tmday2rtc()
171 d->hour |= bin2bcd(t->tm_hour); in tmday2rtc()
183 r->time.hour &= ~(BD70528_MASK_RTC_HOUR_PM | BD70528_MASK_RTC_HOUR_24H); in tm2rtc()
189 r->time.hour |= BD70528_MASK_RTC_HOUR_24H; in tm2rtc()
200 t->tm_hour = bcd2bin(r->time.hour & BD70528_MASK_RTC_HOUR); in rtc2tm()
205 if (!(r->time.hour & BD70528_MASK_RTC_HOUR_24H)) { in rtc2tm()
207 if (r->time.hour & BD70528_MASK_RTC_HOUR_PM) in rtc2tm()
Drtc-efi.c58 eft->hour = wtime->tm_hour; in convert_to_efi_time()
79 if (eft->hour >= 24) in convert_from_efi_time()
81 wtime->tm_hour = eft->hour; in convert_from_efi_time()
206 eft.hour, eft.minute, eft.second, eft.nanosecond, in efi_procfs()
222 alm.hour, alm.minute, alm.second, alm.nanosecond, in efi_procfs()
Drtc-wilco-ec.c52 u8 hour; member
83 u8 hour; member
109 tm->tm_hour = rtc.hour; in wilco_ec_rtc_read()
141 rtc.hour = bin2bcd(tm->tm_hour); in wilco_ec_rtc_write()
Drtc-mv.c71 unsigned int year, month, day, hour, minute, second, wday; in mv_rtc_read_time() local
78 hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hour mode */ in mv_rtc_read_time()
87 tm->tm_hour = bcd2bin(hour); in mv_rtc_read_time()
102 unsigned int year, month, day, hour, minute, second, wday; in mv_rtc_read_alarm() local
109 hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hour mode */ in mv_rtc_read_alarm()
118 alm->time.tm_hour = bcd2bin(hour); in mv_rtc_read_alarm()
Drtc-sd3078.c85 unsigned char hour; in sd3078_rtc_read_time() local
106 hour = rtc_data[SD3078_REG_HR]; in sd3078_rtc_read_time()
107 if (hour & 0x80) /* 24H MODE */ in sd3078_rtc_read_time()
109 else if (hour & 0x20) /* 12H MODE PM */ in sd3078_rtc_read_time()
/Linux-v5.4/arch/mips/include/asm/
Dmc146818-time.h91 unsigned int year, mon, day, hour, min, sec; in mc146818_get_cmos_time() local
99 hour = CMOS_READ(RTC_HOURS); in mc146818_get_cmos_time()
108 hour = bcd2bin(hour); in mc146818_get_cmos_time()
116 return mktime64(year, mon, day, hour, min, sec); in mc146818_get_cmos_time()
/Linux-v5.4/arch/mips/dec/
Dtime.c24 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock64() local
32 hour = CMOS_READ(RTC_HOURS); in read_persistent_clock64()
49 hour = bcd2bin(hour); in read_persistent_clock64()
57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec); in read_persistent_clock64()
/Linux-v5.4/fs/isofs/
Dutil.c21 int year, month, day, hour, minute, second, tz; in iso_date() local
27 hour = p[3]; in iso_date()
36 crtime = mktime64(year+1900, month, day, hour, minute, second); in iso_date()
/Linux-v5.4/arch/powerpc/platforms/chrp/
Dtime.c134 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local
139 hour = chrp_cmos_clock_read(RTC_HOURS); in chrp_get_rtc_time()
148 hour = bcd2bin(hour); in chrp_get_rtc_time()
157 tm->tm_hour = hour; in chrp_get_rtc_time()
/Linux-v5.4/arch/x86/kernel/
Drtc.c65 unsigned int status, year, mon, day, hour, min, sec, century = 0; in mach_get_cmos_time() local
90 hour = CMOS_READ(RTC_HOURS); in mach_get_cmos_time()
109 hour = bcd2bin(hour); in mach_get_cmos_time()
121 now->tv_sec = mktime64(year, mon, day, hour, min, sec); in mach_get_cmos_time()
/Linux-v5.4/arch/powerpc/platforms/maple/
Dtime.c81 int sec, min, hour, mon, mday, year; in maple_set_rtc_time() local
95 hour = tm->tm_hour; in maple_set_rtc_time()
103 hour = bin2bcd(hour); in maple_set_rtc_time()
110 maple_clock_write(hour, RTC_HOURS); in maple_set_rtc_time()
/Linux-v5.4/arch/sh/boards/mach-sh03/
Drtc.c44 unsigned int year, mon, day, hour, min, sec; in sh03_rtc_gettimeofday() local
51 hour = (__raw_readb(RTC_HOU1) & 0xf) + (__raw_readb(RTC_HOU10) & 0xf) * 10; in sh03_rtc_gettimeofday()
59 hour > 23 || min > 59 || sec > 59) { in sh03_rtc_gettimeofday()
63 year, mon, day, hour, min, sec); in sh03_rtc_gettimeofday()
82 tm->tm_hour = hour; in sh03_rtc_gettimeofday()
/Linux-v5.4/arch/x86/platform/intel-mid/
Dintel_mid_vrtc.c58 u8 sec, min, hour, mday, mon; in vrtc_get_time() local
69 hour = vrtc_cmos_read(RTC_HOURS); in vrtc_get_time()
80 "mon: %d year: %d\n", sec, min, hour, mday, mon, year); in vrtc_get_time()
82 now->tv_sec = mktime64(year, mon, mday, hour, min, sec); in vrtc_get_time()
/Linux-v5.4/drivers/md/bcache/
Dstats.c103 ret = ret ?: kobject_add(&acc->hour.kobj, parent, in bch_cache_accounting_add_kobjs()
121 kobject_put(&acc->hour.kobj); in bch_cache_accounting_destroy()
158 acc->hour.name += t; \ in scale_accounting()
173 scale_stats(&acc->hour, HOUR_RESCALE); in scale_accounting()
236 kobject_init(&acc->hour.kobj, &bch_stats_ktype); in bch_cache_accounting_init()
/Linux-v5.4/arch/m68k/sun3/
Dintersil.c41 todintersil->hour = t->tm_hour; in sun3_hwclk()
51 t->tm_hour = todintersil->hour; in sun3_hwclk()
/Linux-v5.4/drivers/char/
Defirtc.c109 eft->hour = wtime->tm_hour; in convert_to_efi_time()
123 wtime->tm_hour = eft->hour; in convert_from_efi_time()
299 eft.hour, eft.minute, eft.second, eft.nanosecond, in efi_rtc_proc_show()
316 alm.hour, alm.minute, alm.second, alm.nanosecond, in efi_rtc_proc_show()

1234