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