Home
last modified time | relevance | path

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

12345

/linux-6.6.21/arch/m68k/atari/
Dtime.c142 int hour, year; in atari_mste_hwclk() local
157 hour = t->tm_hour; in atari_mste_hwclk()
159 if (hour > 11) in atari_mste_hwclk()
160 hour += 20 - 12; in atari_mste_hwclk()
161 if (hour == 0 || hour == 20) in atari_mste_hwclk()
162 hour += 12; in atari_mste_hwclk()
164 val.hr_ones = hour % 10; in atari_mste_hwclk()
165 val.hr_tens = hour / 10; in atari_mste_hwclk()
183 hour = val.hr_ones + val.hr_tens * 10; in atari_mste_hwclk()
185 if (hour == 12 || hour == 12 + 20) in atari_mste_hwclk()
[all …]
/linux-6.6.21/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-6.6.21/drivers/rtc/
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()
53 static uint8_t rtc5t619_12hour_bin2bcd(uint8_t hour) in rtc5t619_12hour_bin2bcd() argument
55 if (!hour) in rtc5t619_12hour_bin2bcd()
58 if (hour < 12) in rtc5t619_12hour_bin2bcd()
59 return bin2bcd(hour); in rtc5t619_12hour_bin2bcd()
[all …]
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
173 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_probe()
176 rtc->rtc_dev->range_min = (u64)days * 86400 + hour * 3600 + in ftrtc010_rtc_probe()
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-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()
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-rs5c372.c184 unsigned hour; in rs5c_reg2hr() local
189 hour = bcd2bin(reg & 0x1f); in rs5c_reg2hr()
190 if (hour == 12) in rs5c_reg2hr()
191 hour = 0; in rs5c_reg2hr()
193 hour += 12; in rs5c_reg2hr()
194 return hour; in rs5c_reg2hr()
197 static unsigned rs5c_hr2reg(struct rs5c372 *rs5c, unsigned hour) in rs5c_hr2reg() argument
200 return bin2bcd(hour); in rs5c_hr2reg()
202 if (hour > 12) in rs5c_hr2reg()
203 return 0x20 | bin2bcd(hour - 12); in rs5c_hr2reg()
[all …]
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-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()
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()
207 eft.hour, eft.minute, eft.second, eft.nanosecond, in efi_procfs()
224 alm.hour, alm.minute, alm.second, alm.nanosecond, in efi_procfs()
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()
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()
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-6.6.21/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-6.6.21/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-6.6.21/arch/powerpc/platforms/chrp/
Dtime.c132 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local
137 hour = chrp_cmos_clock_read(RTC_HOURS); in chrp_get_rtc_time()
146 hour = bcd2bin(hour); in chrp_get_rtc_time()
155 tm->tm_hour = hour; in chrp_get_rtc_time()
/linux-6.6.21/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-6.6.21/arch/sh/boards/mach-sh03/
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-6.6.21/arch/powerpc/platforms/maple/
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-6.6.21/drivers/md/bcache/
Dstats.c101 ret = ret ?: kobject_add(&acc->hour.kobj, parent, in bch_cache_accounting_add_kobjs()
122 kobject_put(&acc->hour.kobj); in bch_cache_accounting_destroy()
158 acc->hour.name += t; \ in scale_accounting()
172 scale_stats(&acc->hour, HOUR_RESCALE); in scale_accounting()
227 kobject_init(&acc->hour.kobj, &bch_stats_ktype); in bch_cache_accounting_init()
/linux-6.6.21/arch/m68k/sun3/
Dintersil.c41 todintersil->hour = t->tm_hour; in sun3_hwclk()
51 t->tm_hour = todintersil->hour; in sun3_hwclk()

12345