Lines Matching refs:hour
184 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()
204 if (hour == 12) in rs5c_hr2reg()
206 if (hour == 0) in rs5c_hr2reg()
208 return bin2bcd(hour); in rs5c_hr2reg()