Home
last modified time | relevance | path

Searched refs:tm_hour (Results 1 – 25 of 259) sorted by relevance

1234567891011

/openbmc/u-boot/drivers/rtc/
H A Drs5c372.c124 dt->tm_hour = HOURS_12(buf[3]); in rs5c372_convert_to_time()
126 dt->tm_hour += 12; in rs5c372_convert_to_time()
128 dt->tm_hour = HOURS_24(buf[3]); in rs5c372_convert_to_time()
146 printf("rs5c372_convert_to_time: hour = %d\n", dt->tm_hour); in rs5c372_convert_to_time()
199 printf("rtc_set: tm_hour = %d\n", tmp->tm_hour); in rtc_set()
217 if (tmp->tm_hour >= 12) { /* PM */ in rtc_set()
219 if (tmp->tm_hour == 12) in rtc_set()
220 buf[3] = bin2bcd(tmp->tm_hour); in rtc_set()
222 buf[3] = bin2bcd(tmp->tm_hour - 12); in rtc_set()
226 buf[3] = bin2bcd(tmp->tm_hour); in rtc_set()
H A Dds1306.c89 tmp->tm_hour = (bcd2bin (spi_byte & 0x1F)) + 11; in rtc_get()
92 tmp->tm_hour = (bcd2bin (spi_byte & 0x1F)) - 1; in rtc_get()
96 tmp->tm_hour = (bcd2bin (spi_byte & 0x3F)); in rtc_get()
114 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
151 soft_spi_send (bin2bcd (tmp->tm_hour)); /* Send Hour */ in rtc_set()
188 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
329 tmp->tm_hour = (hour & 0x40) in rtc_get()
345 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
368 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
372 rtc_write (RTC_HOURS, bin2bcd (tmp->tm_hour)); in rtc_set()
H A Dmax6900.c66 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
76 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
86 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
95 rtc_write (0x84, bin2bcd(tmp->tm_hour)); in rtc_set()
H A Dds1307.c126 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
136 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
149 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
163 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
216 tm->tm_hour, tm->tm_min, tm->tm_sec); in ds1307_rtc_set()
225 buf[RTC_HR_REG_ADDR] = bin2bcd(tm->tm_hour); in ds1307_rtc_set()
282 tm->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x3F); in ds1307_rtc_get()
294 tm->tm_hour, tm->tm_min, tm->tm_sec); in ds1307_rtc_get()
H A Drx8025.c119 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
121 tmp->tm_hour = bcd2bin (hour & 0x1F) % 12 + in rtc_get()
132 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
144 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
153 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
H A Dpcf8563.c53 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
63 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
74 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
83 rtc_write (0x04, bin2bcd(tmp->tm_hour)); in rtc_set()
H A Dsandbox_rtc.c23 time->tm_hour = dm_i2c_reg_read(dev, REG_HOUR); in sandbox_rtc_get()
24 if (time->tm_hour < 0) in sandbox_rtc_get()
25 return time->tm_hour; in sandbox_rtc_get()
53 ret = dm_i2c_reg_write(dev, REG_HOUR, time->tm_hour); in sandbox_rtc_set()
H A Ddavinci.c41 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get()
51 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
62 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
68 writel(bin2bcd(tmp->tm_hour), &rtc->hours); in rtc_set()
H A Dpt7c4338.c90 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get()
99 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
109 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
115 rtc_write(RTC_HR_REG_ADDR, bin2bcd(tmp->tm_hour)); in rtc_set()
H A Dx1205.c101 tm->tm_hour = bcd2bin(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */ in rtc_get()
111 tm->tm_sec, tm->tm_min, tm->tm_hour, in rtc_get()
124 tm->tm_hour, tm->tm_min, tm->tm_sec); in rtc_set()
130 buf[CCR_HOUR] = bin2bcd(tm->tm_hour) | X1205_HR_MIL; in rtc_set()
H A Dm48t35ax.c54 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
64 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
76 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
90 rtc_write (0x03, bin2bcd(tmp->tm_hour)); in rtc_set()
H A Dds3231.c89 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get()
99 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_get()
114 tmp->tm_hour, tmp->tm_min, tmp->tm_sec); in rtc_set()
123 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
/openbmc/linux/drivers/rtc/
H A Drtc-msm6242.c124 tm->tm_hour = (msm6242_read(priv, MSM6242_HOUR10) & in msm6242_read_time()
140 if (!pm && tm->tm_hour == 12) in msm6242_read_time()
141 tm->tm_hour = 0; in msm6242_read_time()
142 else if (pm && tm->tm_hour != 12) in msm6242_read_time()
143 tm->tm_hour += 12; in msm6242_read_time()
162 msm6242_write(priv, tm->tm_hour / 10, MSM6242_HOUR10); in msm6242_set_time()
163 else if (tm->tm_hour >= 12) in msm6242_set_time()
164 msm6242_write(priv, MSM6242_HOUR10_PM + (tm->tm_hour - 12) / 10, in msm6242_set_time()
167 msm6242_write(priv, tm->tm_hour / 10, MSM6242_HOUR10); in msm6242_set_time()
168 msm6242_write(priv, tm->tm_hour % 10, MSM6242_HOUR1); in msm6242_set_time()
H A Drtc-rs5c348.c88 txp[RS5C348_REG_HOURS] = bin2bcd(tm->tm_hour); in rs5c348_rtc_set_time()
91 txp[RS5C348_REG_HOURS] = bin2bcd((tm->tm_hour + 11) % 12 + 1) | in rs5c348_rtc_set_time()
92 (tm->tm_hour >= 12 ? RS5C348_BIT_PM : 0); in rs5c348_rtc_set_time()
139 tm->tm_hour = bcd2bin(rxbuf[RS5C348_REG_HOURS] & RS5C348_HOURS_MASK); in rs5c348_rtc_read_time()
142 tm->tm_hour -= 20; in rs5c348_rtc_read_time()
143 tm->tm_hour %= 12; in rs5c348_rtc_read_time()
144 tm->tm_hour += 12; in rs5c348_rtc_read_time()
146 tm->tm_hour %= 12; in rs5c348_rtc_read_time()
H A Drtc-ds1216.c90 tm->tm_hour = bcd2bin(regs.hour & 0x1f); in ds1216_rtc_read_time()
92 tm->tm_hour += 12; in ds1216_rtc_read_time()
94 tm->tm_hour = bcd2bin(regs.hour & 0x3f); in ds1216_rtc_read_time()
117 if (regs.hour && tm->tm_hour > 12) { in ds1216_rtc_set_time()
119 tm->tm_hour -= 12; in ds1216_rtc_set_time()
121 regs.hour |= bin2bcd(tm->tm_hour); in ds1216_rtc_set_time()
H A Drtc-moxart.c162 ((tm->tm_hour / 10) << 4) | in moxart_rtc_set_time()
163 (tm->tm_hour % 10)); in moxart_rtc_set_time()
180 tm->tm_hour, tm->tm_min, tm->tm_sec); in moxart_rtc_set_time()
200 tm->tm_hour = (((v & 0x10) >> 4) * 10) + (v & 0x0F); in moxart_rtc_read_time()
202 tm->tm_hour += 12; in moxart_rtc_read_time()
203 if (tm->tm_hour >= 24) in moxart_rtc_read_time()
204 tm->tm_hour = 0; in moxart_rtc_read_time()
207 tm->tm_hour = (((v & 0x30) >> 4) * 10) + (v & 0x0F); in moxart_rtc_read_time()
H A Drtc-max8907.c65 tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x01f); in regs_to_tm()
66 if (tm->tm_hour == 12) in regs_to_tm()
67 tm->tm_hour = 0; in regs_to_tm()
69 tm->tm_hour += 12; in regs_to_tm()
71 tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x03f); in regs_to_tm()
88 regs[RTC_HOUR] = bin2bcd(tm->tm_hour); in tm_to_regs()
H A Drtc-ds1286.c183 tm->tm_hour = ds1286_rtc_read(priv, RTC_HOURS) & 0x3f; in ds1286_read_time()
193 tm->tm_hour = bcd2bin(tm->tm_hour); in ds1286_read_time()
224 hrs = tm->tm_hour; in ds1286_set_time()
273 alm->time.tm_hour = ds1286_rtc_read(priv, RTC_HOURS_ALARM) & 0x1f; in ds1286_read_alarm()
279 alm->time.tm_hour = bcd2bin(alm->time.tm_hour); in ds1286_read_alarm()
289 hrs = alm->time.tm_hour; in ds1286_set_alarm()
H A Dlib.c135 tm->tm_hour = secs / 3600; in rtc_time64_to_tm()
136 secs -= tm->tm_hour * 3600; in rtc_time64_to_tm()
155 ((unsigned int)tm->tm_hour) >= 24 || in rtc_valid_tm()
171 tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); in rtc_tm_to_time64()
H A Drtc-s35390a.c219 tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, in s35390a_rtc_set_time()
229 buf[S35390A_BYTE_HOURS] = s35390a_hr2reg(s35390a, tm->tm_hour); in s35390a_rtc_set_time()
260 tm->tm_hour = s35390a_reg2hr(s35390a, buf[S35390A_BYTE_HOURS]); in s35390a_rtc_read_time()
268 tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, in s35390a_rtc_read_time()
283 alm->time.tm_min, alm->time.tm_hour, alm->time.tm_mday, in s35390a_rtc_set_alarm()
312 alm->time.tm_hour) | 0x80; in s35390a_rtc_set_alarm()
315 if (alm->time.tm_hour >= 12) in s35390a_rtc_set_alarm()
366 alm->time.tm_hour = in s35390a_rtc_read_alarm()
377 __func__, alm->time.tm_min, alm->time.tm_hour, in s35390a_rtc_read_alarm()
/openbmc/linux/arch/mips/sibyte/swarm/
H A Drtc_xicor1241.c147 tm.tm_hour = bin2bcd(tm.tm_hour); in xicor_set_time()
148 tmp = (tmp & ~0x3f) | (tm.tm_hour & 0x3f); in xicor_set_time()
152 if (tm.tm_hour >= 12) { in xicor_set_time()
154 tm.tm_hour -= 12; in xicor_set_time()
156 tm.tm_hour = bin2bcd(tm.tm_hour); in xicor_set_time()
157 tmp |= tm.tm_hour; in xicor_set_time()
H A Drtc_m41t81.c160 tm.tm_hour = bin2bcd(tm.tm_hour); in m41t81_set_time()
161 tm.tm_hour = (tm.tm_hour & 0x3f) | (m41t81_read(M41T81REG_HR) & 0xc0); in m41t81_set_time()
162 m41t81_write(M41T81REG_HR, tm.tm_hour); in m41t81_set_time()
/openbmc/linux/samples/pfsm/
H A Dpfsm-wakeup.c60 rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec); in main()
70 rtc_tm.tm_hour++; in main()
72 if (rtc_tm.tm_hour == 24) in main()
73 rtc_tm.tm_hour = 0; in main()
/openbmc/qemu/hw/rtc/
H A Dtwl92230.c121 else if (!s->rtc.tm.tm_hour) in menelaus_rtc_hz()
187 s->rtc.alm.tm_hour = 0x00; in menelaus_reset()
338 return to_bcd((s->rtc.tm.tm_hour % 12) + 1) | in menelaus_read()
341 return to_bcd(s->rtc.tm.tm_hour); in menelaus_read()
360 return to_bcd((s->rtc.alm.tm_hour % 12) + 1) | in menelaus_read()
363 return to_bcd(s->rtc.alm.tm_hour); in menelaus_read()
566 if (s->rtc.new.tm_hour > 23) in menelaus_write()
568 tm.tm_hour = s->rtc.new.tm_hour; in menelaus_write()
589 if (s->rtc.new.tm_hour > 23) in menelaus_write()
597 tm.tm_hour = s->rtc.new.tm_hour; in menelaus_write()
[all …]
/openbmc/linux/tools/testing/selftests/rtc/
H A Dsetdate.c50 sscanf(time, "%d:%d:%d", &new.tm_hour, &new.tm_min, &new.tm_sec); in main()
54 new.tm_hour, new.tm_min, new.tm_sec); in main()
73 current.tm_hour, current.tm_min, current.tm_sec); in main()

1234567891011