Home
last modified time | relevance | path

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

1234

/linux/arch/m68k/atari/
A Dtime.c161 if (hour == 0 || hour == 20) in atari_mste_hwclk()
162 hour += 12; in atari_mste_hwclk()
185 if (hour == 12 || hour == 12 + 20) in atari_mste_hwclk()
186 hour -= 12; in atari_mste_hwclk()
223 if (hour != 12) in atari_tt_hwclk()
224 hour -= 12; in atari_tt_hwclk()
227 hour = 12; in atari_tt_hwclk()
233 hour = bin2bcd(hour); in atari_tt_hwclk()
295 hour = bcd2bin(hour); in atari_tt_hwclk()
304 hour = 0; in atari_tt_hwclk()
[all …]
/linux/arch/mips/sibyte/swarm/
A 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()
A 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/drivers/rtc/
A Drtc-rc5t619.c42 static uint8_t rtc5t619_12hour_bcd2bin(uint8_t hour) in rtc5t619_12hour_bcd2bin() argument
44 if (hour & HOUR_PMFLAG) { in rtc5t619_12hour_bcd2bin()
45 hour = bcd2bin(hour & ~HOUR_PMFLAG); in rtc5t619_12hour_bcd2bin()
46 return hour == 12 ? 12 : 12 + hour; in rtc5t619_12hour_bcd2bin()
49 hour = bcd2bin(hour); in rtc5t619_12hour_bcd2bin()
50 return hour == 12 ? 0 : hour; in rtc5t619_12hour_bcd2bin()
55 if (!hour) in rtc5t619_12hour_bin2bcd()
58 if (hour < 12) in rtc5t619_12hour_bin2bcd()
59 return bin2bcd(hour); in rtc5t619_12hour_bin2bcd()
61 if (hour == 12) in rtc5t619_12hour_bin2bcd()
[all …]
A 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()
A 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()
A 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()
198 return bin2bcd(hour); in rs5c_hr2reg()
200 if (hour > 12) in rs5c_hr2reg()
202 if (hour == 12) in rs5c_hr2reg()
204 if (hour == 0) in rs5c_hr2reg()
[all …]
A Drtc-bd70528.c30 u8 hour; member
60 d->hour &= ~BD70528_MASK_RTC_HOUR; in tmday2rtc()
63 d->hour |= bin2bcd(t->tm_hour); in tmday2rtc()
75 r->time.hour &= ~(BD70528_MASK_RTC_HOUR_PM | BD70528_MASK_RTC_HOUR_24H); in tm2rtc()
81 r->time.hour |= BD70528_MASK_RTC_HOUR_24H; in tm2rtc()
92 t->tm_hour = bcd2bin(r->time.hour & BD70528_MASK_RTC_HOUR); in rtc2tm()
97 if (!(r->time.hour & BD70528_MASK_RTC_HOUR_24H)) { in rtc2tm()
99 if (r->time.hour & BD70528_MASK_RTC_HOUR_PM) in rtc2tm()
A 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()
A 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()
A 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 …]
A 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()
A Drtc-wilco-ec.c52 u8 hour; member
83 u8 hour; member
109 tm->tm_hour = rtc.hour; in wilco_ec_rtc_read()
143 rtc.hour = bin2bcd(tm->tm_hour); in wilco_ec_rtc_write()
A 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()
A 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()
A Drtc-m48t35.c24 u8 hour; member
36 u8 hour; member
71 tm->tm_hour = readb(&priv->reg->hour); in m48t35_read_time()
137 writeb(hrs, &priv->reg->hour); in m48t35_set_time()
A Drtc-sc27xx.c170 u32 val, sec, min, hour, day; in sprd_rtc_get_secs() local
212 hour = val & SPRD_RTC_HOUR_MASK; in sprd_rtc_get_secs()
219 *secs = (((time64_t)(day * 24) + hour) * 60 + min) * 60 + sec; in sprd_rtc_get_secs()
227 u32 sec, min, hour, day, val; in sprd_rtc_set_secs() local
232 hour = rem / 3600; in sprd_rtc_set_secs()
233 rem -= hour * 3600; in sprd_rtc_set_secs()
271 ret = regmap_write(rtc->regmap, rtc->base + hour_reg, hour); in sprd_rtc_set_secs()
/linux/arch/mips/include/asm/
A 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/arch/mips/dec/
A 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/arch/powerpc/platforms/chrp/
A 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/arch/sh/boards/mach-sh03/
A Drtc.c43 unsigned int year, mon, day, hour, min, sec; in sh03_rtc_gettimeofday() local
50 hour = (__raw_readb(RTC_HOU1) & 0xf) + (__raw_readb(RTC_HOU10) & 0xf) * 10; in sh03_rtc_gettimeofday()
58 hour > 23 || min > 59 || sec > 59) { in sh03_rtc_gettimeofday()
62 year, mon, day, hour, min, sec); in sh03_rtc_gettimeofday()
81 tm->tm_hour = hour; in sh03_rtc_gettimeofday()
/linux/arch/x86/kernel/
A 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/arch/powerpc/platforms/maple/
A Dtime.c80 int sec, min, hour, mon, mday, year; in maple_set_rtc_time() local
94 hour = tm->tm_hour; in maple_set_rtc_time()
102 hour = bin2bcd(hour); in maple_set_rtc_time()
109 maple_clock_write(hour, RTC_HOURS); in maple_set_rtc_time()
/linux/fs/isofs/
A 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/drivers/md/bcache/
A Dstats.c100 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()
157 acc->hour.name += t; \ in scale_accounting()
171 scale_stats(&acc->hour, HOUR_RESCALE); in scale_accounting()
226 kobject_init(&acc->hour.kobj, &bch_stats_ktype); in bch_cache_accounting_init()

Completed in 39 milliseconds

1234