Lines Matching refs:t
733 int t, ret; in menelaus_set_regulator_sleep() local
746 t = (GPIO_CTRL_SLPCTLEN | GPIO3_DIR_INPUT); in menelaus_set_regulator_sleep()
748 ret |= t; in menelaus_set_regulator_sleep()
750 ret &= ~t; in menelaus_set_regulator_sleep()
828 static void menelaus_to_time(char *regs, struct rtc_time *t) in menelaus_to_time() argument
830 t->tm_sec = bcd2bin(regs[0]); in menelaus_to_time()
831 t->tm_min = bcd2bin(regs[1]); in menelaus_to_time()
833 t->tm_hour = bcd2bin(regs[2] & 0x1f) - 1; in menelaus_to_time()
835 t->tm_hour += 12; in menelaus_to_time()
837 t->tm_hour = bcd2bin(regs[2] & 0x3f); in menelaus_to_time()
838 t->tm_mday = bcd2bin(regs[3]); in menelaus_to_time()
839 t->tm_mon = bcd2bin(regs[4]) - 1; in menelaus_to_time()
840 t->tm_year = bcd2bin(regs[5]) + 100; in menelaus_to_time()
843 static int time_to_menelaus(struct rtc_time *t, int regnum) in time_to_menelaus() argument
847 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_sec)); in time_to_menelaus()
851 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_min)); in time_to_menelaus()
856 hour = t->tm_hour + 1; in time_to_menelaus()
862 hour = bin2bcd(t->tm_hour); in time_to_menelaus()
867 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_mday)); in time_to_menelaus()
871 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_mon + 1)); in time_to_menelaus()
875 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_year - 100)); in time_to_menelaus()
886 static int menelaus_read_time(struct device *dev, struct rtc_time *t) in menelaus_read_time() argument
911 menelaus_to_time(regs, t); in menelaus_read_time()
912 t->tm_wday = bcd2bin(regs[6]); in menelaus_read_time()
917 static int menelaus_set_time(struct device *dev, struct rtc_time *t) in menelaus_set_time() argument
922 status = time_to_menelaus(t, MENELAUS_RTC_SEC); in menelaus_set_time()
925 status = menelaus_write_reg(MENELAUS_RTC_WKDAY, bin2bcd(t->tm_wday)); in menelaus_set_time()