tm 81 arch/alpha/kernel/rtc.c alpha_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 83 arch/alpha/kernel/rtc.c mc146818_get_time(tm); tm 89 arch/alpha/kernel/rtc.c int year = tm->tm_year; tm 97 arch/alpha/kernel/rtc.c tm->tm_year = year; tm 104 arch/alpha/kernel/rtc.c alpha_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 109 arch/alpha/kernel/rtc.c xtm = *tm; tm 111 arch/alpha/kernel/rtc.c tm = &xtm; tm 114 arch/alpha/kernel/rtc.c return mc146818_set_time(tm); tm 149 arch/alpha/kernel/rtc.c struct rtc_time *tm; tm 157 arch/alpha/kernel/rtc.c x->retval = alpha_rtc_read_time(NULL, x->tm); tm 161 arch/alpha/kernel/rtc.c remote_read_time(struct device *dev, struct rtc_time *tm) tm 165 arch/alpha/kernel/rtc.c x.tm = tm; tm 169 arch/alpha/kernel/rtc.c return alpha_rtc_read_time(NULL, tm); tm 176 arch/alpha/kernel/rtc.c x->retval = alpha_rtc_set_time(NULL, x->tm); tm 180 arch/alpha/kernel/rtc.c remote_set_time(struct device *dev, struct rtc_time *tm) tm 184 arch/alpha/kernel/rtc.c x.tm = tm; tm 188 arch/alpha/kernel/rtc.c return alpha_rtc_set_time(NULL, tm); tm 211 arch/arm/vfp/vfpdouble.c int tn, tm = 0; tm 216 arch/arm/vfp/vfpdouble.c tm = vfp_double_type(vdm); tm 229 arch/arm/vfp/vfpdouble.c if (tn == VFP_SNAN || (tm != VFP_SNAN && tn == VFP_QNAN)) tm 244 arch/arm/vfp/vfpdouble.c return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : VFP_NAN_FLAG; tm 271 arch/arm/vfp/vfpdouble.c int ret, tm; tm 274 arch/arm/vfp/vfpdouble.c tm = vfp_double_type(&vdm); tm 275 arch/arm/vfp/vfpdouble.c if (tm & (VFP_NAN|VFP_INFINITY)) { tm 278 arch/arm/vfp/vfpdouble.c if (tm & VFP_NAN) tm 296 arch/arm/vfp/vfpdouble.c if (tm & VFP_ZERO) tm 302 arch/arm/vfp/vfpdouble.c if (tm & VFP_DENORMAL) tm 443 arch/arm/vfp/vfpdouble.c int tm; tm 448 arch/arm/vfp/vfpdouble.c tm = vfp_double_type(&vdm); tm 453 arch/arm/vfp/vfpdouble.c if (tm == VFP_SNAN) tm 456 arch/arm/vfp/vfpdouble.c if (tm & VFP_DENORMAL) tm 465 arch/arm/vfp/vfpdouble.c if (tm & (VFP_INFINITY|VFP_NAN)) { tm 467 arch/arm/vfp/vfpdouble.c if (tm == VFP_QNAN) tm 470 arch/arm/vfp/vfpdouble.c } else if (tm & VFP_ZERO) tm 511 arch/arm/vfp/vfpdouble.c int tm; tm 518 arch/arm/vfp/vfpdouble.c tm = vfp_double_type(&vdm); tm 519 arch/arm/vfp/vfpdouble.c if (tm & VFP_DENORMAL) tm 522 arch/arm/vfp/vfpdouble.c if (tm & VFP_NAN) tm 590 arch/arm/vfp/vfpdouble.c int tm; tm 598 arch/arm/vfp/vfpdouble.c tm = vfp_double_type(&vdm); tm 599 arch/arm/vfp/vfpdouble.c if (tm & VFP_DENORMAL) tm 602 arch/arm/vfp/vfpdouble.c if (tm & VFP_NAN) { tm 688 arch/arm/vfp/vfpdouble.c int tn, tm; tm 691 arch/arm/vfp/vfpdouble.c tm = vfp_double_type(vdm); tm 693 arch/arm/vfp/vfpdouble.c if (tn & tm & VFP_INFINITY) { tm 709 arch/arm/vfp/vfpdouble.c } else if (tn & VFP_INFINITY && tm & VFP_NUMBER) { tm 1011 arch/arm/vfp/vfpdouble.c int tm, tn; tm 1019 arch/arm/vfp/vfpdouble.c tm = vfp_double_type(&vdm); tm 1030 arch/arm/vfp/vfpdouble.c if (tm & VFP_NAN) tm 1037 arch/arm/vfp/vfpdouble.c if (tm & tn & (VFP_INFINITY|VFP_ZERO)) tm 1049 arch/arm/vfp/vfpdouble.c if (tm & VFP_ZERO) tm 1055 arch/arm/vfp/vfpdouble.c if (tm & VFP_INFINITY || tn & VFP_ZERO) tm 1060 arch/arm/vfp/vfpdouble.c if (tm & VFP_DENORMAL) tm 219 arch/arm/vfp/vfpsingle.c int tn, tm = 0; tm 224 arch/arm/vfp/vfpsingle.c tm = vfp_single_type(vsm); tm 237 arch/arm/vfp/vfpsingle.c if (tn == VFP_SNAN || (tm != VFP_SNAN && tn == VFP_QNAN)) tm 252 arch/arm/vfp/vfpsingle.c return tn == VFP_SNAN || tm == VFP_SNAN ? FPSCR_IOC : VFP_NAN_FLAG; tm 319 arch/arm/vfp/vfpsingle.c int ret, tm; tm 322 arch/arm/vfp/vfpsingle.c tm = vfp_single_type(&vsm); tm 323 arch/arm/vfp/vfpsingle.c if (tm & (VFP_NAN|VFP_INFINITY)) { tm 326 arch/arm/vfp/vfpsingle.c if (tm & VFP_NAN) tm 344 arch/arm/vfp/vfpsingle.c if (tm & VFP_ZERO) tm 350 arch/arm/vfp/vfpsingle.c if (tm & VFP_DENORMAL) tm 486 arch/arm/vfp/vfpsingle.c int tm; tm 491 arch/arm/vfp/vfpsingle.c tm = vfp_single_type(&vsm); tm 496 arch/arm/vfp/vfpsingle.c if (tm == VFP_SNAN) tm 499 arch/arm/vfp/vfpsingle.c if (tm & VFP_DENORMAL) tm 508 arch/arm/vfp/vfpsingle.c if (tm & (VFP_INFINITY|VFP_NAN)) { tm 510 arch/arm/vfp/vfpsingle.c if (tm == VFP_QNAN) tm 513 arch/arm/vfp/vfpsingle.c } else if (tm & VFP_ZERO) tm 552 arch/arm/vfp/vfpsingle.c int tm; tm 560 arch/arm/vfp/vfpsingle.c tm = vfp_single_type(&vsm); tm 561 arch/arm/vfp/vfpsingle.c if (tm & VFP_DENORMAL) tm 564 arch/arm/vfp/vfpsingle.c if (tm & VFP_NAN) tm 632 arch/arm/vfp/vfpsingle.c int tm; tm 640 arch/arm/vfp/vfpsingle.c tm = vfp_single_type(&vsm); tm 644 arch/arm/vfp/vfpsingle.c if (tm & VFP_NAN) { tm 734 arch/arm/vfp/vfpsingle.c int tn, tm; tm 737 arch/arm/vfp/vfpsingle.c tm = vfp_single_type(vsm); tm 739 arch/arm/vfp/vfpsingle.c if (tn & tm & VFP_INFINITY) { tm 755 arch/arm/vfp/vfpsingle.c } else if (tn & VFP_INFINITY && tm & VFP_NUMBER) { tm 1057 arch/arm/vfp/vfpsingle.c int tm, tn; tm 1067 arch/arm/vfp/vfpsingle.c tm = vfp_single_type(&vsm); tm 1078 arch/arm/vfp/vfpsingle.c if (tm & VFP_NAN) tm 1085 arch/arm/vfp/vfpsingle.c if (tm & tn & (VFP_INFINITY|VFP_ZERO)) tm 1097 arch/arm/vfp/vfpsingle.c if (tm & VFP_ZERO) tm 1103 arch/arm/vfp/vfpsingle.c if (tm & VFP_INFINITY || tn & VFP_ZERO) tm 1108 arch/arm/vfp/vfpsingle.c if (tm & VFP_DENORMAL) tm 67 arch/ia64/kernel/efi.c prefix##_get_time (efi_time_t *tm, efi_time_cap_t *tc) \ tm 77 arch/ia64/kernel/efi.c adjust_arg(tm), atc); \ tm 84 arch/ia64/kernel/efi.c prefix##_set_time (efi_time_t *tm) \ tm 91 arch/ia64/kernel/efi.c adjust_arg(tm)); \ tm 99 arch/ia64/kernel/efi.c efi_time_t *tm) \ tm 107 arch/ia64/kernel/efi.c adjust_arg(enabled), adjust_arg(pending), adjust_arg(tm)); \ tm 114 arch/ia64/kernel/efi.c prefix##_set_wakeup_time (efi_bool_t enabled, efi_time_t *tm) \ tm 120 arch/ia64/kernel/efi.c if (tm) \ tm 121 arch/ia64/kernel/efi.c atm = adjust_arg(tm); \ tm 245 arch/ia64/kernel/efi.c efi_time_t tm; tm 247 arch/ia64/kernel/efi.c if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) { tm 252 arch/ia64/kernel/efi.c ts->tv_sec = mktime64(tm.year, tm.month, tm.day, tm 253 arch/ia64/kernel/efi.c tm.hour, tm.minute, tm.second); tm 254 arch/ia64/kernel/efi.c ts->tv_nsec = tm.nanosecond; tm 218 arch/ia64/kernel/smpboot.c unsigned long tcenter, t0, t1, tm; tm 224 arch/ia64/kernel/smpboot.c while (!(tm = go[SLAVE])) tm 230 arch/ia64/kernel/smpboot.c best_t0 = t0, best_t1 = t1, best_tm = tm; tm 95 arch/m68k/kernel/time.c static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm) tm 97 arch/m68k/kernel/time.c mach_hwclk(0, tm); tm 101 arch/m68k/kernel/time.c static int rtc_generic_set_time(struct device *dev, struct rtc_time *tm) tm 103 arch/m68k/kernel/time.c if (mach_hwclk(1, tm) < 0) tm 292 arch/m68k/mac/misc.c static void via_set_rtc_time(struct rtc_time *tm) tm 301 arch/m68k/mac/misc.c time = mktime64(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm 302 arch/m68k/mac/misc.c tm->tm_hour, tm->tm_min, tm->tm_sec); tm 1881 arch/mips/include/asm/octeon/cvmx-lmcx-defs.h uint64_t tm:1; tm 1905 arch/mips/include/asm/octeon/cvmx-lmcx-defs.h uint64_t tm:1; tm 263 arch/mips/include/asm/octeon/cvmx-pciercx-defs.h __BITFIELD_FIELD(uint32_t tm:3, tm 141 arch/mips/sibyte/swarm/rtc_m41t81.c struct rtc_time tm; tm 145 arch/mips/sibyte/swarm/rtc_m41t81.c rtc_time64_to_tm(t, &tm); tm 154 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_sec = bin2bcd(tm.tm_sec); tm 155 arch/mips/sibyte/swarm/rtc_m41t81.c m41t81_write(M41T81REG_SC, tm.tm_sec); tm 157 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_min = bin2bcd(tm.tm_min); tm 158 arch/mips/sibyte/swarm/rtc_m41t81.c m41t81_write(M41T81REG_MN, tm.tm_min); tm 160 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_hour = bin2bcd(tm.tm_hour); tm 161 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_hour = (tm.tm_hour & 0x3f) | (m41t81_read(M41T81REG_HR) & 0xc0); tm 162 arch/mips/sibyte/swarm/rtc_m41t81.c m41t81_write(M41T81REG_HR, tm.tm_hour); tm 165 arch/mips/sibyte/swarm/rtc_m41t81.c if (tm.tm_wday == 0) tm.tm_wday = 7; tm 166 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_wday = bin2bcd(tm.tm_wday); tm 167 arch/mips/sibyte/swarm/rtc_m41t81.c m41t81_write(M41T81REG_DY, tm.tm_wday); tm 169 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_mday = bin2bcd(tm.tm_mday); tm 170 arch/mips/sibyte/swarm/rtc_m41t81.c m41t81_write(M41T81REG_DT, tm.tm_mday); tm 173 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_mon ++; tm 174 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_mon = bin2bcd(tm.tm_mon); tm 175 arch/mips/sibyte/swarm/rtc_m41t81.c m41t81_write(M41T81REG_MO, tm.tm_mon); tm 178 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_year %= 100; tm 179 arch/mips/sibyte/swarm/rtc_m41t81.c tm.tm_year = bin2bcd(tm.tm_year); tm 180 arch/mips/sibyte/swarm/rtc_m41t81.c m41t81_write(M41T81REG_YR, tm.tm_year); tm 110 arch/mips/sibyte/swarm/rtc_xicor1241.c struct rtc_time tm; tm 114 arch/mips/sibyte/swarm/rtc_xicor1241.c rtc_time64_to_tm(t, &tm); tm 115 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_year += 1900; tm 123 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_sec = bin2bcd(tm.tm_sec); tm 124 arch/mips/sibyte/swarm/rtc_xicor1241.c xicor_write(X1241REG_SC, tm.tm_sec); tm 126 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_min = bin2bcd(tm.tm_min); tm 127 arch/mips/sibyte/swarm/rtc_xicor1241.c xicor_write(X1241REG_MN, tm.tm_min); tm 129 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_mday = bin2bcd(tm.tm_mday); tm 130 arch/mips/sibyte/swarm/rtc_xicor1241.c xicor_write(X1241REG_DT, tm.tm_mday); tm 133 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_mon ++; tm 134 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_mon = bin2bcd(tm.tm_mon); tm 135 arch/mips/sibyte/swarm/rtc_xicor1241.c xicor_write(X1241REG_MO, tm.tm_mon); tm 138 arch/mips/sibyte/swarm/rtc_xicor1241.c tmp = tm.tm_year / 100; tm 139 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_year %= 100; tm 140 arch/mips/sibyte/swarm/rtc_xicor1241.c xicor_write(X1241REG_YR, tm.tm_year); tm 147 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_hour = bin2bcd(tm.tm_hour); tm 148 arch/mips/sibyte/swarm/rtc_xicor1241.c tmp = (tmp & ~0x3f) | (tm.tm_hour & 0x3f); tm 152 arch/mips/sibyte/swarm/rtc_xicor1241.c if (tm.tm_hour >= 12) { tm 154 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_hour -= 12; tm 156 arch/mips/sibyte/swarm/rtc_xicor1241.c tm.tm_hour = bin2bcd(tm.tm_hour); tm 157 arch/mips/sibyte/swarm/rtc_xicor1241.c tmp |= tm.tm_hour; tm 167 arch/parisc/kernel/time.c static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm) tm 171 arch/parisc/kernel/time.c memset(tm, 0, sizeof(*tm)); tm 176 arch/parisc/kernel/time.c rtc_time64_to_tm(tod_data.tod_sec, tm); tm 180 arch/parisc/kernel/time.c static int rtc_generic_set_time(struct device *dev, struct rtc_time *tm) tm 182 arch/parisc/kernel/time.c time64_t secs = rtc_tm_to_time64(tm); tm 1108 arch/parisc/math-emu/fpudispatch.c u_int rm1, rm2, tm, ra, ta; /* operands */ tm 1130 arch/parisc/math-emu/fpudispatch.c tm = extru(ir, fptmpos, 5) * sizeof(double)/sizeof(u_int); tm 1131 arch/parisc/math-emu/fpudispatch.c if (tm == 0) tm 1179 arch/parisc/math-emu/fpudispatch.c fpregs[tm] = mtmp.ints.i1; tm 1180 arch/parisc/math-emu/fpudispatch.c fpregs[tm+1] = mtmp.ints.i2; tm 1198 arch/parisc/math-emu/fpudispatch.c tm = (extru(ir,fptmpos,4) | 0x10 ) << 1; /* get offset */ tm 1199 arch/parisc/math-emu/fpudispatch.c tm |= extru(ir,fptmpos-4,1); /* add right word offset */ tm 1232 arch/parisc/math-emu/fpudispatch.c fpregs[tm] = mtmp.ints.i1; tm 1248 arch/parisc/math-emu/fpudispatch.c u_int rm1, rm2, tm, ra, ta; /* operands */ tm 1268 arch/parisc/math-emu/fpudispatch.c tm = extru(ir, fptmpos, 5) * sizeof(double)/sizeof(u_int); tm 1269 arch/parisc/math-emu/fpudispatch.c if (tm == 0) tm 1286 arch/parisc/math-emu/fpudispatch.c fpregs[tm] = mtmp.ints.i1; tm 1287 arch/parisc/math-emu/fpudispatch.c fpregs[tm+1] = mtmp.ints.i2; tm 1305 arch/parisc/math-emu/fpudispatch.c tm = (extru(ir,fptmpos,4) | 0x10 ) << 1; /* get offset */ tm 1306 arch/parisc/math-emu/fpudispatch.c tm |= extru(ir,fptmpos-4,1); /* add right word offset */ tm 1322 arch/parisc/math-emu/fpudispatch.c fpregs[tm] = mtmp.ints.i1; tm 285 arch/powerpc/kernel/rtas-proc.c struct rtc_time tm; tm 293 arch/powerpc/kernel/rtas-proc.c rtc_time64_to_tm(nowtime, &tm); tm 296 arch/powerpc/kernel/rtas-proc.c tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm 297 arch/powerpc/kernel/rtas-proc.c tm.tm_hour, tm.tm_min, tm.tm_sec, 0 /* nano */); tm 351 arch/powerpc/kernel/rtas-proc.c struct rtc_time tm; tm 357 arch/powerpc/kernel/rtas-proc.c rtc_time64_to_tm(nowtime, &tm); tm 359 arch/powerpc/kernel/rtas-proc.c tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm 360 arch/powerpc/kernel/rtas-proc.c tm.tm_hour, tm.tm_min, tm.tm_sec, 0); tm 87 arch/powerpc/kernel/rtas-rtc.c int rtas_set_rtc_time(struct rtc_time *tm) tm 95 arch/powerpc/kernel/rtas-rtc.c tm->tm_year + 1900, tm->tm_mon + 1, tm 96 arch/powerpc/kernel/rtas-rtc.c tm->tm_mday, tm->tm_hour, tm->tm_min, tm 97 arch/powerpc/kernel/rtas-rtc.c tm->tm_sec, 0); tm 807 arch/powerpc/kernel/time.c struct rtc_time tm; tm 812 arch/powerpc/kernel/time.c rtc_time64_to_tm(now.tv_sec + 1 + timezone_offset, &tm); tm 814 arch/powerpc/kernel/time.c return ppc_md.set_rtc_time(&tm); tm 819 arch/powerpc/kernel/time.c struct rtc_time tm; tm 839 arch/powerpc/kernel/time.c ppc_md.get_rtc_time(&tm); tm 841 arch/powerpc/kernel/time.c ts->tv_sec = rtc_tm_to_time64(&tm); tm 1190 arch/powerpc/kernel/time.c static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm) tm 1192 arch/powerpc/kernel/time.c ppc_md.get_rtc_time(tm); tm 1196 arch/powerpc/kernel/time.c static int rtc_generic_set_time(struct device *dev, struct rtc_time *tm) tm 1201 arch/powerpc/kernel/time.c if (ppc_md.set_rtc_time(tm) < 0) tm 169 arch/powerpc/platforms/8xx/m8xx_setup.c int mpc8xx_set_rtc_time(struct rtc_time *tm) tm 177 arch/powerpc/platforms/8xx/m8xx_setup.c time = rtc_tm_to_time64(tm); tm 188 arch/powerpc/platforms/8xx/m8xx_setup.c void mpc8xx_get_rtc_time(struct rtc_time *tm) tm 195 arch/powerpc/platforms/8xx/m8xx_setup.c rtc_time64_to_tm(data, tm); tm 16 arch/powerpc/platforms/8xx/mpc8xx.h extern int mpc8xx_set_rtc_time(struct rtc_time *tm); tm 17 arch/powerpc/platforms/8xx/mpc8xx.h extern void mpc8xx_get_rtc_time(struct rtc_time *tm); tm 91 arch/powerpc/platforms/chrp/time.c struct rtc_time tm = *tmarg; tm 104 arch/powerpc/platforms/chrp/time.c tm.tm_sec = bin2bcd(tm.tm_sec); tm 105 arch/powerpc/platforms/chrp/time.c tm.tm_min = bin2bcd(tm.tm_min); tm 106 arch/powerpc/platforms/chrp/time.c tm.tm_hour = bin2bcd(tm.tm_hour); tm 107 arch/powerpc/platforms/chrp/time.c tm.tm_mon = bin2bcd(tm.tm_mon); tm 108 arch/powerpc/platforms/chrp/time.c tm.tm_mday = bin2bcd(tm.tm_mday); tm 109 arch/powerpc/platforms/chrp/time.c tm.tm_year = bin2bcd(tm.tm_year); tm 111 arch/powerpc/platforms/chrp/time.c chrp_cmos_clock_write(tm.tm_sec,RTC_SECONDS); tm 112 arch/powerpc/platforms/chrp/time.c chrp_cmos_clock_write(tm.tm_min,RTC_MINUTES); tm 113 arch/powerpc/platforms/chrp/time.c chrp_cmos_clock_write(tm.tm_hour,RTC_HOURS); tm 114 arch/powerpc/platforms/chrp/time.c chrp_cmos_clock_write(tm.tm_mon,RTC_MONTH); tm 115 arch/powerpc/platforms/chrp/time.c chrp_cmos_clock_write(tm.tm_mday,RTC_DAY_OF_MONTH); tm 116 arch/powerpc/platforms/chrp/time.c chrp_cmos_clock_write(tm.tm_year,RTC_YEAR); tm 132 arch/powerpc/platforms/chrp/time.c void chrp_get_rtc_time(struct rtc_time *tm) tm 155 arch/powerpc/platforms/chrp/time.c tm->tm_sec = sec; tm 156 arch/powerpc/platforms/chrp/time.c tm->tm_min = min; tm 157 arch/powerpc/platforms/chrp/time.c tm->tm_hour = hour; tm 158 arch/powerpc/platforms/chrp/time.c tm->tm_mday = day; tm 159 arch/powerpc/platforms/chrp/time.c tm->tm_mon = mon; tm 160 arch/powerpc/platforms/chrp/time.c tm->tm_year = year; tm 7 arch/powerpc/platforms/maple/maple.h extern int maple_set_rtc_time(struct rtc_time *tm); tm 8 arch/powerpc/platforms/maple/maple.h extern void maple_get_rtc_time(struct rtc_time *tm); tm 52 arch/powerpc/platforms/maple/time.c void maple_get_rtc_time(struct rtc_time *tm) tm 55 arch/powerpc/platforms/maple/time.c tm->tm_sec = maple_clock_read(RTC_SECONDS); tm 56 arch/powerpc/platforms/maple/time.c tm->tm_min = maple_clock_read(RTC_MINUTES); tm 57 arch/powerpc/platforms/maple/time.c tm->tm_hour = maple_clock_read(RTC_HOURS); tm 58 arch/powerpc/platforms/maple/time.c tm->tm_mday = maple_clock_read(RTC_DAY_OF_MONTH); tm 59 arch/powerpc/platforms/maple/time.c tm->tm_mon = maple_clock_read(RTC_MONTH); tm 60 arch/powerpc/platforms/maple/time.c tm->tm_year = maple_clock_read(RTC_YEAR); tm 61 arch/powerpc/platforms/maple/time.c } while (tm->tm_sec != maple_clock_read(RTC_SECONDS)); tm 65 arch/powerpc/platforms/maple/time.c tm->tm_sec = bcd2bin(tm->tm_sec); tm 66 arch/powerpc/platforms/maple/time.c tm->tm_min = bcd2bin(tm->tm_min); tm 67 arch/powerpc/platforms/maple/time.c tm->tm_hour = bcd2bin(tm->tm_hour); tm 68 arch/powerpc/platforms/maple/time.c tm->tm_mday = bcd2bin(tm->tm_mday); tm 69 arch/powerpc/platforms/maple/time.c tm->tm_mon = bcd2bin(tm->tm_mon); tm 70 arch/powerpc/platforms/maple/time.c tm->tm_year = bcd2bin(tm->tm_year); tm 72 arch/powerpc/platforms/maple/time.c if ((tm->tm_year + 1900) < 1970) tm 73 arch/powerpc/platforms/maple/time.c tm->tm_year += 100; tm 75 arch/powerpc/platforms/maple/time.c tm->tm_wday = -1; tm 78 arch/powerpc/platforms/maple/time.c int maple_set_rtc_time(struct rtc_time *tm) tm 93 arch/powerpc/platforms/maple/time.c sec = tm->tm_sec; tm 94 arch/powerpc/platforms/maple/time.c min = tm->tm_min; tm 95 arch/powerpc/platforms/maple/time.c hour = tm->tm_hour; tm 96 arch/powerpc/platforms/maple/time.c mon = tm->tm_mon; tm 97 arch/powerpc/platforms/maple/time.c mday = tm->tm_mday; tm 98 arch/powerpc/platforms/maple/time.c year = tm->tm_year; tm 137 arch/powerpc/platforms/maple/time.c struct rtc_time tm; tm 167 arch/powerpc/platforms/maple/time.c maple_get_rtc_time(&tm); tm 168 arch/powerpc/platforms/maple/time.c return rtc_tm_to_time64(&tm); tm 89 arch/powerpc/platforms/powermac/time.c struct rtc_time tm; tm 91 arch/powerpc/platforms/powermac/time.c if (smu_get_rtc_time(&tm, 1)) tm 93 arch/powerpc/platforms/powermac/time.c return rtc_tm_to_time64(&tm); tm 119 arch/powerpc/platforms/powermac/time.c void pmac_get_rtc_time(struct rtc_time *tm) tm 125 arch/powerpc/platforms/powermac/time.c rtc_time64_to_tm(cuda_get_time(), tm); tm 130 arch/powerpc/platforms/powermac/time.c rtc_time64_to_tm(pmu_get_time(), tm); tm 135 arch/powerpc/platforms/powermac/time.c smu_get_rtc_time(tm, 1); tm 143 arch/powerpc/platforms/powermac/time.c int pmac_set_rtc_time(struct rtc_time *tm) tm 148 arch/powerpc/platforms/powermac/time.c return cuda_set_rtc_time(tm); tm 152 arch/powerpc/platforms/powermac/time.c return pmu_set_rtc_time(tm); tm 156 arch/powerpc/platforms/powermac/time.c return smu_set_rtc_time(tm, 1); tm 21 arch/powerpc/platforms/powernv/opal-rtc.c static void opal_to_tm(u32 y_m_d, u64 h_m_s_ms, struct rtc_time *tm) tm 23 arch/powerpc/platforms/powernv/opal-rtc.c tm->tm_year = ((bcd2bin(y_m_d >> 24) * 100) + tm 25 arch/powerpc/platforms/powernv/opal-rtc.c tm->tm_mon = bcd2bin((y_m_d >> 8) & 0xff) - 1; tm 26 arch/powerpc/platforms/powernv/opal-rtc.c tm->tm_mday = bcd2bin(y_m_d & 0xff); tm 27 arch/powerpc/platforms/powernv/opal-rtc.c tm->tm_hour = bcd2bin((h_m_s_ms >> 56) & 0xff); tm 28 arch/powerpc/platforms/powernv/opal-rtc.c tm->tm_min = bcd2bin((h_m_s_ms >> 48) & 0xff); tm 29 arch/powerpc/platforms/powernv/opal-rtc.c tm->tm_sec = bcd2bin((h_m_s_ms >> 40) & 0xff); tm 30 arch/powerpc/platforms/powernv/opal-rtc.c tm->tm_wday = -1; tm 35 arch/powerpc/platforms/powernv/opal-rtc.c struct rtc_time tm; tm 59 arch/powerpc/platforms/powernv/opal-rtc.c opal_to_tm(y_m_d, h_m_s_ms, &tm); tm 60 arch/powerpc/platforms/powernv/opal-rtc.c return rtc_tm_to_time64(&tm); tm 229 arch/powerpc/sysdev/mpic.c static inline unsigned int mpic_tm_offset(struct mpic *mpic, unsigned int tm) tm 231 arch/powerpc/sysdev/mpic.c return (tm >> 2) * MPIC_TIMER_GROUP_STRIDE + tm 232 arch/powerpc/sysdev/mpic.c (tm & 3) * MPIC_INFO(TIMER_STRIDE); tm 235 arch/powerpc/sysdev/mpic.c static inline u32 _mpic_tm_read(struct mpic *mpic, unsigned int tm) tm 237 arch/powerpc/sysdev/mpic.c unsigned int offset = mpic_tm_offset(mpic, tm) + tm 243 arch/powerpc/sysdev/mpic.c static inline void _mpic_tm_write(struct mpic *mpic, unsigned int tm, u32 value) tm 245 arch/powerpc/sysdev/mpic.c unsigned int offset = mpic_tm_offset(mpic, tm) + tm 142 arch/s390/include/asm/scsw.h struct tm_scsw tm; tm 227 arch/s390/include/asm/scsw.h return css_general_characteristics.fcx && (scsw->tm.x == 1); tm 240 arch/s390/include/asm/scsw.h return scsw->tm.key; tm 255 arch/s390/include/asm/scsw.h return scsw->tm.eswf; tm 270 arch/s390/include/asm/scsw.h return scsw->tm.cc; tm 285 arch/s390/include/asm/scsw.h return scsw->tm.ectl; tm 300 arch/s390/include/asm/scsw.h return scsw->tm.pno; tm 315 arch/s390/include/asm/scsw.h return scsw->tm.fctl; tm 330 arch/s390/include/asm/scsw.h return scsw->tm.actl; tm 345 arch/s390/include/asm/scsw.h return scsw->tm.stctl; tm 360 arch/s390/include/asm/scsw.h return scsw->tm.dstat; tm 375 arch/s390/include/asm/scsw.h return scsw->tm.cstat; tm 606 arch/s390/include/asm/scsw.h return (scsw->tm.fctl & SCSW_FCTL_START_FUNC); tm 618 arch/s390/include/asm/scsw.h return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND); tm 630 arch/s390/include/asm/scsw.h return (scsw->tm.fctl & SCSW_FCTL_START_FUNC) && tm 631 arch/s390/include/asm/scsw.h (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND); tm 679 arch/s390/include/asm/scsw.h return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && tm 680 arch/s390/include/asm/scsw.h !(scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) && tm 681 arch/s390/include/asm/scsw.h (scsw->tm.stctl & SCSW_STCTL_ALERT_STATUS); tm 693 arch/s390/include/asm/scsw.h return (scsw->tm.fctl != 0) && tm 694 arch/s390/include/asm/scsw.h (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && tm 695 arch/s390/include/asm/scsw.h (!(scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) || tm 696 arch/s390/include/asm/scsw.h ((scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) && tm 697 arch/s390/include/asm/scsw.h (scsw->tm.actl & SCSW_ACTL_SUSPENDED))); tm 748 arch/s390/include/asm/scsw.h return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && tm 749 arch/s390/include/asm/scsw.h (scsw->tm.cc != 3); tm 761 arch/s390/include/asm/scsw.h return (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) && tm 762 arch/s390/include/asm/scsw.h (scsw->tm.cc != 3); tm 786 arch/s390/include/asm/scsw.h return (scsw->tm.cstat & (SCHN_STAT_PROG_CHECK | tm 974 arch/s390/include/asm/scsw.h return (scsw->tm.cc != 0) || (scsw->tm.stctl != tm 91 arch/s390/include/asm/timex.h unsigned int tm : 2; tm 33 arch/sh/boards/mach-dreamcast/rtc.c static int aica_rtc_gettimeofday(struct device *dev, struct rtc_time *tm) tm 49 arch/sh/boards/mach-dreamcast/rtc.c rtc_time64_to_tm(t, tm); tm 61 arch/sh/boards/mach-dreamcast/rtc.c static int aica_rtc_settimeofday(struct device *dev, struct rtc_time *tm) tm 64 arch/sh/boards/mach-dreamcast/rtc.c time64_t secs = rtc_tm_to_time64(tm); tm 42 arch/sh/boards/mach-sh03/rtc.c static int sh03_rtc_gettimeofday(struct device *dev, struct rtc_time *tm) tm 80 arch/sh/boards/mach-sh03/rtc.c tm->tm_sec = sec; tm 81 arch/sh/boards/mach-sh03/rtc.c tm->tm_min = min; tm 82 arch/sh/boards/mach-sh03/rtc.c tm->tm_hour = hour; tm 83 arch/sh/boards/mach-sh03/rtc.c tm->tm_mday = day; tm 84 arch/sh/boards/mach-sh03/rtc.c tm->tm_mon = mon; tm 85 arch/sh/boards/mach-sh03/rtc.c tm->tm_year = year - 1900; tm 90 arch/sh/boards/mach-sh03/rtc.c static int set_rtc_mmss(struct rtc_time *tm) tm 102 arch/sh/boards/mach-sh03/rtc.c real_seconds = tm->tm_sec; tm 103 arch/sh/boards/mach-sh03/rtc.c real_minutes = tm->tm_min; tm 124 arch/sh/boards/mach-sh03/rtc.c int sh03_rtc_settimeofday(struct device *dev, struct rtc_time *tm) tm 126 arch/sh/boards/mach-sh03/rtc.c return set_rtc_mmss(tm); tm 176 arch/sparc/kernel/smp_64.c unsigned long tcenter, t0, t1, tm; tm 183 arch/sparc/kernel/smp_64.c while (!(tm = go[SLAVE])) tm 190 arch/sparc/kernel/smp_64.c best_t0 = t0, best_t1 = t1, best_tm = tm; tm 45 arch/x86/kernel/rtc.c struct rtc_time tm; tm 48 arch/x86/kernel/rtc.c rtc_time64_to_tm(nowtime, &tm); tm 49 arch/x86/kernel/rtc.c if (!rtc_valid_tm(&tm)) { tm 50 arch/x86/kernel/rtc.c retval = mc146818_set_time(&tm); tm 444 arch/x86/kvm/trace.h TP_PROTO(__u32 apicid, __u16 dm, __u16 tm, __u8 vec), tm 445 arch/x86/kvm/trace.h TP_ARGS(apicid, dm, tm, vec), tm 450 arch/x86/kvm/trace.h __field( __u16, tm ) tm 457 arch/x86/kvm/trace.h __entry->tm = tm; tm 464 arch/x86/kvm/trace.h __entry->tm ? "level" : "edge") tm 699 arch/x86/platform/efi/efi_64.c static efi_status_t efi_thunk_get_time(efi_time_t *tm, efi_time_cap_t *tc) tm 708 arch/x86/platform/efi/efi_64.c phys_tm = virt_to_phys_or_null(tm); tm 719 arch/x86/platform/efi/efi_64.c static efi_status_t efi_thunk_set_time(efi_time_t *tm) tm 728 arch/x86/platform/efi/efi_64.c phys_tm = virt_to_phys_or_null(tm); tm 740 arch/x86/platform/efi/efi_64.c efi_time_t *tm) tm 751 arch/x86/platform/efi/efi_64.c phys_tm = virt_to_phys_or_null(tm); tm 763 arch/x86/platform/efi/efi_64.c efi_thunk_set_wakeup_time(efi_bool_t enabled, efi_time_t *tm) tm 772 arch/x86/platform/efi/efi_64.c phys_tm = virt_to_phys_or_null(tm); tm 89 arch/x86/platform/intel-mid/intel_mid_vrtc.c struct rtc_time tm; tm 93 arch/x86/platform/intel-mid/intel_mid_vrtc.c rtc_time64_to_tm(now->tv_sec, &tm); tm 94 arch/x86/platform/intel-mid/intel_mid_vrtc.c if (!rtc_valid_tm(&tm) && tm.tm_year >= 72) { tm 99 arch/x86/platform/intel-mid/intel_mid_vrtc.c year = tm.tm_year - 72; tm 102 arch/x86/platform/intel-mid/intel_mid_vrtc.c vrtc_cmos_write(tm.tm_mon, RTC_MONTH); tm 103 arch/x86/platform/intel-mid/intel_mid_vrtc.c vrtc_cmos_write(tm.tm_mday, RTC_DAY_OF_MONTH); tm 104 arch/x86/platform/intel-mid/intel_mid_vrtc.c vrtc_cmos_write(tm.tm_hour, RTC_HOURS); tm 105 arch/x86/platform/intel-mid/intel_mid_vrtc.c vrtc_cmos_write(tm.tm_min, RTC_MINUTES); tm 106 arch/x86/platform/intel-mid/intel_mid_vrtc.c vrtc_cmos_write(tm.tm_sec, RTC_SECONDS); tm 86 drivers/ata/pata_mpc52xx.c u8 tm; tm 91 drivers/ata/pata_mpc52xx.c { .t0M = 32, .td = 15, .th = 2, .tj = 2, .tkw = 15, .tm = 4, .tn = 1 }, tm 92 drivers/ata/pata_mpc52xx.c { .t0M = 10, .td = 6, .th = 1, .tj = 1, .tkw = 4, .tm = 2, .tn = 1 }, tm 93 drivers/ata/pata_mpc52xx.c { .t0M = 8, .td = 5, .th = 1, .tj = 1, .tkw = 2, .tm = 2, .tn = 1 }, tm 97 drivers/ata/pata_mpc52xx.c { .t0M = 64, .td = 29, .th = 3, .tj = 3, .tkw = 29, .tm = 7, .tn = 2 }, tm 98 drivers/ata/pata_mpc52xx.c { .t0M = 20, .td = 11, .th = 2, .tj = 1, .tkw = 7, .tm = 4, .tn = 1 }, tm 99 drivers/ata/pata_mpc52xx.c { .t0M = 16, .td = 10, .th = 2, .tj = 1, .tkw = 4, .tm = 4, .tn = 1 }, tm 302 drivers/ata/pata_mpc52xx.c t->mdma1 = ((u32)s->t0M << 24) | ((u32)s->td << 16) | ((u32)s->tkw << 8) | s->tm; tm 1106 drivers/char/rtc.c struct rtc_time tm; tm 1117 drivers/char/rtc.c rtc_get_rtc_time(&tm); tm 1127 drivers/char/rtc.c &tm, &tm, epoch); tm 1129 drivers/char/rtc.c get_rtc_alm_time(&tm); tm 1137 drivers/char/rtc.c if (tm.tm_hour <= 24) tm 1138 drivers/char/rtc.c seq_printf(seq, "%02d:", tm.tm_hour); tm 1142 drivers/char/rtc.c if (tm.tm_min <= 59) tm 1143 drivers/char/rtc.c seq_printf(seq, "%02d:", tm.tm_min); tm 1147 drivers/char/rtc.c if (tm.tm_sec <= 59) tm 1148 drivers/char/rtc.c seq_printf(seq, "%02d\n", tm.tm_sec); tm 251 drivers/firmware/efi/runtime-wrappers.c static efi_status_t virt_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc) tm 257 drivers/firmware/efi/runtime-wrappers.c status = efi_queue_work(EFI_GET_TIME, tm, tc, NULL, NULL, NULL); tm 262 drivers/firmware/efi/runtime-wrappers.c static efi_status_t virt_efi_set_time(efi_time_t *tm) tm 268 drivers/firmware/efi/runtime-wrappers.c status = efi_queue_work(EFI_SET_TIME, tm, NULL, NULL, NULL, NULL); tm 275 drivers/firmware/efi/runtime-wrappers.c efi_time_t *tm) tm 281 drivers/firmware/efi/runtime-wrappers.c status = efi_queue_work(EFI_GET_WAKEUP_TIME, enabled, pending, tm, NULL, tm 287 drivers/firmware/efi/runtime-wrappers.c static efi_status_t virt_efi_set_wakeup_time(efi_bool_t enabled, efi_time_t *tm) tm 293 drivers/firmware/efi/runtime-wrappers.c status = efi_queue_work(EFI_SET_WAKEUP_TIME, &enabled, tm, NULL, NULL, tm 186 drivers/firmware/raspberrypi.c struct tm tm; tm 188 drivers/firmware/raspberrypi.c time64_to_tm(packet, 0, &tm); tm 192 drivers/firmware/raspberrypi.c tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm 193 drivers/firmware/raspberrypi.c tm.tm_hour, tm.tm_min); tm 335 drivers/gpu/drm/armada/armada_crtc.c uint32_t lm, rm, tm, bm, val, sclk; tm 344 drivers/gpu/drm/armada/armada_crtc.c tm = adj->crtc_vtotal - adj->crtc_vsync_end; tm 348 drivers/gpu/drm/armada/armada_crtc.c DRM_DEBUG_KMS("lm %d rm %d tm %d bm %d\n", lm, rm, tm, bm); tm 361 drivers/gpu/drm/armada/armada_crtc.c dcrtc->v[1].spu_v_porch = tm << 16 | bm; tm 257 drivers/hwmon/coretemp.c const struct tjmax_model *tm = &tjmax_model_table[i]; tm 258 drivers/hwmon/coretemp.c if (c->x86_model == tm->model && tm 259 drivers/hwmon/coretemp.c (tm->mask == ANY || c->x86_stepping == tm->mask)) tm 260 drivers/hwmon/coretemp.c return tm->tjmax; tm 645 drivers/ide/pmac.c struct mdma_timings_t* tm = NULL; tm 672 drivers/ide/pmac.c tm = mdma_timings_66; tm 675 drivers/ide/pmac.c tm = mdma_timings_33k; tm 678 drivers/ide/pmac.c tm = mdma_timings_33; tm 681 drivers/ide/pmac.c if (tm != NULL) { tm 685 drivers/ide/pmac.c if (tm[i+1].cycleTime < cycleTime) tm 689 drivers/ide/pmac.c cycleTime = tm[i].cycleTime; tm 690 drivers/ide/pmac.c accessTime = tm[i].accessTime; tm 691 drivers/ide/pmac.c recTime = tm[i].recoveryTime; tm 134 drivers/input/misc/hp_sdc_rtc.c struct rtc_time tm, tm_last; tm 140 drivers/input/misc/hp_sdc_rtc.c if (hp_sdc_rtc_do_read_bbrtc(&tm)) return -1; tm 142 drivers/input/misc/hp_sdc_rtc.c while (memcmp(&tm, &tm_last, sizeof(struct rtc_time))) { tm 144 drivers/input/misc/hp_sdc_rtc.c memcpy(&tm_last, &tm, sizeof(struct rtc_time)); tm 145 drivers/input/misc/hp_sdc_rtc.c if (hp_sdc_rtc_do_read_bbrtc(&tm)) return -1; tm 148 drivers/input/misc/hp_sdc_rtc.c memcpy(rtctm, &tm, sizeof(struct rtc_time)); tm 435 drivers/input/misc/hp_sdc_rtc.c struct rtc_time tm; tm 438 drivers/input/misc/hp_sdc_rtc.c memset(&tm, 0, sizeof(struct rtc_time)); tm 440 drivers/input/misc/hp_sdc_rtc.c if (hp_sdc_rtc_read_bbrtc(&tm)) { tm 447 drivers/input/misc/hp_sdc_rtc.c &tm, &tm, epoch); tm 423 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 830 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 922 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 993 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1030 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1048 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1079 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1094 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1379 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1402 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1678 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1693 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 1710 drivers/isdn/mISDN/layer2.c if (l2->tm) tm 53 drivers/isdn/mISDN/layer2.h struct teimgr *tm; tm 221 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 234 drivers/isdn/mISDN/tei.c tm->l2->sapi, tm->l2->tei, &vaf); tm 458 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 460 drivers/isdn/mISDN/tei.c if (tm->l2->tei != GROUP_TEI) { tm 461 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(&tm->tei_m, tm 463 drivers/isdn/mISDN/tei.c tm->l2->tei); tm 466 drivers/isdn/mISDN/tei.c tm->ri = random_ri(); tm 468 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(&tm->tei_m, tm 469 drivers/isdn/mISDN/tei.c "assign request ri %d", tm->ri); tm 470 drivers/isdn/mISDN/tei.c put_tei_msg(tm->mgr, ID_REQUEST, tm->ri, GROUP_TEI); tm 472 drivers/isdn/mISDN/tei.c mISDN_FsmAddTimer(&tm->timer, tm->tval, EV_TIMER, NULL, 1); tm 473 drivers/isdn/mISDN/tei.c tm->nval = 3; tm 479 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 489 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "identity assign ri %d tei %d", tm 491 drivers/isdn/mISDN/tei.c l2 = findtei(tm->mgr, tei); tm 493 drivers/isdn/mISDN/tei.c if (ri != l2->tm->ri) { tm 494 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, tm 498 drivers/isdn/mISDN/tei.c } else if (ri == tm->ri) { tm 499 drivers/isdn/mISDN/tei.c mISDN_FsmDelTimer(&tm->timer, 1); tm 501 drivers/isdn/mISDN/tei.c tei_l2(tm->l2, MDL_ASSIGN_REQ, tei); tm 508 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 518 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "foreign identity assign ri %d tei %d", tm 520 drivers/isdn/mISDN/tei.c l2 = findtei(tm->mgr, tei); tm 522 drivers/isdn/mISDN/tei.c if (ri != l2->tm->ri) { /* and it wasn't our request */ tm 523 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, tm 525 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&l2->tm->tei_m, EV_VERIFY, NULL); tm 533 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 542 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "identity denied ri %d tei %d", tm 549 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 555 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "identity check req tei %d", tei); tm 556 drivers/isdn/mISDN/tei.c if ((tm->l2->tei != GROUP_TEI) && ((tei == GROUP_TEI) || tm 557 drivers/isdn/mISDN/tei.c (tei == tm->l2->tei))) { tm 558 drivers/isdn/mISDN/tei.c mISDN_FsmDelTimer(&tm->timer, 4); tm 559 drivers/isdn/mISDN/tei.c mISDN_FsmChangeState(&tm->tei_m, ST_TEI_NOP); tm 560 drivers/isdn/mISDN/tei.c put_tei_msg(tm->mgr, ID_CHK_RES, random_ri(), tm->l2->tei); tm 567 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 573 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "identity remove tei %d", tei); tm 574 drivers/isdn/mISDN/tei.c if ((tm->l2->tei != GROUP_TEI) && tm 575 drivers/isdn/mISDN/tei.c ((tei == GROUP_TEI) || (tei == tm->l2->tei))) { tm 576 drivers/isdn/mISDN/tei.c mISDN_FsmDelTimer(&tm->timer, 5); tm 577 drivers/isdn/mISDN/tei.c mISDN_FsmChangeState(&tm->tei_m, ST_TEI_NOP); tm 578 drivers/isdn/mISDN/tei.c tei_l2(tm->l2, MDL_REMOVE_REQ, 0); tm 585 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 588 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "id verify request for tei %d", tm 589 drivers/isdn/mISDN/tei.c tm->l2->tei); tm 590 drivers/isdn/mISDN/tei.c put_tei_msg(tm->mgr, ID_VERIFY, 0, tm->l2->tei); tm 591 drivers/isdn/mISDN/tei.c mISDN_FsmChangeState(&tm->tei_m, ST_TEI_IDVERIFY); tm 592 drivers/isdn/mISDN/tei.c mISDN_FsmAddTimer(&tm->timer, tm->tval, EV_TIMER, NULL, 2); tm 593 drivers/isdn/mISDN/tei.c tm->nval = 2; tm 599 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 601 drivers/isdn/mISDN/tei.c if (--tm->nval) { tm 602 drivers/isdn/mISDN/tei.c tm->ri = random_ri(); tm 604 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "assign req(%d) ri %d", tm 605 drivers/isdn/mISDN/tei.c 4 - tm->nval, tm->ri); tm 606 drivers/isdn/mISDN/tei.c put_tei_msg(tm->mgr, ID_REQUEST, tm->ri, GROUP_TEI); tm 607 drivers/isdn/mISDN/tei.c mISDN_FsmAddTimer(&tm->timer, tm->tval, EV_TIMER, NULL, 3); tm 609 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "assign req failed"); tm 610 drivers/isdn/mISDN/tei.c tei_l2(tm->l2, MDL_ERROR_RSP, 0); tm 618 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 620 drivers/isdn/mISDN/tei.c if (--tm->nval) { tm 622 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, tm 624 drivers/isdn/mISDN/tei.c 3 - tm->nval, tm->l2->tei); tm 625 drivers/isdn/mISDN/tei.c put_tei_msg(tm->mgr, ID_VERIFY, 0, tm->l2->tei); tm 626 drivers/isdn/mISDN/tei.c mISDN_FsmAddTimer(&tm->timer, tm->tval, EV_TIMER, NULL, 4); tm 628 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "verify req for tei %d failed", tm 629 drivers/isdn/mISDN/tei.c tm->l2->tei); tm 630 drivers/isdn/mISDN/tei.c tei_l2(tm->l2, MDL_REMOVE_REQ, 0); tm 653 drivers/isdn/mISDN/tei.c put_tei_msg(l2->tm->mgr, ID_REMOVE, 0, l2->tei); tm 662 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 665 drivers/isdn/mISDN/tei.c if (tm->l2->tei == GROUP_TEI) { tm 666 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(&tm->tei_m, tm 670 drivers/isdn/mISDN/tei.c tm->ri = ((unsigned int) *dp++ << 8); tm 671 drivers/isdn/mISDN/tei.c tm->ri += *dp++; tm 673 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(&tm->tei_m, tm 674 drivers/isdn/mISDN/tei.c "net assign request ri %d teim %d", tm->ri, *dp); tm 675 drivers/isdn/mISDN/tei.c put_tei_msg(tm->mgr, ID_ASSIGNED, tm->ri, tm->l2->tei); tm 682 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 685 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "id check request for tei %d", tm 686 drivers/isdn/mISDN/tei.c tm->l2->tei); tm 687 drivers/isdn/mISDN/tei.c tm->rcnt = 0; tm 688 drivers/isdn/mISDN/tei.c put_tei_msg(tm->mgr, ID_CHK_REQ, 0, tm->l2->tei); tm 689 drivers/isdn/mISDN/tei.c mISDN_FsmChangeState(&tm->tei_m, ST_TEI_IDVERIFY); tm 690 drivers/isdn/mISDN/tei.c mISDN_FsmAddTimer(&tm->timer, tm->tval, EV_TIMER, NULL, 2); tm 691 drivers/isdn/mISDN/tei.c tm->nval = 2; tm 697 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 703 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "identity check resp tei %d", tei); tm 704 drivers/isdn/mISDN/tei.c if (tei == tm->l2->tei) tm 705 drivers/isdn/mISDN/tei.c tm->rcnt++; tm 711 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 717 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "identity verify req tei %d/%d", tm 718 drivers/isdn/mISDN/tei.c tei, tm->l2->tei); tm 719 drivers/isdn/mISDN/tei.c if (tei == tm->l2->tei) tm 726 drivers/isdn/mISDN/tei.c struct teimgr *tm = fi->userdata; tm 728 drivers/isdn/mISDN/tei.c if (tm->rcnt == 1) { tm 730 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, tm 731 drivers/isdn/mISDN/tei.c "check req for tei %d successful\n", tm->l2->tei); tm 733 drivers/isdn/mISDN/tei.c } else if (tm->rcnt > 1) { tm 735 drivers/isdn/mISDN/tei.c tei_l2remove(tm->l2); tm 736 drivers/isdn/mISDN/tei.c } else if (--tm->nval) { tm 738 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, tm 740 drivers/isdn/mISDN/tei.c 3 - tm->nval, tm->l2->tei); tm 741 drivers/isdn/mISDN/tei.c put_tei_msg(tm->mgr, ID_CHK_REQ, 0, tm->l2->tei); tm 742 drivers/isdn/mISDN/tei.c mISDN_FsmAddTimer(&tm->timer, tm->tval, EV_TIMER, NULL, 4); tm 744 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(fi, "check req for tei %d failed", tm 745 drivers/isdn/mISDN/tei.c tm->l2->tei); tm 747 drivers/isdn/mISDN/tei.c tei_l2remove(tm->l2); tm 761 drivers/isdn/mISDN/tei.c tei_ph_data_ind(struct teimgr *tm, u_int mt, u_char *dp, int len) tm 763 drivers/isdn/mISDN/tei.c if (test_bit(FLG_FIXED_TEI, &tm->l2->flag)) tm 766 drivers/isdn/mISDN/tei.c tm->tei_m.printdebug(&tm->tei_m, "tei handler mt %x", mt); tm 768 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_ASSIGN, dp); tm 770 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_DENIED, dp); tm 772 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_CHKREQ, dp); tm 774 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_REMOVE, dp); tm 776 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_VERIFY, dp); tm 778 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_CHKRESP, dp); tm 806 drivers/isdn/mISDN/tei.c l2->tm = kzalloc(sizeof(struct teimgr), GFP_KERNEL); tm 807 drivers/isdn/mISDN/tei.c if (!l2->tm) { tm 812 drivers/isdn/mISDN/tei.c l2->tm->mgr = mgr; tm 813 drivers/isdn/mISDN/tei.c l2->tm->l2 = l2; tm 814 drivers/isdn/mISDN/tei.c l2->tm->tei_m.debug = *debug & DEBUG_L2_TEIFSM; tm 815 drivers/isdn/mISDN/tei.c l2->tm->tei_m.userdata = l2->tm; tm 816 drivers/isdn/mISDN/tei.c l2->tm->tei_m.printdebug = tei_debug; tm 817 drivers/isdn/mISDN/tei.c l2->tm->tei_m.fsm = &teifsmn; tm 818 drivers/isdn/mISDN/tei.c l2->tm->tei_m.state = ST_TEI_NOP; tm 819 drivers/isdn/mISDN/tei.c l2->tm->tval = 2000; /* T202 2 sec */ tm 820 drivers/isdn/mISDN/tei.c mISDN_FsmInitTimer(&l2->tm->tei_m, &l2->tm->timer); tm 871 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&l2->tm->tei_m, EV_ASSIGN_REQ, dp); tm 927 drivers/isdn/mISDN/tei.c tei_ph_data_ind(l2->tm, mt, &skb->data[4], skb->len - 4); tm 936 drivers/isdn/mISDN/tei.c struct teimgr *tm = l2->tm; tm 944 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_IDREQ, NULL); tm 947 drivers/isdn/mISDN/tei.c if (test_bit(MGR_OPT_NETWORK, &tm->mgr->options)) tm 948 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_CHKREQ, &l2->tei); tm 949 drivers/isdn/mISDN/tei.c if (test_bit(MGR_OPT_USER, &tm->mgr->options)) tm 950 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->tei_m, EV_VERIFY, NULL); tm 953 drivers/isdn/mISDN/tei.c if (test_bit(MGR_OPT_NETWORK, &tm->mgr->options)) tm 954 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->mgr->deact, EV_ACTIVATE, NULL); tm 957 drivers/isdn/mISDN/tei.c if (test_bit(MGR_OPT_NETWORK, &tm->mgr->options)) tm 958 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->mgr->deact, EV_DEACTIVATE, NULL); tm 961 drivers/isdn/mISDN/tei.c if (test_bit(MGR_OPT_NETWORK, &tm->mgr->options)) tm 962 drivers/isdn/mISDN/tei.c mISDN_FsmEvent(&tm->mgr->deact, EV_UI, NULL); tm 971 drivers/isdn/mISDN/tei.c struct teimgr *tm = l2->tm; tm 974 drivers/isdn/mISDN/tei.c mISDN_FsmDelTimer(&tm->timer, 1); tm 975 drivers/isdn/mISDN/tei.c write_lock_irqsave(&tm->mgr->lock, flags); tm 977 drivers/isdn/mISDN/tei.c write_unlock_irqrestore(&tm->mgr->lock, flags); tm 978 drivers/isdn/mISDN/tei.c l2->tm = NULL; tm 979 drivers/isdn/mISDN/tei.c kfree(tm); tm 1049 drivers/isdn/mISDN/tei.c l2->tm = kzalloc(sizeof(struct teimgr), GFP_KERNEL); tm 1050 drivers/isdn/mISDN/tei.c if (!l2->tm) { tm 1055 drivers/isdn/mISDN/tei.c l2->tm->mgr = mgr; tm 1056 drivers/isdn/mISDN/tei.c l2->tm->l2 = l2; tm 1057 drivers/isdn/mISDN/tei.c l2->tm->tei_m.debug = *debug & DEBUG_L2_TEIFSM; tm 1058 drivers/isdn/mISDN/tei.c l2->tm->tei_m.userdata = l2->tm; tm 1059 drivers/isdn/mISDN/tei.c l2->tm->tei_m.printdebug = tei_debug; tm 1061 drivers/isdn/mISDN/tei.c l2->tm->tei_m.fsm = &teifsmu; tm 1062 drivers/isdn/mISDN/tei.c l2->tm->tei_m.state = ST_TEI_NOP; tm 1063 drivers/isdn/mISDN/tei.c l2->tm->tval = 1000; /* T201 1 sec */ tm 1069 drivers/isdn/mISDN/tei.c l2->tm->tei_m.fsm = &teifsmn; tm 1070 drivers/isdn/mISDN/tei.c l2->tm->tei_m.state = ST_TEI_NOP; tm 1071 drivers/isdn/mISDN/tei.c l2->tm->tval = 2000; /* T202 2 sec */ tm 1077 drivers/isdn/mISDN/tei.c mISDN_FsmInitTimer(&l2->tm->tei_m, &l2->tm->timer); tm 791 drivers/macintosh/via-cuda.c int cuda_set_rtc_time(struct rtc_time *tm) tm 796 drivers/macintosh/via-cuda.c now = lower_32_bits(rtc_tm_to_time64(tm) + RTC_OFFSET); tm 1758 drivers/macintosh/via-pmu.c int pmu_set_rtc_time(struct rtc_time *tm) tm 1763 drivers/macintosh/via-pmu.c now = lower_32_bits(rtc_tm_to_time64(tm) + RTC_OFFSET); tm 111 drivers/md/dm-cache-metadata.c struct dm_transaction_manager *tm; tm 298 drivers/md/dm-cache-metadata.c dm_array_info_init(&cmd->info, cmd->tm, &vt); tm 302 drivers/md/dm-cache-metadata.c dm_array_info_init(&cmd->hint_info, cmd->tm, &vt); tm 343 drivers/md/dm-cache-metadata.c r = dm_tm_pre_commit(cmd->tm); tm 387 drivers/md/dm-cache-metadata.c return dm_tm_commit(cmd->tm, sblock); tm 395 drivers/md/dm-cache-metadata.c &cmd->tm, &cmd->metadata_sm); tm 408 drivers/md/dm-cache-metadata.c dm_disk_bitset_init(cmd->tm, &cmd->dirty_info); tm 414 drivers/md/dm-cache-metadata.c dm_disk_bitset_init(cmd->tm, &cmd->discard_info); tm 430 drivers/md/dm-cache-metadata.c dm_tm_destroy(cmd->tm); tm 496 drivers/md/dm-cache-metadata.c &cmd->tm, &cmd->metadata_sm); tm 503 drivers/md/dm-cache-metadata.c dm_disk_bitset_init(cmd->tm, &cmd->dirty_info); tm 504 drivers/md/dm-cache-metadata.c dm_disk_bitset_init(cmd->tm, &cmd->discard_info); tm 553 drivers/md/dm-cache-metadata.c dm_tm_destroy(cmd->tm); tm 674 drivers/md/dm-cache-metadata.c r = dm_tm_pre_commit(cmd->tm); tm 712 drivers/md/dm-cache-metadata.c return dm_tm_commit(cmd->tm, sblock); tm 144 drivers/md/dm-clone-metadata.c struct dm_transaction_manager *tm; tm 350 drivers/md/dm-clone-metadata.c &cmd->tm, &cmd->sm); tm 357 drivers/md/dm-clone-metadata.c dm_disk_bitset_init(cmd->tm, &cmd->bitset_info); tm 372 drivers/md/dm-clone-metadata.c r = dm_tm_create_with_sm(cmd->bm, SUPERBLOCK_LOCATION, &cmd->tm, &cmd->sm); tm 378 drivers/md/dm-clone-metadata.c dm_disk_bitset_init(cmd->tm, &cmd->bitset_info); tm 394 drivers/md/dm-clone-metadata.c r = dm_tm_pre_commit(cmd->tm); tm 414 drivers/md/dm-clone-metadata.c r = dm_tm_commit(cmd->tm, sblock); tm 424 drivers/md/dm-clone-metadata.c dm_tm_destroy(cmd->tm); tm 468 drivers/md/dm-clone-metadata.c dm_tm_destroy(cmd->tm); tm 708 drivers/md/dm-clone-metadata.c r = dm_tm_pre_commit(cmd->tm); tm 733 drivers/md/dm-clone-metadata.c r = dm_tm_commit(cmd->tm, sblock); tm 264 drivers/md/dm-era-target.c struct dm_transaction_manager *tm; tm 374 drivers/md/dm-era-target.c dm_tm_inc(md->tm, b); tm 399 drivers/md/dm-era-target.c md->writeset_tree_info.tm = md->tm; tm 418 drivers/md/dm-era-target.c dm_array_info_init(&md->era_array_info, md->tm, &vt); tm 423 drivers/md/dm-era-target.c dm_disk_bitset_init(md->tm, &md->bitset_info); tm 435 drivers/md/dm-era-target.c &md->tm, &md->sm); tm 459 drivers/md/dm-era-target.c dm_tm_destroy(md->tm); tm 530 drivers/md/dm-era-target.c return dm_tm_commit(md->tm, sblock); tm 547 drivers/md/dm-era-target.c dm_tm_destroy(md->tm); tm 570 drivers/md/dm-era-target.c &md->tm, &md->sm); tm 634 drivers/md/dm-era-target.c dm_tm_destroy(md->tm); tm 767 drivers/md/dm-era-target.c dm_disk_bitset_init(md->tm, &d->info); tm 963 drivers/md/dm-era-target.c r = dm_tm_pre_commit(md->tm); tm 983 drivers/md/dm-era-target.c return dm_tm_commit(md->tm, sblock); tm 1026 drivers/md/dm-era-target.c r = dm_tm_shadow_block(md->tm, SUPERBLOCK_LOCATION, tm 1038 drivers/md/dm-era-target.c dm_tm_unlock(md->tm, clone); tm 1046 drivers/md/dm-era-target.c dm_tm_unlock(md->tm, clone); tm 1052 drivers/md/dm-era-target.c dm_tm_unlock(md->tm, clone); tm 1069 drivers/md/dm-era-target.c r = dm_tm_read_lock(md->tm, md->metadata_snap, &sb_validator, &clone); tm 1086 drivers/md/dm-era-target.c dm_tm_unlock(md->tm, clone); tm 1093 drivers/md/dm-era-target.c dm_tm_unlock(md->tm, clone); tm 1098 drivers/md/dm-era-target.c dm_tm_unlock(md->tm, clone); tm 152 drivers/md/dm-thin-metadata.c struct dm_transaction_manager *tm; tm 360 drivers/md/dm-thin-metadata.c dm_tm_inc(info->tm, root); tm 456 drivers/md/dm-thin-metadata.c pmd->info.tm = pmd->tm; tm 465 drivers/md/dm-thin-metadata.c pmd->nb_info.tm = pmd->nb_tm; tm 467 drivers/md/dm-thin-metadata.c pmd->tl_info.tm = pmd->tm; tm 475 drivers/md/dm-thin-metadata.c pmd->bl_info.tm = pmd->tm; tm 483 drivers/md/dm-thin-metadata.c pmd->details_info.tm = pmd->tm; tm 538 drivers/md/dm-thin-metadata.c r = dm_tm_pre_commit(pmd->tm); tm 567 drivers/md/dm-thin-metadata.c return dm_tm_commit(pmd->tm, sblock); tm 575 drivers/md/dm-thin-metadata.c &pmd->tm, &pmd->metadata_sm); tm 581 drivers/md/dm-thin-metadata.c pmd->data_sm = dm_sm_disk_create(pmd->tm, 0); tm 588 drivers/md/dm-thin-metadata.c pmd->nb_tm = dm_tm_create_non_blocking_clone(pmd->tm); tm 618 drivers/md/dm-thin-metadata.c dm_tm_destroy(pmd->tm); tm 683 drivers/md/dm-thin-metadata.c &pmd->tm, &pmd->metadata_sm); tm 689 drivers/md/dm-thin-metadata.c pmd->data_sm = dm_sm_disk_open(pmd->tm, disk_super->data_space_map_root, tm 697 drivers/md/dm-thin-metadata.c pmd->nb_tm = dm_tm_create_non_blocking_clone(pmd->tm); tm 712 drivers/md/dm-thin-metadata.c dm_tm_destroy(pmd->tm); tm 757 drivers/md/dm-thin-metadata.c dm_tm_destroy(pmd->tm); tm 854 drivers/md/dm-thin-metadata.c r = dm_tm_pre_commit(pmd->tm); tm 875 drivers/md/dm-thin-metadata.c return dm_tm_commit(pmd->tm, sblock); tm 1144 drivers/md/dm-thin-metadata.c dm_tm_inc(pmd->tm, origin_root); tm 1152 drivers/md/dm-thin-metadata.c dm_tm_dec(pmd->tm, origin_root); tm 1296 drivers/md/dm-thin-metadata.c r = dm_tm_shadow_block(pmd->tm, THIN_SUPERBLOCK_LOCATION, tm 1309 drivers/md/dm-thin-metadata.c dm_tm_dec(pmd->tm, held_root); tm 1310 drivers/md/dm-thin-metadata.c dm_tm_unlock(pmd->tm, copy); tm 1325 drivers/md/dm-thin-metadata.c dm_tm_inc(pmd->tm, le64_to_cpu(disk_super->data_mapping_root)); tm 1326 drivers/md/dm-thin-metadata.c dm_tm_inc(pmd->tm, le64_to_cpu(disk_super->device_details_root)); tm 1327 drivers/md/dm-thin-metadata.c dm_tm_unlock(pmd->tm, copy); tm 1334 drivers/md/dm-thin-metadata.c dm_tm_dec(pmd->tm, held_root); tm 1378 drivers/md/dm-thin-metadata.c r = dm_tm_read_lock(pmd->tm, held_root, &sb_validator, ©); tm 1387 drivers/md/dm-thin-metadata.c dm_tm_unlock(pmd->tm, copy); tm 1680 drivers/md/dm-thin-metadata.c dm_tm_inc(pmd->tm, mapping_root); tm 2120 drivers/md/dm-thin-metadata.c dm_tm_issue_prefetches(pmd->tm); tm 158 drivers/md/persistent-data/dm-array.c r = dm_tm_new_block(info->btree_info.tm, &array_validator, block); tm 225 drivers/md/persistent-data/dm-array.c r = dm_tm_read_lock(info->btree_info.tm, b, &array_validator, block); tm 238 drivers/md/persistent-data/dm-array.c dm_tm_unlock(info->btree_info.tm, block); tm 286 drivers/md/persistent-data/dm-array.c int r = dm_tm_shadow_block(info->btree_info.tm, b, tm 315 drivers/md/persistent-data/dm-array.c dm_tm_inc(info->btree_info.tm, b); tm 582 drivers/md/persistent-data/dm-array.c dm_tm_inc(info->btree_info.tm, le64_to_cpu(block_le)); tm 598 drivers/md/persistent-data/dm-array.c r = dm_tm_ref(info->btree_info.tm, b, &ref_count); tm 621 drivers/md/persistent-data/dm-array.c dm_tm_dec(info->btree_info.tm, b); tm 632 drivers/md/persistent-data/dm-array.c struct dm_transaction_manager *tm, tm 638 drivers/md/persistent-data/dm-array.c info->btree_info.tm = tm; tm 669 drivers/md/persistent-data/dm-array.c resize.size_of_block = dm_bm_block_size(dm_tm_get_bm(info->btree_info.tm)); tm 733 drivers/md/persistent-data/dm-array.c size_of_block = dm_bm_block_size(dm_tm_get_bm(info->btree_info.tm)); tm 777 drivers/md/persistent-data/dm-array.c size_of_block = dm_bm_block_size(dm_tm_get_bm(info->btree_info.tm)); tm 808 drivers/md/persistent-data/dm-array.c size_of_block = dm_bm_block_size(dm_tm_get_bm(info->btree_info.tm)); tm 69 drivers/md/persistent-data/dm-array.h struct dm_transaction_manager *tm; tm 83 drivers/md/persistent-data/dm-array.h struct dm_transaction_manager *tm, tm 28 drivers/md/persistent-data/dm-bitset.c void dm_disk_bitset_init(struct dm_transaction_manager *tm, tm 31 drivers/md/persistent-data/dm-bitset.c dm_array_info_init(&info->array_info, tm, &bitset_bvt); tm 84 drivers/md/persistent-data/dm-bitset.h void dm_disk_bitset_init(struct dm_transaction_manager *tm, tm 51 drivers/md/persistent-data/dm-btree-internal.h void inc_children(struct dm_transaction_manager *tm, struct btree_node *n, tm 144 drivers/md/persistent-data/dm-btree-internal.h extern void init_le64_type(struct dm_transaction_manager *tm, tm 152 drivers/md/persistent-data/dm-btree-remove.c r = dm_tm_shadow_block(info->tm, root, &btree_node_validator, tm 160 drivers/md/persistent-data/dm-btree-remove.c inc_children(info->tm, result->n, vt); tm 170 drivers/md/persistent-data/dm-btree-remove.c dm_tm_unlock(info->tm, c->block); tm 226 drivers/md/persistent-data/dm-btree-remove.c dm_tm_dec(info->tm, dm_block_location(r->block)); tm 293 drivers/md/persistent-data/dm-btree-remove.c dm_tm_dec(info->tm, dm_block_location(c->block)); tm 420 drivers/md/persistent-data/dm-btree-remove.c r = dm_tm_read_lock(info->tm, b, &btree_node_validator, &child); tm 425 drivers/md/persistent-data/dm-btree-remove.c dm_bm_block_size(dm_tm_get_bm(info->tm))); tm 426 drivers/md/persistent-data/dm-btree-remove.c dm_tm_unlock(info->tm, child); tm 428 drivers/md/persistent-data/dm-btree-remove.c dm_tm_dec(info->tm, dm_block_location(child)); tm 527 drivers/md/persistent-data/dm-btree-remove.c init_le64_type(info->tm, &le64_vt); tm 625 drivers/md/persistent-data/dm-btree-remove.c init_le64_type(info->tm, &le64_vt); tm 98 drivers/md/persistent-data/dm-btree-spine.c return dm_tm_read_lock(info->tm, b, &btree_node_validator, result); tm 107 drivers/md/persistent-data/dm-btree-spine.c r = dm_tm_shadow_block(info->tm, orig, &btree_node_validator, tm 110 drivers/md/persistent-data/dm-btree-spine.c inc_children(info->tm, dm_block_data(*result), vt); tm 117 drivers/md/persistent-data/dm-btree-spine.c return dm_tm_new_block(info->tm, &btree_node_validator, result); tm 122 drivers/md/persistent-data/dm-btree-spine.c dm_tm_unlock(info->tm, b); tm 247 drivers/md/persistent-data/dm-btree-spine.c struct dm_transaction_manager *tm = context; tm 251 drivers/md/persistent-data/dm-btree-spine.c dm_tm_inc(tm, le64_to_cpu(v_le)); tm 256 drivers/md/persistent-data/dm-btree-spine.c struct dm_transaction_manager *tm = context; tm 260 drivers/md/persistent-data/dm-btree-spine.c dm_tm_dec(tm, le64_to_cpu(v_le)); tm 272 drivers/md/persistent-data/dm-btree-spine.c void init_le64_type(struct dm_transaction_manager *tm, tm 275 drivers/md/persistent-data/dm-btree-spine.c vt->context = tm; tm 71 drivers/md/persistent-data/dm-btree.c void inc_children(struct dm_transaction_manager *tm, struct btree_node *n, tm 79 drivers/md/persistent-data/dm-btree.c dm_tm_inc(tm, value64(n, i)); tm 138 drivers/md/persistent-data/dm-btree.c block_size = dm_bm_block_size(dm_tm_get_bm(info->tm)); tm 172 drivers/md/persistent-data/dm-btree.c struct dm_transaction_manager *tm; tm 197 drivers/md/persistent-data/dm-btree.c struct dm_block_manager *bm = dm_tm_get_bm(s->tm); tm 218 drivers/md/persistent-data/dm-btree.c r = dm_tm_ref(s->tm, b, &ref_count); tm 227 drivers/md/persistent-data/dm-btree.c dm_tm_dec(s->tm, b); tm 233 drivers/md/persistent-data/dm-btree.c r = dm_tm_read_lock(s->tm, b, &btree_node_validator, &f->b); tm 256 drivers/md/persistent-data/dm-btree.c dm_tm_dec(s->tm, dm_block_location(f->b)); tm 257 drivers/md/persistent-data/dm-btree.c dm_tm_unlock(s->tm, f->b); tm 266 drivers/md/persistent-data/dm-btree.c dm_tm_unlock(s->tm, f->b); tm 284 drivers/md/persistent-data/dm-btree.c s->tm = info->tm; tm 466 drivers/md/persistent-data/dm-btree.c dm_tm_unlock(info->tm, node); tm 674 drivers/md/persistent-data/dm-btree.c dm_tm_get_bm(s->info->tm)))); tm 774 drivers/md/persistent-data/dm-btree.c init_le64_type(info->tm, &le64_type); tm 980 drivers/md/persistent-data/dm-btree.c dm_tm_unlock(info->tm, node); tm 1001 drivers/md/persistent-data/dm-btree.c struct dm_block_manager *bm = dm_tm_get_bm(c->info->tm); tm 82 drivers/md/persistent-data/dm-btree.h struct dm_transaction_manager *tm; tm 191 drivers/md/persistent-data/dm-space-map-common.c static int sm_ll_init(struct ll_disk *ll, struct dm_transaction_manager *tm) tm 195 drivers/md/persistent-data/dm-space-map-common.c ll->tm = tm; tm 197 drivers/md/persistent-data/dm-space-map-common.c ll->bitmap_info.tm = tm; tm 210 drivers/md/persistent-data/dm-space-map-common.c ll->ref_count_info.tm = tm; tm 217 drivers/md/persistent-data/dm-space-map-common.c ll->block_size = dm_bm_block_size(dm_tm_get_bm(tm)); tm 258 drivers/md/persistent-data/dm-space-map-common.c r = dm_tm_new_block(ll->tm, &dm_sm_bitmap_validator, &b); tm 264 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, b); tm 289 drivers/md/persistent-data/dm-space-map-common.c r = dm_tm_read_lock(ll->tm, le64_to_cpu(ie_disk.blocknr), tm 296 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, blk); tm 355 drivers/md/persistent-data/dm-space-map-common.c r = dm_tm_read_lock(ll->tm, le64_to_cpu(ie_disk.blocknr), tm 370 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, blk); tm 374 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, blk); tm 427 drivers/md/persistent-data/dm-space-map-common.c r = dm_tm_shadow_block(ll->tm, le64_to_cpu(ie_disk.blocknr), tm 441 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, nb); tm 448 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, nb); tm 455 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, nb); tm 469 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, nb); tm 572 drivers/md/persistent-data/dm-space-map-common.c r = dm_tm_new_block(ll->tm, &index_validator, &b); tm 578 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, b); tm 588 drivers/md/persistent-data/dm-space-map-common.c r = dm_tm_read_lock(ll->tm, ll->bitmap_root, tm 594 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, block); tm 609 drivers/md/persistent-data/dm-space-map-common.c r = dm_tm_shadow_block(ll->tm, ll->bitmap_root, &index_validator, &b, &inc); tm 616 drivers/md/persistent-data/dm-space-map-common.c dm_tm_unlock(ll->tm, b); tm 621 drivers/md/persistent-data/dm-space-map-common.c int sm_ll_new_metadata(struct ll_disk *ll, struct dm_transaction_manager *tm) tm 625 drivers/md/persistent-data/dm-space-map-common.c r = sm_ll_init(ll, tm); tm 650 drivers/md/persistent-data/dm-space-map-common.c int sm_ll_open_metadata(struct ll_disk *ll, struct dm_transaction_manager *tm, tm 667 drivers/md/persistent-data/dm-space-map-common.c r = sm_ll_init(ll, tm); tm 723 drivers/md/persistent-data/dm-space-map-common.c int sm_ll_new_disk(struct ll_disk *ll, struct dm_transaction_manager *tm) tm 727 drivers/md/persistent-data/dm-space-map-common.c r = sm_ll_init(ll, tm); tm 752 drivers/md/persistent-data/dm-space-map-common.c int sm_ll_open_disk(struct ll_disk *ll, struct dm_transaction_manager *tm, tm 763 drivers/md/persistent-data/dm-space-map-common.c r = sm_ll_init(ll, tm); tm 58 drivers/md/persistent-data/dm-space-map-common.h struct dm_transaction_manager *tm; tm 119 drivers/md/persistent-data/dm-space-map-common.h int sm_ll_new_metadata(struct ll_disk *ll, struct dm_transaction_manager *tm); tm 120 drivers/md/persistent-data/dm-space-map-common.h int sm_ll_open_metadata(struct ll_disk *ll, struct dm_transaction_manager *tm, tm 123 drivers/md/persistent-data/dm-space-map-common.h int sm_ll_new_disk(struct ll_disk *ll, struct dm_transaction_manager *tm); tm 124 drivers/md/persistent-data/dm-space-map-common.h int sm_ll_open_disk(struct ll_disk *ll, struct dm_transaction_manager *tm, tm 256 drivers/md/persistent-data/dm-space-map-disk.c struct dm_space_map *dm_sm_disk_create(struct dm_transaction_manager *tm, tm 270 drivers/md/persistent-data/dm-space-map-disk.c r = sm_ll_new_disk(&smd->ll, tm); tm 290 drivers/md/persistent-data/dm-space-map-disk.c struct dm_space_map *dm_sm_disk_open(struct dm_transaction_manager *tm, tm 304 drivers/md/persistent-data/dm-space-map-disk.c r = sm_ll_open_disk(&smd->ll, tm, root_le, len); tm 19 drivers/md/persistent-data/dm-space-map-disk.h struct dm_space_map *dm_sm_disk_create(struct dm_transaction_manager *tm, tm 22 drivers/md/persistent-data/dm-space-map-disk.h struct dm_space_map *dm_sm_disk_open(struct dm_transaction_manager *tm, tm 765 drivers/md/persistent-data/dm-space-map-metadata.c struct dm_transaction_manager *tm, tm 781 drivers/md/persistent-data/dm-space-map-metadata.c r = sm_ll_new_metadata(&smm->ll, tm); tm 811 drivers/md/persistent-data/dm-space-map-metadata.c struct dm_transaction_manager *tm, tm 817 drivers/md/persistent-data/dm-space-map-metadata.c r = sm_ll_open_metadata(&smm->ll, tm, root_le, len); tm 33 drivers/md/persistent-data/dm-space-map-metadata.h struct dm_transaction_manager *tm, tm 41 drivers/md/persistent-data/dm-space-map-metadata.h struct dm_transaction_manager *tm, tm 103 drivers/md/persistent-data/dm-transaction-manager.c static int is_shadow(struct dm_transaction_manager *tm, dm_block_t b) tm 109 drivers/md/persistent-data/dm-transaction-manager.c spin_lock(&tm->lock); tm 110 drivers/md/persistent-data/dm-transaction-manager.c hlist_for_each_entry(si, tm->buckets + bucket, hlist) tm 115 drivers/md/persistent-data/dm-transaction-manager.c spin_unlock(&tm->lock); tm 124 drivers/md/persistent-data/dm-transaction-manager.c static void insert_shadow(struct dm_transaction_manager *tm, dm_block_t b) tm 133 drivers/md/persistent-data/dm-transaction-manager.c spin_lock(&tm->lock); tm 134 drivers/md/persistent-data/dm-transaction-manager.c hlist_add_head(&si->hlist, tm->buckets + bucket); tm 135 drivers/md/persistent-data/dm-transaction-manager.c spin_unlock(&tm->lock); tm 139 drivers/md/persistent-data/dm-transaction-manager.c static void wipe_shadow_table(struct dm_transaction_manager *tm) tm 146 drivers/md/persistent-data/dm-transaction-manager.c spin_lock(&tm->lock); tm 148 drivers/md/persistent-data/dm-transaction-manager.c bucket = tm->buckets + i; tm 155 drivers/md/persistent-data/dm-transaction-manager.c spin_unlock(&tm->lock); tm 164 drivers/md/persistent-data/dm-transaction-manager.c struct dm_transaction_manager *tm; tm 166 drivers/md/persistent-data/dm-transaction-manager.c tm = kmalloc(sizeof(*tm), GFP_KERNEL); tm 167 drivers/md/persistent-data/dm-transaction-manager.c if (!tm) tm 170 drivers/md/persistent-data/dm-transaction-manager.c tm->is_clone = 0; tm 171 drivers/md/persistent-data/dm-transaction-manager.c tm->real = NULL; tm 172 drivers/md/persistent-data/dm-transaction-manager.c tm->bm = bm; tm 173 drivers/md/persistent-data/dm-transaction-manager.c tm->sm = sm; tm 175 drivers/md/persistent-data/dm-transaction-manager.c spin_lock_init(&tm->lock); tm 177 drivers/md/persistent-data/dm-transaction-manager.c INIT_HLIST_HEAD(tm->buckets + i); tm 179 drivers/md/persistent-data/dm-transaction-manager.c prefetch_init(&tm->prefetches); tm 181 drivers/md/persistent-data/dm-transaction-manager.c return tm; tm 186 drivers/md/persistent-data/dm-transaction-manager.c struct dm_transaction_manager *tm; tm 188 drivers/md/persistent-data/dm-transaction-manager.c tm = kmalloc(sizeof(*tm), GFP_KERNEL); tm 189 drivers/md/persistent-data/dm-transaction-manager.c if (tm) { tm 190 drivers/md/persistent-data/dm-transaction-manager.c tm->is_clone = 1; tm 191 drivers/md/persistent-data/dm-transaction-manager.c tm->real = real; tm 194 drivers/md/persistent-data/dm-transaction-manager.c return tm; tm 198 drivers/md/persistent-data/dm-transaction-manager.c void dm_tm_destroy(struct dm_transaction_manager *tm) tm 200 drivers/md/persistent-data/dm-transaction-manager.c if (!tm->is_clone) tm 201 drivers/md/persistent-data/dm-transaction-manager.c wipe_shadow_table(tm); tm 203 drivers/md/persistent-data/dm-transaction-manager.c kfree(tm); tm 207 drivers/md/persistent-data/dm-transaction-manager.c int dm_tm_pre_commit(struct dm_transaction_manager *tm) tm 211 drivers/md/persistent-data/dm-transaction-manager.c if (tm->is_clone) tm 214 drivers/md/persistent-data/dm-transaction-manager.c r = dm_sm_commit(tm->sm); tm 218 drivers/md/persistent-data/dm-transaction-manager.c return dm_bm_flush(tm->bm); tm 222 drivers/md/persistent-data/dm-transaction-manager.c int dm_tm_commit(struct dm_transaction_manager *tm, struct dm_block *root) tm 224 drivers/md/persistent-data/dm-transaction-manager.c if (tm->is_clone) tm 227 drivers/md/persistent-data/dm-transaction-manager.c wipe_shadow_table(tm); tm 230 drivers/md/persistent-data/dm-transaction-manager.c return dm_bm_flush(tm->bm); tm 234 drivers/md/persistent-data/dm-transaction-manager.c int dm_tm_new_block(struct dm_transaction_manager *tm, tm 241 drivers/md/persistent-data/dm-transaction-manager.c if (tm->is_clone) tm 244 drivers/md/persistent-data/dm-transaction-manager.c r = dm_sm_new_block(tm->sm, &new_block); tm 248 drivers/md/persistent-data/dm-transaction-manager.c r = dm_bm_write_lock_zero(tm->bm, new_block, v, result); tm 250 drivers/md/persistent-data/dm-transaction-manager.c dm_sm_dec_block(tm->sm, new_block); tm 258 drivers/md/persistent-data/dm-transaction-manager.c insert_shadow(tm, new_block); tm 263 drivers/md/persistent-data/dm-transaction-manager.c static int __shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, tm 271 drivers/md/persistent-data/dm-transaction-manager.c r = dm_sm_new_block(tm->sm, &new); tm 275 drivers/md/persistent-data/dm-transaction-manager.c r = dm_sm_dec_block(tm->sm, orig); tm 279 drivers/md/persistent-data/dm-transaction-manager.c r = dm_bm_read_lock(tm->bm, orig, v, &orig_block); tm 290 drivers/md/persistent-data/dm-transaction-manager.c r = dm_bm_write_lock_zero(tm->bm, new, v, result); tm 297 drivers/md/persistent-data/dm-transaction-manager.c dm_bm_block_size(tm->bm)); tm 303 drivers/md/persistent-data/dm-transaction-manager.c int dm_tm_shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, tm 309 drivers/md/persistent-data/dm-transaction-manager.c if (tm->is_clone) tm 312 drivers/md/persistent-data/dm-transaction-manager.c r = dm_sm_count_is_more_than_one(tm->sm, orig, inc_children); tm 316 drivers/md/persistent-data/dm-transaction-manager.c if (is_shadow(tm, orig) && !*inc_children) tm 317 drivers/md/persistent-data/dm-transaction-manager.c return dm_bm_write_lock(tm->bm, orig, v, result); tm 319 drivers/md/persistent-data/dm-transaction-manager.c r = __shadow_block(tm, orig, v, result); tm 322 drivers/md/persistent-data/dm-transaction-manager.c insert_shadow(tm, dm_block_location(*result)); tm 328 drivers/md/persistent-data/dm-transaction-manager.c int dm_tm_read_lock(struct dm_transaction_manager *tm, dm_block_t b, tm 332 drivers/md/persistent-data/dm-transaction-manager.c if (tm->is_clone) { tm 333 drivers/md/persistent-data/dm-transaction-manager.c int r = dm_bm_read_try_lock(tm->real->bm, b, v, blk); tm 336 drivers/md/persistent-data/dm-transaction-manager.c prefetch_add(&tm->real->prefetches, b); tm 341 drivers/md/persistent-data/dm-transaction-manager.c return dm_bm_read_lock(tm->bm, b, v, blk); tm 345 drivers/md/persistent-data/dm-transaction-manager.c void dm_tm_unlock(struct dm_transaction_manager *tm, struct dm_block *b) tm 351 drivers/md/persistent-data/dm-transaction-manager.c void dm_tm_inc(struct dm_transaction_manager *tm, dm_block_t b) tm 356 drivers/md/persistent-data/dm-transaction-manager.c BUG_ON(tm->is_clone); tm 358 drivers/md/persistent-data/dm-transaction-manager.c dm_sm_inc_block(tm->sm, b); tm 362 drivers/md/persistent-data/dm-transaction-manager.c void dm_tm_dec(struct dm_transaction_manager *tm, dm_block_t b) tm 367 drivers/md/persistent-data/dm-transaction-manager.c BUG_ON(tm->is_clone); tm 369 drivers/md/persistent-data/dm-transaction-manager.c dm_sm_dec_block(tm->sm, b); tm 373 drivers/md/persistent-data/dm-transaction-manager.c int dm_tm_ref(struct dm_transaction_manager *tm, dm_block_t b, tm 376 drivers/md/persistent-data/dm-transaction-manager.c if (tm->is_clone) tm 379 drivers/md/persistent-data/dm-transaction-manager.c return dm_sm_get_count(tm->sm, b, result); tm 382 drivers/md/persistent-data/dm-transaction-manager.c struct dm_block_manager *dm_tm_get_bm(struct dm_transaction_manager *tm) tm 384 drivers/md/persistent-data/dm-transaction-manager.c return tm->bm; tm 387 drivers/md/persistent-data/dm-transaction-manager.c void dm_tm_issue_prefetches(struct dm_transaction_manager *tm) tm 389 drivers/md/persistent-data/dm-transaction-manager.c prefetch_issue(&tm->prefetches, tm->bm); tm 397 drivers/md/persistent-data/dm-transaction-manager.c struct dm_transaction_manager **tm, tm 408 drivers/md/persistent-data/dm-transaction-manager.c *tm = dm_tm_create(bm, *sm); tm 409 drivers/md/persistent-data/dm-transaction-manager.c if (IS_ERR(*tm)) { tm 411 drivers/md/persistent-data/dm-transaction-manager.c return PTR_ERR(*tm); tm 415 drivers/md/persistent-data/dm-transaction-manager.c r = dm_sm_metadata_create(*sm, *tm, dm_bm_nr_blocks(bm), tm 423 drivers/md/persistent-data/dm-transaction-manager.c r = dm_sm_metadata_open(*sm, *tm, sm_root, sm_len); tm 433 drivers/md/persistent-data/dm-transaction-manager.c dm_tm_destroy(*tm); tm 439 drivers/md/persistent-data/dm-transaction-manager.c struct dm_transaction_manager **tm, tm 442 drivers/md/persistent-data/dm-transaction-manager.c return dm_tm_create_internal(bm, sb_location, tm, sm, 1, NULL, 0); tm 448 drivers/md/persistent-data/dm-transaction-manager.c struct dm_transaction_manager **tm, tm 451 drivers/md/persistent-data/dm-transaction-manager.c return dm_tm_create_internal(bm, sb_location, tm, sm, 0, sm_root, root_len); tm 24 drivers/md/persistent-data/dm-transaction-manager.h void dm_tm_destroy(struct dm_transaction_manager *tm); tm 50 drivers/md/persistent-data/dm-transaction-manager.h int dm_tm_pre_commit(struct dm_transaction_manager *tm); tm 51 drivers/md/persistent-data/dm-transaction-manager.h int dm_tm_commit(struct dm_transaction_manager *tm, struct dm_block *superblock); tm 65 drivers/md/persistent-data/dm-transaction-manager.h int dm_tm_new_block(struct dm_transaction_manager *tm, tm 85 drivers/md/persistent-data/dm-transaction-manager.h int dm_tm_shadow_block(struct dm_transaction_manager *tm, dm_block_t orig, tm 93 drivers/md/persistent-data/dm-transaction-manager.h int dm_tm_read_lock(struct dm_transaction_manager *tm, dm_block_t b, tm 97 drivers/md/persistent-data/dm-transaction-manager.h void dm_tm_unlock(struct dm_transaction_manager *tm, struct dm_block *b); tm 102 drivers/md/persistent-data/dm-transaction-manager.h void dm_tm_inc(struct dm_transaction_manager *tm, dm_block_t b); tm 104 drivers/md/persistent-data/dm-transaction-manager.h void dm_tm_dec(struct dm_transaction_manager *tm, dm_block_t b); tm 106 drivers/md/persistent-data/dm-transaction-manager.h int dm_tm_ref(struct dm_transaction_manager *tm, dm_block_t b, tm 109 drivers/md/persistent-data/dm-transaction-manager.h struct dm_block_manager *dm_tm_get_bm(struct dm_transaction_manager *tm); tm 116 drivers/md/persistent-data/dm-transaction-manager.h void dm_tm_issue_prefetches(struct dm_transaction_manager *tm); tm 129 drivers/md/persistent-data/dm-transaction-manager.h struct dm_transaction_manager **tm, tm 134 drivers/md/persistent-data/dm-transaction-manager.h struct dm_transaction_manager **tm, tm 443 drivers/media/dvb-frontends/stv0288.c char tm; tm 471 drivers/media/dvb-frontends/stv0288.c for (tm = -9; tm < 7;) { tm 482 drivers/media/dvb-frontends/stv0288.c tm++; tm 484 drivers/media/dvb-frontends/stv0288.c tm++; tm 488 drivers/media/dvb-frontends/stv0288.c tda[1] = (unsigned char)tm; tm 47 drivers/media/platform/vivid/vivid-rds-gen.c struct tm tm; tm 94 drivers/media/platform/vivid/vivid-rds-gen.c time64_to_tm(ktime_get_real_seconds(), 0, &tm); tm 95 drivers/media/platform/vivid/vivid-rds-gen.c l = tm.tm_mon <= 1; tm 96 drivers/media/platform/vivid/vivid-rds-gen.c date = 14956 + tm.tm_mday + ((tm.tm_year - l) * 1461) / 4 + tm 97 drivers/media/platform/vivid/vivid-rds-gen.c ((tm.tm_mon + 2 + l * 12) * 306001) / 10000; tm 98 drivers/media/platform/vivid/vivid-rds-gen.c time = (tm.tm_hour << 12) | tm 99 drivers/media/platform/vivid/vivid-rds-gen.c (tm.tm_min << 6) | tm 178 drivers/media/platform/vivid/vivid-vbi-gen.c struct tm tm; tm 181 drivers/media/platform/vivid/vivid-vbi-gen.c time64_to_tm(ktime_get_real_seconds(), 0, &tm); tm 184 drivers/media/platform/vivid/vivid-vbi-gen.c packet[2] = calc_parity(0x40 | tm.tm_min); tm 185 drivers/media/platform/vivid/vivid-vbi-gen.c packet[3] = calc_parity(0x40 | tm.tm_hour); tm 186 drivers/media/platform/vivid/vivid-vbi-gen.c packet[4] = calc_parity(0x40 | tm.tm_mday); tm 187 drivers/media/platform/vivid/vivid-vbi-gen.c if (tm.tm_mday == 1 && tm.tm_mon == 2 && tm 188 drivers/media/platform/vivid/vivid-vbi-gen.c sys_tz.tz_minuteswest > tm.tm_min + tm.tm_hour * 60) tm 189 drivers/media/platform/vivid/vivid-vbi-gen.c packet[4] = calc_parity(0x60 | tm.tm_mday); tm 190 drivers/media/platform/vivid/vivid-vbi-gen.c packet[5] = calc_parity(0x40 | (1 + tm.tm_mon)); tm 191 drivers/media/platform/vivid/vivid-vbi-gen.c packet[6] = calc_parity(0x40 | (1 + tm.tm_wday)); tm 192 drivers/media/platform/vivid/vivid-vbi-gen.c packet[7] = calc_parity(0x40 | ((tm.tm_year - 90) & 0x3f)); tm 202 drivers/media/tuners/tda18271-fe.c int tm; tm 227 drivers/media/tuners/tda18271-fe.c tm = tda18271_lookup_thermometer(fe); tm 237 drivers/media/tuners/tda18271-fe.c return tm; tm 335 drivers/media/usb/pulse8-cec/pulse8-cec.c struct tm tm; tm 356 drivers/media/usb/pulse8-cec/pulse8-cec.c time64_to_tm(date, 0, &tm); tm 358 drivers/media/usb/pulse8-cec/pulse8-cec.c tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm 359 drivers/media/usb/pulse8-cec/pulse8-cec.c tm.tm_hour, tm.tm_min, tm.tm_sec); tm 1406 drivers/mmc/host/sdhci-pci-core.c int tm, ps; tm 1420 drivers/mmc/host/sdhci-pci-core.c tm = 10; /* Wait max 1 ms */ tm 1426 drivers/mmc/host/sdhci-pci-core.c } while (--tm); tm 1427 drivers/mmc/host/sdhci-pci-core.c if (!tm) { tm 7305 drivers/net/ethernet/broadcom/bnxt/bnxt.c struct tm tm; tm 7312 drivers/net/ethernet/broadcom/bnxt/bnxt.c time64_to_tm(now, 0, &tm); tm 7314 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.year = cpu_to_le16(1900 + tm.tm_year); tm 7315 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.month = 1 + tm.tm_mon; tm 7316 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.day = tm.tm_mday; tm 7317 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.hour = tm.tm_hour; tm 7318 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.minute = tm.tm_min; tm 7319 drivers/net/ethernet/broadcom/bnxt/bnxt.c req.second = tm.tm_sec; tm 3190 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c struct tm tm; tm 3192 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c time64_to_tm(start, 0, &tm); tm 3201 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->year = cpu_to_le16(tm.tm_year + 1900); tm 3202 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->month = cpu_to_le16(tm.tm_mon + 1); tm 3203 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->day = cpu_to_le16(tm.tm_mday); tm 3204 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->hour = cpu_to_le16(tm.tm_hour); tm 3205 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->minute = cpu_to_le16(tm.tm_min); tm 3206 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->second = cpu_to_le16(tm.tm_sec); tm 3216 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c time64_to_tm(end, 0, &tm); tm 3217 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->end_year = cpu_to_le16(tm.tm_year + 1900); tm 3218 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->end_month = cpu_to_le16(tm.tm_mon + 1); tm 3219 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->end_day = cpu_to_le16(tm.tm_mday); tm 3220 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->end_hour = cpu_to_le16(tm.tm_hour); tm 3221 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->end_minute = cpu_to_le16(tm.tm_min); tm 3222 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c record->end_second = cpu_to_le16(tm.tm_sec); tm 252 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c c.u.ts.tm = cpu_to_be64(delta); tm 291 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c c.u.ts.tm = cpu_to_be64(delta); tm 353 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ptp.c c.u.ts.tm = cpu_to_be64(ns); tm 3313 drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h __be64 tm; tm 38 drivers/net/fddi/skfp/smttimer.c struct smt_timer *tm ; tm 47 drivers/net/fddi/skfp/smttimer.c for (prev = &smc->t.st_queue ; (tm = *prev) ; prev = &tm->tm_next ) { tm 48 drivers/net/fddi/skfp/smttimer.c if (tm == timer) { tm 49 drivers/net/fddi/skfp/smttimer.c *prev = tm->tm_next ; tm 50 drivers/net/fddi/skfp/smttimer.c if (tm->tm_next) { tm 51 drivers/net/fddi/skfp/smttimer.c tm->tm_next->tm_delta += tm->tm_delta ; tm 62 drivers/net/fddi/skfp/smttimer.c struct smt_timer *tm ; tm 88 drivers/net/fddi/skfp/smttimer.c for (prev = &smc->t.st_queue ; (tm = *prev) ; prev = &tm->tm_next ) { tm 89 drivers/net/fddi/skfp/smttimer.c if (delta + tm->tm_delta > time) { tm 92 drivers/net/fddi/skfp/smttimer.c delta += tm->tm_delta ; tm 96 drivers/net/fddi/skfp/smttimer.c timer->tm_next = tm ; tm 98 drivers/net/fddi/skfp/smttimer.c if (tm) tm 99 drivers/net/fddi/skfp/smttimer.c tm->tm_delta -= timer->tm_delta ; tm 119 drivers/net/fddi/skfp/smttimer.c struct smt_timer *tm ; tm 126 drivers/net/fddi/skfp/smttimer.c tm = smc->t.st_queue ; tm 127 drivers/net/fddi/skfp/smttimer.c while (tm && !done) { tm 128 drivers/net/fddi/skfp/smttimer.c if (delta >= tm->tm_delta) { tm 129 drivers/net/fddi/skfp/smttimer.c tm->tm_active = FALSE ; tm 130 drivers/net/fddi/skfp/smttimer.c delta -= tm->tm_delta ; tm 131 drivers/net/fddi/skfp/smttimer.c last = &tm->tm_next ; tm 132 drivers/net/fddi/skfp/smttimer.c tm = tm->tm_next ; tm 135 drivers/net/fddi/skfp/smttimer.c tm->tm_delta -= delta ; tm 142 drivers/net/fddi/skfp/smttimer.c smc->t.st_queue = tm ; tm 144 drivers/net/fddi/skfp/smttimer.c for ( tm = next ; tm ; tm = next) { tm 145 drivers/net/fddi/skfp/smttimer.c next = tm->tm_next ; tm 146 drivers/net/fddi/skfp/smttimer.c timer_event(smc,tm->tm_token) ; tm 770 drivers/net/wireless/ath/ath6kl/core.h } tm; tm 522 drivers/pinctrl/qcom/pinctrl-ipq4019.c FUNCTION(tm), tm 626 drivers/pinctrl/qcom/pinctrl-ipq4019.c PINGROUP(52, qpic, mdc, pcie, i2s_tx, NA, NA, NA, tm, wifi0, wifi1, NA, tm 628 drivers/pinctrl/qcom/pinctrl-ipq4019.c PINGROUP(53, qpic, mdio, i2s_tx, prng_rosc, NA, tm, wifi0, wifi1, NA, tm 630 drivers/pinctrl/qcom/pinctrl-ipq4019.c PINGROUP(54, qpic, blsp_spi0, i2s_td, NA, pmu, NA, NA, NA, tm, NA, NA, tm 632 drivers/pinctrl/qcom/pinctrl-ipq4019.c PINGROUP(55, qpic, blsp_spi0, i2s_td, NA, pmu, NA, NA, NA, tm, NA, NA, tm 634 drivers/pinctrl/qcom/pinctrl-ipq4019.c PINGROUP(56, qpic, blsp_spi0, i2s_td, NA, NA, tm, wifi0, wifi1, NA, NA, tm 636 drivers/pinctrl/qcom/pinctrl-ipq4019.c PINGROUP(57, qpic, blsp_spi0, i2s_tx, NA, NA, tm, wifi0, wifi1, NA, NA, tm 638 drivers/pinctrl/qcom/pinctrl-ipq4019.c PINGROUP(58, qpic, led2, blsp_i2c0, smart3, smart1, i2s_rx, NA, NA, tm, tm 641 drivers/pinctrl/qcom/pinctrl-ipq4019.c NA, NA, tm, NA, NA, NA), tm 643 drivers/pinctrl/qcom/pinctrl-ipq4019.c NA, NA, NA, NA, NA, tm, NA), tm 645 drivers/pinctrl/qcom/pinctrl-ipq4019.c NA, NA, NA, NA, NA, tm, NA), tm 647 drivers/pinctrl/qcom/pinctrl-ipq4019.c tm, NA, NA, NA), tm 649 drivers/pinctrl/qcom/pinctrl-ipq4019.c i2s_spdif_in, NA, NA, NA, NA, tm, NA), tm 50 drivers/rtc/class.c struct rtc_time tm; tm 61 drivers/rtc/class.c err = rtc_read_time(rtc, &tm); tm 68 drivers/rtc/class.c old_rtc.tv_sec = rtc_tm_to_time64(&tm); tm 95 drivers/rtc/class.c struct rtc_time tm; tm 109 drivers/rtc/class.c err = rtc_read_time(rtc, &tm); tm 115 drivers/rtc/class.c new_rtc.tv_sec = rtc_tm_to_time64(&tm); tm 48 drivers/rtc/dev.c struct rtc_time tm; tm 52 drivers/rtc/dev.c err = rtc_read_time(rtc, &tm); tm 57 drivers/rtc/dev.c } else if (rtc->oldsecs != tm.tm_sec) { tm 58 drivers/rtc/dev.c num = (tm.tm_sec + 60 - rtc->oldsecs) % 60; tm 59 drivers/rtc/dev.c rtc->oldsecs = tm.tm_sec; tm 109 drivers/rtc/dev.c struct rtc_time tm; tm 112 drivers/rtc/dev.c err = rtc_read_time(rtc, &tm); tm 119 drivers/rtc/dev.c rtc->oldsecs = tm.tm_sec; tm 208 drivers/rtc/dev.c struct rtc_time tm; tm 261 drivers/rtc/dev.c if (copy_to_user(uarg, &alarm.time, sizeof(tm))) tm 268 drivers/rtc/dev.c if (copy_from_user(&alarm.time, uarg, sizeof(tm))) tm 293 drivers/rtc/dev.c err = rtc_read_time(rtc, &tm); tm 296 drivers/rtc/dev.c now = rtc_tm_to_time64(&tm); tm 298 drivers/rtc/dev.c alarm.time.tm_mday = tm.tm_mday; tm 299 drivers/rtc/dev.c alarm.time.tm_mon = tm.tm_mon; tm 300 drivers/rtc/dev.c alarm.time.tm_year = tm.tm_year; tm 308 drivers/rtc/dev.c rtc_time64_to_tm(now + 24 * 60 * 60, &tm); tm 309 drivers/rtc/dev.c alarm.time.tm_mday = tm.tm_mday; tm 310 drivers/rtc/dev.c alarm.time.tm_mon = tm.tm_mon; tm 311 drivers/rtc/dev.c alarm.time.tm_year = tm.tm_year; tm 320 drivers/rtc/dev.c err = rtc_read_time(rtc, &tm); tm 324 drivers/rtc/dev.c if (copy_to_user(uarg, &tm, sizeof(tm))) tm 331 drivers/rtc/dev.c if (copy_from_user(&tm, uarg, sizeof(tm))) tm 334 drivers/rtc/dev.c return rtc_set_time(rtc, &tm); tm 27 drivers/rtc/hctosys.c struct rtc_time tm; tm 39 drivers/rtc/hctosys.c err = rtc_read_time(rtc, &tm); tm 46 drivers/rtc/hctosys.c tv64.tv_sec = rtc_tm_to_time64(&tm); tm 58 drivers/rtc/hctosys.c &tm, (long long)tv64.tv_sec); tm 23 drivers/rtc/interface.c static void rtc_add_offset(struct rtc_device *rtc, struct rtc_time *tm) tm 30 drivers/rtc/interface.c secs = rtc_tm_to_time64(tm); tm 43 drivers/rtc/interface.c rtc_time64_to_tm(secs + rtc->offset_secs, tm); tm 46 drivers/rtc/interface.c static void rtc_subtract_offset(struct rtc_device *rtc, struct rtc_time *tm) tm 53 drivers/rtc/interface.c secs = rtc_tm_to_time64(tm); tm 64 drivers/rtc/interface.c rtc_time64_to_tm(secs - rtc->offset_secs, tm); tm 67 drivers/rtc/interface.c static int rtc_valid_range(struct rtc_device *rtc, struct rtc_time *tm) tm 70 drivers/rtc/interface.c time64_t time = rtc_tm_to_time64(tm); tm 84 drivers/rtc/interface.c static int __rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm) tm 93 drivers/rtc/interface.c memset(tm, 0, sizeof(struct rtc_time)); tm 94 drivers/rtc/interface.c err = rtc->ops->read_time(rtc->dev.parent, tm); tm 101 drivers/rtc/interface.c rtc_add_offset(rtc, tm); tm 103 drivers/rtc/interface.c err = rtc_valid_tm(tm); tm 110 drivers/rtc/interface.c int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm) tm 118 drivers/rtc/interface.c err = __rtc_read_time(rtc, tm); tm 121 drivers/rtc/interface.c trace_rtc_read_time(rtc_tm_to_time64(tm), err); tm 126 drivers/rtc/interface.c int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm) tm 130 drivers/rtc/interface.c err = rtc_valid_tm(tm); tm 134 drivers/rtc/interface.c err = rtc_valid_range(rtc, tm); tm 138 drivers/rtc/interface.c rtc_subtract_offset(rtc, tm); tm 158 drivers/rtc/interface.c err = rtc->ops->set_time(rtc->dev.parent, tm); tm 173 drivers/rtc/interface.c trace_rtc_set_time(rtc_tm_to_time64(tm), err); tm 411 drivers/rtc/interface.c struct rtc_time tm; tm 422 drivers/rtc/interface.c err = __rtc_read_time(rtc, &tm); tm 425 drivers/rtc/interface.c now = rtc_tm_to_time64(&tm); tm 570 drivers/rtc/interface.c struct rtc_time tm; tm 573 drivers/rtc/interface.c __rtc_read_time(rtc, &tm); tm 575 drivers/rtc/interface.c now = rtc_tm_to_ktime(tm); tm 794 drivers/rtc/interface.c struct rtc_time tm; tm 798 drivers/rtc/interface.c __rtc_read_time(rtc, &tm); tm 799 drivers/rtc/interface.c now = rtc_tm_to_ktime(tm); tm 892 drivers/rtc/interface.c struct rtc_time tm; tm 899 drivers/rtc/interface.c __rtc_read_time(rtc, &tm); tm 900 drivers/rtc/interface.c now = rtc_tm_to_ktime(tm); tm 49 drivers/rtc/lib.c void rtc_time64_to_tm(time64_t time, struct rtc_time *tm) tm 58 drivers/rtc/lib.c tm->tm_wday = (days + 4) % 7; tm 68 drivers/rtc/lib.c tm->tm_year = year - 1900; tm 69 drivers/rtc/lib.c tm->tm_yday = days + 1; tm 79 drivers/rtc/lib.c tm->tm_mon = month; tm 80 drivers/rtc/lib.c tm->tm_mday = days + 1; tm 82 drivers/rtc/lib.c tm->tm_hour = secs / 3600; tm 83 drivers/rtc/lib.c secs -= tm->tm_hour * 3600; tm 84 drivers/rtc/lib.c tm->tm_min = secs / 60; tm 85 drivers/rtc/lib.c tm->tm_sec = secs - tm->tm_min * 60; tm 87 drivers/rtc/lib.c tm->tm_isdst = 0; tm 94 drivers/rtc/lib.c int rtc_valid_tm(struct rtc_time *tm) tm 96 drivers/rtc/lib.c if (tm->tm_year < 70 || tm 97 drivers/rtc/lib.c tm->tm_year > (INT_MAX - 1900) || tm 98 drivers/rtc/lib.c ((unsigned int)tm->tm_mon) >= 12 || tm 99 drivers/rtc/lib.c tm->tm_mday < 1 || tm 100 drivers/rtc/lib.c tm->tm_mday > rtc_month_days(tm->tm_mon, tm 101 drivers/rtc/lib.c ((unsigned int)tm->tm_year + 1900)) || tm 102 drivers/rtc/lib.c ((unsigned int)tm->tm_hour) >= 24 || tm 103 drivers/rtc/lib.c ((unsigned int)tm->tm_min) >= 60 || tm 104 drivers/rtc/lib.c ((unsigned int)tm->tm_sec) >= 60) tm 115 drivers/rtc/lib.c time64_t rtc_tm_to_time64(struct rtc_time *tm) tm 117 drivers/rtc/lib.c return mktime64(((unsigned int)tm->tm_year + 1900), tm->tm_mon + 1, tm 118 drivers/rtc/lib.c tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); tm 125 drivers/rtc/lib.c ktime_t rtc_tm_to_ktime(struct rtc_time tm) tm 127 drivers/rtc/lib.c return ktime_set(rtc_tm_to_time64(&tm), 0); tm 45 drivers/rtc/proc.c struct rtc_time tm; tm 47 drivers/rtc/proc.c err = rtc_read_time(rtc, &tm); tm 52 drivers/rtc/proc.c &tm, &tm); tm 99 drivers/rtc/rtc-88pm80x.c static int pm80x_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 116 drivers/rtc/rtc-88pm80x.c rtc_time64_to_tm(ticks, tm); tm 120 drivers/rtc/rtc-88pm80x.c static int pm80x_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 126 drivers/rtc/rtc-88pm80x.c ticks = rtc_tm_to_time64(tm); tm 106 drivers/rtc/rtc-88pm860x.c static int pm860x_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 126 drivers/rtc/rtc-88pm860x.c rtc_time_to_tm(ticks, tm); tm 131 drivers/rtc/rtc-88pm860x.c static int pm860x_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 137 drivers/rtc/rtc-88pm860x.c if (tm->tm_year > 206) { tm 140 drivers/rtc/rtc-88pm860x.c 1900 + tm->tm_year); tm 143 drivers/rtc/rtc-88pm860x.c rtc_tm_to_time(tm, &ticks); tm 320 drivers/rtc/rtc-88pm860x.c struct rtc_time tm; tm 358 drivers/rtc/rtc-88pm860x.c ret = pm860x_rtc_read_time(&pdev->dev, &tm); tm 363 drivers/rtc/rtc-88pm860x.c if ((tm.tm_year < 70) || (tm.tm_year > 138)) { tm 364 drivers/rtc/rtc-88pm860x.c tm.tm_year = 70; tm 365 drivers/rtc/rtc-88pm860x.c tm.tm_mon = 0; tm 366 drivers/rtc/rtc-88pm860x.c tm.tm_mday = 1; tm 367 drivers/rtc/rtc-88pm860x.c tm.tm_hour = 0; tm 368 drivers/rtc/rtc-88pm860x.c tm.tm_min = 0; tm 369 drivers/rtc/rtc-88pm860x.c tm.tm_sec = 0; tm 370 drivers/rtc/rtc-88pm860x.c ret = pm860x_rtc_set_time(&pdev->dev, &tm); tm 376 drivers/rtc/rtc-88pm860x.c rtc_tm_to_time(&tm, &ticks); tm 205 drivers/rtc/rtc-ab-b5ze-s3.c static int _abb5zes3_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 229 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_sec = bcd2bin(regs[ABB5ZES3_REG_RTC_SC] & 0x7F); tm 230 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_min = bcd2bin(regs[ABB5ZES3_REG_RTC_MN]); tm 233 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_hour = bcd2bin(regs[ABB5ZES3_REG_RTC_HR] & 0x1f); tm 235 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_hour += 12; tm 237 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_hour = bcd2bin(regs[ABB5ZES3_REG_RTC_HR]); tm 240 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_mday = bcd2bin(regs[ABB5ZES3_REG_RTC_DT]); tm 241 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_wday = bcd2bin(regs[ABB5ZES3_REG_RTC_DW]); tm 242 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_mon = bcd2bin(regs[ABB5ZES3_REG_RTC_MO]) - 1; /* starts at 1 */ tm 243 drivers/rtc/rtc-ab-b5ze-s3.c tm->tm_year = bcd2bin(regs[ABB5ZES3_REG_RTC_YR]) + 100; tm 248 drivers/rtc/rtc-ab-b5ze-s3.c static int abb5zes3_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 254 drivers/rtc/rtc-ab-b5ze-s3.c regs[ABB5ZES3_REG_RTC_SC] = bin2bcd(tm->tm_sec); /* MSB=0 clears OSC */ tm 255 drivers/rtc/rtc-ab-b5ze-s3.c regs[ABB5ZES3_REG_RTC_MN] = bin2bcd(tm->tm_min); tm 256 drivers/rtc/rtc-ab-b5ze-s3.c regs[ABB5ZES3_REG_RTC_HR] = bin2bcd(tm->tm_hour); /* 24-hour format */ tm 257 drivers/rtc/rtc-ab-b5ze-s3.c regs[ABB5ZES3_REG_RTC_DT] = bin2bcd(tm->tm_mday); tm 258 drivers/rtc/rtc-ab-b5ze-s3.c regs[ABB5ZES3_REG_RTC_DW] = bin2bcd(tm->tm_wday); tm 259 drivers/rtc/rtc-ab-b5ze-s3.c regs[ABB5ZES3_REG_RTC_MO] = bin2bcd(tm->tm_mon + 1); tm 260 drivers/rtc/rtc-ab-b5ze-s3.c regs[ABB5ZES3_REG_RTC_YR] = bin2bcd(tm->tm_year - 100); tm 124 drivers/rtc/rtc-ab-eoz9.c static int abeoz9_rtc_get_time(struct device *dev, struct rtc_time *tm) tm 142 drivers/rtc/rtc-ab-eoz9.c tm->tm_sec = bcd2bin(regs[ABEOZ9_REG_SEC - ABEOZ9_REG_SEC] & 0x7F); tm 143 drivers/rtc/rtc-ab-eoz9.c tm->tm_min = bcd2bin(regs[ABEOZ9_REG_MIN - ABEOZ9_REG_SEC] & 0x7F); tm 146 drivers/rtc/rtc-ab-eoz9.c tm->tm_hour = tm 149 drivers/rtc/rtc-ab-eoz9.c tm->tm_hour += 12; tm 151 drivers/rtc/rtc-ab-eoz9.c tm->tm_hour = bcd2bin(regs[ABEOZ9_REG_HOURS - ABEOZ9_REG_SEC]); tm 154 drivers/rtc/rtc-ab-eoz9.c tm->tm_mday = bcd2bin(regs[ABEOZ9_REG_DAYS - ABEOZ9_REG_SEC]); tm 155 drivers/rtc/rtc-ab-eoz9.c tm->tm_wday = bcd2bin(regs[ABEOZ9_REG_WEEKDAYS - ABEOZ9_REG_SEC]); tm 156 drivers/rtc/rtc-ab-eoz9.c tm->tm_mon = bcd2bin(regs[ABEOZ9_REG_MONTHS - ABEOZ9_REG_SEC]) - 1; tm 157 drivers/rtc/rtc-ab-eoz9.c tm->tm_year = bcd2bin(regs[ABEOZ9_REG_YEARS - ABEOZ9_REG_SEC]) + 100; tm 162 drivers/rtc/rtc-ab-eoz9.c static int abeoz9_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 169 drivers/rtc/rtc-ab-eoz9.c regs[ABEOZ9_REG_SEC - ABEOZ9_REG_SEC] = bin2bcd(tm->tm_sec); tm 170 drivers/rtc/rtc-ab-eoz9.c regs[ABEOZ9_REG_MIN - ABEOZ9_REG_SEC] = bin2bcd(tm->tm_min); tm 171 drivers/rtc/rtc-ab-eoz9.c regs[ABEOZ9_REG_HOURS - ABEOZ9_REG_SEC] = bin2bcd(tm->tm_hour); tm 172 drivers/rtc/rtc-ab-eoz9.c regs[ABEOZ9_REG_DAYS - ABEOZ9_REG_SEC] = bin2bcd(tm->tm_mday); tm 173 drivers/rtc/rtc-ab-eoz9.c regs[ABEOZ9_REG_WEEKDAYS - ABEOZ9_REG_SEC] = bin2bcd(tm->tm_wday); tm 174 drivers/rtc/rtc-ab-eoz9.c regs[ABEOZ9_REG_MONTHS - ABEOZ9_REG_SEC] = bin2bcd(tm->tm_mon + 1); tm 175 drivers/rtc/rtc-ab-eoz9.c regs[ABEOZ9_REG_YEARS - ABEOZ9_REG_SEC] = bin2bcd(tm->tm_year - 100); tm 46 drivers/rtc/rtc-ab3100.c static int ab3100_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 51 drivers/rtc/rtc-ab3100.c u64 hw_counter = rtc_tm_to_time64(tm) * AB3100_RTC_CLOCK_RATE * 2; tm 76 drivers/rtc/rtc-ab3100.c static int ab3100_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 107 drivers/rtc/rtc-ab3100.c rtc_time64_to_tm(time, tm); tm 61 drivers/rtc/rtc-ab8500.c static int ab8500_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 103 drivers/rtc/rtc-ab8500.c rtc_time_to_tm(secs, tm); tm 107 drivers/rtc/rtc-ab8500.c static int ab8500_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 113 drivers/rtc/rtc-ab8500.c rtc_tm_to_time(tm, &secs); tm 160 drivers/rtc/rtc-abx80x.c static int abx80x_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 189 drivers/rtc/rtc-abx80x.c tm->tm_sec = bcd2bin(buf[ABX8XX_REG_SC] & 0x7F); tm 190 drivers/rtc/rtc-abx80x.c tm->tm_min = bcd2bin(buf[ABX8XX_REG_MN] & 0x7F); tm 191 drivers/rtc/rtc-abx80x.c tm->tm_hour = bcd2bin(buf[ABX8XX_REG_HR] & 0x3F); tm 192 drivers/rtc/rtc-abx80x.c tm->tm_wday = buf[ABX8XX_REG_WD] & 0x7; tm 193 drivers/rtc/rtc-abx80x.c tm->tm_mday = bcd2bin(buf[ABX8XX_REG_DA] & 0x3F); tm 194 drivers/rtc/rtc-abx80x.c tm->tm_mon = bcd2bin(buf[ABX8XX_REG_MO] & 0x1F) - 1; tm 195 drivers/rtc/rtc-abx80x.c tm->tm_year = bcd2bin(buf[ABX8XX_REG_YR]) + 100; tm 200 drivers/rtc/rtc-abx80x.c static int abx80x_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 206 drivers/rtc/rtc-abx80x.c if (tm->tm_year < 100) tm 210 drivers/rtc/rtc-abx80x.c buf[ABX8XX_REG_SC] = bin2bcd(tm->tm_sec); tm 211 drivers/rtc/rtc-abx80x.c buf[ABX8XX_REG_MN] = bin2bcd(tm->tm_min); tm 212 drivers/rtc/rtc-abx80x.c buf[ABX8XX_REG_HR] = bin2bcd(tm->tm_hour); tm 213 drivers/rtc/rtc-abx80x.c buf[ABX8XX_REG_DA] = bin2bcd(tm->tm_mday); tm 214 drivers/rtc/rtc-abx80x.c buf[ABX8XX_REG_MO] = bin2bcd(tm->tm_mon + 1); tm 215 drivers/rtc/rtc-abx80x.c buf[ABX8XX_REG_YR] = bin2bcd(tm->tm_year - 100); tm 216 drivers/rtc/rtc-abx80x.c buf[ABX8XX_REG_WD] = tm->tm_wday; tm 213 drivers/rtc/rtc-armada38x.c static int armada38x_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 222 drivers/rtc/rtc-armada38x.c rtc_time64_to_tm(time, tm); tm 244 drivers/rtc/rtc-armada38x.c static int armada38x_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 249 drivers/rtc/rtc-armada38x.c time = rtc_tm_to_time64(tm); tm 33 drivers/rtc/rtc-as3722.c static void as3722_time_to_reg(u8 *rbuff, struct rtc_time *tm) tm 35 drivers/rtc/rtc-as3722.c rbuff[0] = bin2bcd(tm->tm_sec); tm 36 drivers/rtc/rtc-as3722.c rbuff[1] = bin2bcd(tm->tm_min); tm 37 drivers/rtc/rtc-as3722.c rbuff[2] = bin2bcd(tm->tm_hour); tm 38 drivers/rtc/rtc-as3722.c rbuff[3] = bin2bcd(tm->tm_mday); tm 39 drivers/rtc/rtc-as3722.c rbuff[4] = bin2bcd(tm->tm_mon + 1); tm 40 drivers/rtc/rtc-as3722.c rbuff[5] = bin2bcd(tm->tm_year - (AS3722_RTC_START_YEAR - 1900)); tm 43 drivers/rtc/rtc-as3722.c static void as3722_reg_to_time(u8 *rbuff, struct rtc_time *tm) tm 45 drivers/rtc/rtc-as3722.c tm->tm_sec = bcd2bin(rbuff[0] & 0x7F); tm 46 drivers/rtc/rtc-as3722.c tm->tm_min = bcd2bin(rbuff[1] & 0x7F); tm 47 drivers/rtc/rtc-as3722.c tm->tm_hour = bcd2bin(rbuff[2] & 0x3F); tm 48 drivers/rtc/rtc-as3722.c tm->tm_mday = bcd2bin(rbuff[3] & 0x3F); tm 49 drivers/rtc/rtc-as3722.c tm->tm_mon = bcd2bin(rbuff[4] & 0x1F) - 1; tm 50 drivers/rtc/rtc-as3722.c tm->tm_year = (AS3722_RTC_START_YEAR - 1900) + bcd2bin(rbuff[5] & 0x7F); tm 54 drivers/rtc/rtc-as3722.c static int as3722_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 67 drivers/rtc/rtc-as3722.c as3722_reg_to_time(as_time_array, tm); tm 71 drivers/rtc/rtc-as3722.c static int as3722_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 78 drivers/rtc/rtc-as3722.c if (tm->tm_year < (AS3722_RTC_START_YEAR - 1900)) tm 81 drivers/rtc/rtc-as3722.c as3722_time_to_reg(as_time_array, tm); tm 136 drivers/rtc/rtc-asm9260.c static int asm9260_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 155 drivers/rtc/rtc-asm9260.c tm->tm_sec = (ctime0 >> BM_CTIME0_SEC_S) & BM_CTIME0_SEC_M; tm 156 drivers/rtc/rtc-asm9260.c tm->tm_min = (ctime0 >> BM_CTIME0_MIN_S) & BM_CTIME0_MIN_M; tm 157 drivers/rtc/rtc-asm9260.c tm->tm_hour = (ctime0 >> BM_CTIME0_HOUR_S) & BM_CTIME0_HOUR_M; tm 158 drivers/rtc/rtc-asm9260.c tm->tm_wday = (ctime0 >> BM_CTIME0_DOW_S) & BM_CTIME0_DOW_M; tm 160 drivers/rtc/rtc-asm9260.c tm->tm_mday = (ctime1 >> BM_CTIME1_DOM_S) & BM_CTIME1_DOM_M; tm 161 drivers/rtc/rtc-asm9260.c tm->tm_mon = (ctime1 >> BM_CTIME1_MON_S) & BM_CTIME1_MON_M; tm 162 drivers/rtc/rtc-asm9260.c tm->tm_year = (ctime1 >> BM_CTIME1_YEAR_S) & BM_CTIME1_YEAR_M; tm 164 drivers/rtc/rtc-asm9260.c tm->tm_yday = (ctime2 >> BM_CTIME2_DOY_S) & BM_CTIME2_DOY_M; tm 169 drivers/rtc/rtc-asm9260.c static int asm9260_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 179 drivers/rtc/rtc-asm9260.c iowrite32(tm->tm_year, priv->iobase + HW_YEAR); tm 180 drivers/rtc/rtc-asm9260.c iowrite32(tm->tm_mon, priv->iobase + HW_MONTH); tm 181 drivers/rtc/rtc-asm9260.c iowrite32(tm->tm_mday, priv->iobase + HW_DOM); tm 182 drivers/rtc/rtc-asm9260.c iowrite32(tm->tm_wday, priv->iobase + HW_DOW); tm 183 drivers/rtc/rtc-asm9260.c iowrite32(tm->tm_yday, priv->iobase + HW_DOY); tm 184 drivers/rtc/rtc-asm9260.c iowrite32(tm->tm_hour, priv->iobase + HW_HOUR); tm 185 drivers/rtc/rtc-asm9260.c iowrite32(tm->tm_min, priv->iobase + HW_MIN); tm 186 drivers/rtc/rtc-asm9260.c iowrite32(tm->tm_sec, priv->iobase + HW_SEC); tm 22 drivers/rtc/rtc-aspeed.c static int aspeed_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 38 drivers/rtc/rtc-aspeed.c tm->tm_mday = (reg1 >> 24) & 0x1f; tm 39 drivers/rtc/rtc-aspeed.c tm->tm_hour = (reg1 >> 16) & 0x1f; tm 40 drivers/rtc/rtc-aspeed.c tm->tm_min = (reg1 >> 8) & 0x3f; tm 41 drivers/rtc/rtc-aspeed.c tm->tm_sec = (reg1 >> 0) & 0x3f; tm 45 drivers/rtc/rtc-aspeed.c tm->tm_mon = ((reg2 >> 0) & 0x0f) - 1; tm 46 drivers/rtc/rtc-aspeed.c tm->tm_year = year + (cent * 100) - 1900; tm 48 drivers/rtc/rtc-aspeed.c dev_dbg(dev, "%s %ptR", __func__, tm); tm 53 drivers/rtc/rtc-aspeed.c static int aspeed_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 59 drivers/rtc/rtc-aspeed.c cent = (tm->tm_year + 1900) / 100; tm 60 drivers/rtc/rtc-aspeed.c year = tm->tm_year % 100; tm 62 drivers/rtc/rtc-aspeed.c reg1 = (tm->tm_mday << 24) | (tm->tm_hour << 16) | (tm->tm_min << 8) | tm 63 drivers/rtc/rtc-aspeed.c tm->tm_sec; tm 66 drivers/rtc/rtc-aspeed.c ((tm->tm_mon + 1) & 0xf); tm 109 drivers/rtc/rtc-at91rm9200.c struct rtc_time *tm) tm 120 drivers/rtc/rtc-at91rm9200.c tm->tm_sec = bcd2bin((time & AT91_RTC_SEC) >> 0); tm 121 drivers/rtc/rtc-at91rm9200.c tm->tm_min = bcd2bin((time & AT91_RTC_MIN) >> 8); tm 122 drivers/rtc/rtc-at91rm9200.c tm->tm_hour = bcd2bin((time & AT91_RTC_HOUR) >> 16); tm 128 drivers/rtc/rtc-at91rm9200.c tm->tm_year = bcd2bin(date & AT91_RTC_CENT) * 100; /* century */ tm 129 drivers/rtc/rtc-at91rm9200.c tm->tm_year += bcd2bin((date & AT91_RTC_YEAR) >> 8); /* year */ tm 131 drivers/rtc/rtc-at91rm9200.c tm->tm_wday = bcd2bin((date & AT91_RTC_DAY) >> 21) - 1; /* day of the week [0-6], Sunday=0 */ tm 132 drivers/rtc/rtc-at91rm9200.c tm->tm_mon = bcd2bin((date & AT91_RTC_MONTH) >> 16) - 1; tm 133 drivers/rtc/rtc-at91rm9200.c tm->tm_mday = bcd2bin((date & AT91_RTC_DATE) >> 24); tm 139 drivers/rtc/rtc-at91rm9200.c static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm) tm 141 drivers/rtc/rtc-at91rm9200.c at91_rtc_decodetime(AT91_RTC_TIMR, AT91_RTC_CALR, tm); tm 142 drivers/rtc/rtc-at91rm9200.c tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); tm 143 drivers/rtc/rtc-at91rm9200.c tm->tm_year = tm->tm_year - 1900; tm 145 drivers/rtc/rtc-at91rm9200.c dev_dbg(dev, "%s(): %ptR\n", __func__, tm); tm 153 drivers/rtc/rtc-at91rm9200.c static int at91_rtc_settime(struct device *dev, struct rtc_time *tm) tm 157 drivers/rtc/rtc-at91rm9200.c dev_dbg(dev, "%s(): %ptR\n", __func__, tm); tm 170 drivers/rtc/rtc-at91rm9200.c bin2bcd(tm->tm_sec) << 0 tm 171 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm->tm_min) << 8 tm 172 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm->tm_hour) << 16); tm 175 drivers/rtc/rtc-at91rm9200.c bin2bcd((tm->tm_year + 1900) / 100) /* century */ tm 176 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm->tm_year % 100) << 8 /* year */ tm 177 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm->tm_mon + 1) << 16 /* tm_mon starts at zero */ tm 178 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm->tm_wday + 1) << 21 /* day of the week [0-6], Sunday=0 */ tm 179 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm->tm_mday) << 24); tm 195 drivers/rtc/rtc-at91rm9200.c struct rtc_time *tm = &alrm->time; tm 197 drivers/rtc/rtc-at91rm9200.c at91_rtc_decodetime(AT91_RTC_TIMALR, AT91_RTC_CALALR, tm); tm 198 drivers/rtc/rtc-at91rm9200.c tm->tm_year = -1; tm 203 drivers/rtc/rtc-at91rm9200.c dev_dbg(dev, "%s(): %ptR %sabled\n", __func__, tm, tm 214 drivers/rtc/rtc-at91rm9200.c struct rtc_time tm; tm 216 drivers/rtc/rtc-at91rm9200.c at91_rtc_decodetime(AT91_RTC_TIMR, AT91_RTC_CALR, &tm); tm 218 drivers/rtc/rtc-at91rm9200.c tm.tm_mon = alrm->time.tm_mon; tm 219 drivers/rtc/rtc-at91rm9200.c tm.tm_mday = alrm->time.tm_mday; tm 220 drivers/rtc/rtc-at91rm9200.c tm.tm_hour = alrm->time.tm_hour; tm 221 drivers/rtc/rtc-at91rm9200.c tm.tm_min = alrm->time.tm_min; tm 222 drivers/rtc/rtc-at91rm9200.c tm.tm_sec = alrm->time.tm_sec; tm 226 drivers/rtc/rtc-at91rm9200.c bin2bcd(tm.tm_sec) << 0 tm 227 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm.tm_min) << 8 tm 228 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm.tm_hour) << 16 tm 231 drivers/rtc/rtc-at91rm9200.c bin2bcd(tm.tm_mon + 1) << 16 /* tm_mon starts at zero */ tm 232 drivers/rtc/rtc-at91rm9200.c | bin2bcd(tm.tm_mday) << 24 tm 240 drivers/rtc/rtc-at91rm9200.c dev_dbg(dev, "%s(): %ptR\n", __func__, &tm); tm 103 drivers/rtc/rtc-at91sam9.c static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm) tm 120 drivers/rtc/rtc-at91sam9.c rtc_time64_to_tm(offset + secs, tm); tm 122 drivers/rtc/rtc-at91sam9.c dev_dbg(dev, "%s: %ptR\n", __func__, tm); tm 130 drivers/rtc/rtc-at91sam9.c static int at91_rtc_settime(struct device *dev, struct rtc_time *tm) tm 136 drivers/rtc/rtc-at91sam9.c dev_dbg(dev, "%s: %ptR\n", __func__, tm); tm 138 drivers/rtc/rtc-at91sam9.c secs = rtc_tm_to_time64(tm); tm 178 drivers/rtc/rtc-at91sam9.c struct rtc_time *tm = &alrm->time; tm 188 drivers/rtc/rtc-at91sam9.c rtc_time64_to_tm(offset + alarm, tm); tm 190 drivers/rtc/rtc-at91sam9.c dev_dbg(dev, "%s: %ptR\n", __func__, tm); tm 202 drivers/rtc/rtc-at91sam9.c struct rtc_time *tm = &alrm->time; tm 207 drivers/rtc/rtc-at91sam9.c secs = rtc_tm_to_time64(tm); tm 228 drivers/rtc/rtc-at91sam9.c dev_dbg(dev, "%s: %ptR\n", __func__, tm); tm 31 drivers/rtc/rtc-au1xxx.c static int au1xtoy_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 37 drivers/rtc/rtc-au1xxx.c rtc_time_to_tm(t, tm); tm 42 drivers/rtc/rtc-au1xxx.c static int au1xtoy_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 46 drivers/rtc/rtc-au1xxx.c rtc_tm_to_time(tm, &t); tm 89 drivers/rtc/rtc-bq32k.c static int bq32k_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 105 drivers/rtc/rtc-bq32k.c tm->tm_sec = bcd2bin(regs.seconds & BQ32K_SECONDS_MASK); tm 106 drivers/rtc/rtc-bq32k.c tm->tm_min = bcd2bin(regs.minutes & BQ32K_MINUTES_MASK); tm 107 drivers/rtc/rtc-bq32k.c tm->tm_hour = bcd2bin(regs.cent_hours & BQ32K_HOURS_MASK); tm 108 drivers/rtc/rtc-bq32k.c tm->tm_mday = bcd2bin(regs.date); tm 109 drivers/rtc/rtc-bq32k.c tm->tm_wday = bcd2bin(regs.day) - 1; tm 110 drivers/rtc/rtc-bq32k.c tm->tm_mon = bcd2bin(regs.month) - 1; tm 111 drivers/rtc/rtc-bq32k.c tm->tm_year = bcd2bin(regs.years) + tm 117 drivers/rtc/rtc-bq32k.c static int bq32k_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 121 drivers/rtc/rtc-bq32k.c regs.seconds = bin2bcd(tm->tm_sec); tm 122 drivers/rtc/rtc-bq32k.c regs.minutes = bin2bcd(tm->tm_min); tm 123 drivers/rtc/rtc-bq32k.c regs.cent_hours = bin2bcd(tm->tm_hour) | BQ32K_CENT_EN; tm 124 drivers/rtc/rtc-bq32k.c regs.day = bin2bcd(tm->tm_wday + 1); tm 125 drivers/rtc/rtc-bq32k.c regs.date = bin2bcd(tm->tm_mday); tm 126 drivers/rtc/rtc-bq32k.c regs.month = bin2bcd(tm->tm_mon + 1); tm 128 drivers/rtc/rtc-bq32k.c if (tm->tm_year >= 100) { tm 130 drivers/rtc/rtc-bq32k.c regs.years = bin2bcd(tm->tm_year - 100); tm 132 drivers/rtc/rtc-bq32k.c regs.years = bin2bcd(tm->tm_year); tm 50 drivers/rtc/rtc-bq4802.c static int bq4802_read_time(struct device *dev, struct rtc_time *tm) tm 62 drivers/rtc/rtc-bq4802.c tm->tm_sec = p->read(p, 0x00); tm 63 drivers/rtc/rtc-bq4802.c tm->tm_min = p->read(p, 0x02); tm 64 drivers/rtc/rtc-bq4802.c tm->tm_hour = p->read(p, 0x04); tm 65 drivers/rtc/rtc-bq4802.c tm->tm_mday = p->read(p, 0x06); tm 66 drivers/rtc/rtc-bq4802.c tm->tm_mon = p->read(p, 0x09); tm 67 drivers/rtc/rtc-bq4802.c tm->tm_year = p->read(p, 0x0a); tm 68 drivers/rtc/rtc-bq4802.c tm->tm_wday = p->read(p, 0x08); tm 75 drivers/rtc/rtc-bq4802.c tm->tm_sec = bcd2bin(tm->tm_sec); tm 76 drivers/rtc/rtc-bq4802.c tm->tm_min = bcd2bin(tm->tm_min); tm 77 drivers/rtc/rtc-bq4802.c tm->tm_hour = bcd2bin(tm->tm_hour); tm 78 drivers/rtc/rtc-bq4802.c tm->tm_mday = bcd2bin(tm->tm_mday); tm 79 drivers/rtc/rtc-bq4802.c tm->tm_mon = bcd2bin(tm->tm_mon); tm 80 drivers/rtc/rtc-bq4802.c tm->tm_year = bcd2bin(tm->tm_year); tm 81 drivers/rtc/rtc-bq4802.c tm->tm_wday = bcd2bin(tm->tm_wday); tm 84 drivers/rtc/rtc-bq4802.c tm->tm_year += (century * 100); tm 85 drivers/rtc/rtc-bq4802.c tm->tm_year -= 1900; tm 87 drivers/rtc/rtc-bq4802.c tm->tm_mon--; tm 92 drivers/rtc/rtc-bq4802.c static int bq4802_set_time(struct device *dev, struct rtc_time *tm) tm 99 drivers/rtc/rtc-bq4802.c year = tm->tm_year + 1900; tm 103 drivers/rtc/rtc-bq4802.c mon = tm->tm_mon + 1; /* tm_mon starts at zero */ tm 104 drivers/rtc/rtc-bq4802.c day = tm->tm_mday; tm 105 drivers/rtc/rtc-bq4802.c hrs = tm->tm_hour; tm 106 drivers/rtc/rtc-bq4802.c min = tm->tm_min; tm 107 drivers/rtc/rtc-bq4802.c sec = tm->tm_sec; tm 120 drivers/rtc/rtc-brcmstb-waketimer.c struct rtc_time *tm) tm 127 drivers/rtc/rtc-brcmstb-waketimer.c rtc_time64_to_tm(now.sec, tm); tm 133 drivers/rtc/rtc-brcmstb-waketimer.c struct rtc_time *tm) tm 138 drivers/rtc/rtc-brcmstb-waketimer.c sec = rtc_tm_to_time64(tm); tm 112 drivers/rtc/rtc-cadence.c static u32 cdns_rtc_time2reg(struct rtc_time *tm) tm 114 drivers/rtc/rtc-cadence.c return FIELD_PREP(CDNS_RTC_TIME_S, bin2bcd(tm->tm_sec)) tm 115 drivers/rtc/rtc-cadence.c | FIELD_PREP(CDNS_RTC_TIME_M, bin2bcd(tm->tm_min)) tm 116 drivers/rtc/rtc-cadence.c | FIELD_PREP(CDNS_RTC_TIME_HR, bin2bcd(tm->tm_hour)); tm 119 drivers/rtc/rtc-cadence.c static void cdns_rtc_reg2time(u32 reg, struct rtc_time *tm) tm 121 drivers/rtc/rtc-cadence.c tm->tm_sec = bcd2bin(FIELD_GET(CDNS_RTC_TIME_S, reg)); tm 122 drivers/rtc/rtc-cadence.c tm->tm_min = bcd2bin(FIELD_GET(CDNS_RTC_TIME_M, reg)); tm 123 drivers/rtc/rtc-cadence.c tm->tm_hour = bcd2bin(FIELD_GET(CDNS_RTC_TIME_HR, reg)); tm 126 drivers/rtc/rtc-cadence.c static int cdns_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 138 drivers/rtc/rtc-cadence.c cdns_rtc_reg2time(reg, tm); tm 141 drivers/rtc/rtc-cadence.c tm->tm_mday = bcd2bin(FIELD_GET(CDNS_RTC_CAL_D, reg)); tm 142 drivers/rtc/rtc-cadence.c tm->tm_mon = bcd2bin(FIELD_GET(CDNS_RTC_CAL_M, reg)) - 1; tm 143 drivers/rtc/rtc-cadence.c tm->tm_year = bcd2bin(FIELD_GET(CDNS_RTC_CAL_Y, reg)) tm 145 drivers/rtc/rtc-cadence.c tm->tm_wday = bcd2bin(FIELD_GET(CDNS_RTC_CAL_DAY, reg)) - 1; tm 151 drivers/rtc/rtc-cadence.c static int cdns_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 156 drivers/rtc/rtc-cadence.c int year = tm->tm_year + 1900; tm 161 drivers/rtc/rtc-cadence.c timr = cdns_rtc_time2reg(tm); tm 163 drivers/rtc/rtc-cadence.c calr = FIELD_PREP(CDNS_RTC_CAL_D, bin2bcd(tm->tm_mday)) tm 164 drivers/rtc/rtc-cadence.c | FIELD_PREP(CDNS_RTC_CAL_M, bin2bcd(tm->tm_mon + 1)) tm 167 drivers/rtc/rtc-cadence.c | FIELD_PREP(CDNS_RTC_CAL_DAY, tm->tm_wday + 1); tm 77 drivers/rtc/rtc-coh901331.c static int coh901331_read_time(struct device *dev, struct rtc_time *tm) tm 88 drivers/rtc/rtc-coh901331.c rtc_time64_to_tm(readl(rtap->virtbase + COH901331_CUR_TIME), tm); tm 93 drivers/rtc/rtc-coh901331.c static int coh901331_set_time(struct device *dev, struct rtc_time *tm) tm 98 drivers/rtc/rtc-coh901331.c writel(rtc_tm_to_time64(tm), rtap->virtbase + COH901331_SET_TIME); tm 91 drivers/rtc/rtc-cpcap.c static int cpcap_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 113 drivers/rtc/rtc-cpcap.c cpcap2rtc_time(tm, &cpcap_tm); tm 118 drivers/rtc/rtc-cpcap.c static int cpcap_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 126 drivers/rtc/rtc-cpcap.c rtc2cpcap_time(&cpcap_tm, tm); tm 86 drivers/rtc/rtc-cros-ec.c static int cros_ec_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 99 drivers/rtc/rtc-cros-ec.c rtc_time64_to_tm(time, tm); tm 105 drivers/rtc/rtc-cros-ec.c static int cros_ec_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 112 drivers/rtc/rtc-cros-ec.c time = rtc_tm_to_time64(tm); tm 327 drivers/rtc/rtc-cros-ec.c struct rtc_time tm; tm 339 drivers/rtc/rtc-cros-ec.c ret = cros_ec_rtc_read_time(&pdev->dev, &tm); tm 198 drivers/rtc/rtc-da9052.c static int da9052_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 205 drivers/rtc/rtc-da9052.c if ((tm->tm_year < 100) || (tm->tm_year > 163)) tm 210 drivers/rtc/rtc-da9052.c v[0] = tm->tm_sec; tm 211 drivers/rtc/rtc-da9052.c v[1] = tm->tm_min; tm 212 drivers/rtc/rtc-da9052.c v[2] = tm->tm_hour; tm 213 drivers/rtc/rtc-da9052.c v[3] = tm->tm_mday; tm 214 drivers/rtc/rtc-da9052.c v[4] = tm->tm_mon + 1; tm 215 drivers/rtc/rtc-da9052.c v[5] = tm->tm_year - 100; tm 226 drivers/rtc/rtc-da9052.c struct rtc_time *tm = &alrm->time; tm 229 drivers/rtc/rtc-da9052.c ret = da9052_read_alarm(rtc, tm); tm 242 drivers/rtc/rtc-da9052.c struct rtc_time *tm = &alrm->time; tm 246 drivers/rtc/rtc-da9052.c if ((tm->tm_year < 100) || (tm->tm_year > 163)) tm 253 drivers/rtc/rtc-da9052.c ret = da9052_set_alarm(rtc, tm); tm 159 drivers/rtc/rtc-da9055.c static int da9055_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 166 drivers/rtc/rtc-da9055.c v[0] = tm->tm_sec; tm 167 drivers/rtc/rtc-da9055.c v[1] = tm->tm_min; tm 168 drivers/rtc/rtc-da9055.c v[2] = tm->tm_hour; tm 169 drivers/rtc/rtc-da9055.c v[3] = tm->tm_mday; tm 170 drivers/rtc/rtc-da9055.c v[4] = tm->tm_mon + 1; tm 171 drivers/rtc/rtc-da9055.c v[5] = tm->tm_year - 100; tm 179 drivers/rtc/rtc-da9055.c struct rtc_time *tm = &alrm->time; tm 182 drivers/rtc/rtc-da9055.c ret = da9055_read_alarm(rtc->da9055, tm); tm 195 drivers/rtc/rtc-da9055.c struct rtc_time *tm = &alrm->time; tm 202 drivers/rtc/rtc-da9055.c ret = da9055_set_alarm(rtc->da9055, tm); tm 166 drivers/rtc/rtc-da9063.c static void da9063_data_to_tm(u8 *data, struct rtc_time *tm, tm 171 drivers/rtc/rtc-da9063.c tm->tm_sec = data[RTC_SEC] & config->rtc_count_sec_mask; tm 172 drivers/rtc/rtc-da9063.c tm->tm_min = data[RTC_MIN] & config->rtc_count_min_mask; tm 173 drivers/rtc/rtc-da9063.c tm->tm_hour = data[RTC_HOUR] & config->rtc_count_hour_mask; tm 174 drivers/rtc/rtc-da9063.c tm->tm_mday = data[RTC_DAY] & config->rtc_count_day_mask; tm 175 drivers/rtc/rtc-da9063.c tm->tm_mon = MONTHS_FROM_DA9063(data[RTC_MONTH] & tm 177 drivers/rtc/rtc-da9063.c tm->tm_year = YEARS_FROM_DA9063(data[RTC_YEAR] & tm 181 drivers/rtc/rtc-da9063.c static void da9063_tm_to_data(struct rtc_time *tm, u8 *data, tm 186 drivers/rtc/rtc-da9063.c data[RTC_SEC] = tm->tm_sec & config->rtc_count_sec_mask; tm 187 drivers/rtc/rtc-da9063.c data[RTC_MIN] = tm->tm_min & config->rtc_count_min_mask; tm 188 drivers/rtc/rtc-da9063.c data[RTC_HOUR] = tm->tm_hour & config->rtc_count_hour_mask; tm 189 drivers/rtc/rtc-da9063.c data[RTC_DAY] = tm->tm_mday & config->rtc_count_day_mask; tm 190 drivers/rtc/rtc-da9063.c data[RTC_MONTH] = MONTHS_TO_DA9063(tm->tm_mon) & tm 192 drivers/rtc/rtc-da9063.c data[RTC_YEAR] = YEARS_TO_DA9063(tm->tm_year) & tm 218 drivers/rtc/rtc-da9063.c static int da9063_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 240 drivers/rtc/rtc-da9063.c da9063_data_to_tm(data, tm, rtc); tm 242 drivers/rtc/rtc-da9063.c tm_secs = rtc_tm_to_time64(tm); tm 247 drivers/rtc/rtc-da9063.c memcpy(tm, &rtc->alarm_time, sizeof(struct rtc_time)); tm 254 drivers/rtc/rtc-da9063.c static int da9063_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 261 drivers/rtc/rtc-da9063.c da9063_tm_to_data(tm, data, rtc); tm 230 drivers/rtc/rtc-davinci.c static int convertfromdays(u16 days, struct rtc_time *tm) tm 244 drivers/rtc/rtc-davinci.c tm->tm_year = year - 1900; tm 245 drivers/rtc/rtc-davinci.c tm->tm_mon = mon; tm 246 drivers/rtc/rtc-davinci.c tm->tm_mday = days + 1; tm 256 drivers/rtc/rtc-davinci.c static int convert2days(u16 *days, struct rtc_time *tm) tm 262 drivers/rtc/rtc-davinci.c if (tm->tm_year < 100 || tm->tm_year > 199) tm 265 drivers/rtc/rtc-davinci.c for (i = 2000; i < 1900 + tm->tm_year; i++) tm 268 drivers/rtc/rtc-davinci.c *days += rtc_year_days(tm->tm_mday, tm->tm_mon, 1900 + tm->tm_year); tm 273 drivers/rtc/rtc-davinci.c static int davinci_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 283 drivers/rtc/rtc-davinci.c tm->tm_sec = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_SEC)); tm 286 drivers/rtc/rtc-davinci.c tm->tm_min = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_MIN)); tm 289 drivers/rtc/rtc-davinci.c tm->tm_hour = bcd2bin(rtcss_read(davinci_rtc, PRTCSS_RTC_HOUR)); tm 303 drivers/rtc/rtc-davinci.c if (convertfromdays(days, tm) < 0) tm 309 drivers/rtc/rtc-davinci.c static int davinci_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 316 drivers/rtc/rtc-davinci.c if (convert2days(&days, tm) < 0) tm 322 drivers/rtc/rtc-davinci.c rtcss_write(davinci_rtc, bin2bcd(tm->tm_sec), PRTCSS_RTC_SEC); tm 325 drivers/rtc/rtc-davinci.c rtcss_write(davinci_rtc, bin2bcd(tm->tm_min), PRTCSS_RTC_MIN); tm 328 drivers/rtc/rtc-davinci.c rtcss_write(davinci_rtc, bin2bcd(tm->tm_hour), PRTCSS_RTC_HOUR); tm 418 drivers/rtc/rtc-davinci.c struct rtc_time tm; tm 421 drivers/rtc/rtc-davinci.c davinci_rtc_read_time(dev, &tm); tm 422 drivers/rtc/rtc-davinci.c rtc_tm_to_time(&tm, &now); tm 424 drivers/rtc/rtc-davinci.c alm->time.tm_mday = tm.tm_mday; tm 425 drivers/rtc/rtc-davinci.c alm->time.tm_mon = tm.tm_mon; tm 426 drivers/rtc/rtc-davinci.c alm->time.tm_year = tm.tm_year; tm 430 drivers/rtc/rtc-davinci.c rtc_time_to_tm(now + 24 * 60 * 60, &tm); tm 431 drivers/rtc/rtc-davinci.c alm->time.tm_mday = tm.tm_mday; tm 432 drivers/rtc/rtc-davinci.c alm->time.tm_mon = tm.tm_mon; tm 433 drivers/rtc/rtc-davinci.c alm->time.tm_year = tm.tm_year; tm 91 drivers/rtc/rtc-digicolor.c static int dc_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 100 drivers/rtc/rtc-digicolor.c rtc_time64_to_tm(now, tm); tm 105 drivers/rtc/rtc-digicolor.c static int dc_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 109 drivers/rtc/rtc-digicolor.c return dc_rtc_write(rtc, rtc_tm_to_time64(tm)); tm 33 drivers/rtc/rtc-dm355evm.c static int dm355evm_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 77 drivers/rtc/rtc-dm355evm.c rtc_time64_to_tm(le32_to_cpu(time.value), tm); tm 81 drivers/rtc/rtc-dm355evm.c static int dm355evm_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 87 drivers/rtc/rtc-dm355evm.c value = rtc_tm_to_time64(tm); tm 78 drivers/rtc/rtc-ds1216.c static int ds1216_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 86 drivers/rtc/rtc-ds1216.c tm->tm_sec = bcd2bin(regs.sec); tm 87 drivers/rtc/rtc-ds1216.c tm->tm_min = bcd2bin(regs.min); tm 90 drivers/rtc/rtc-ds1216.c tm->tm_hour = bcd2bin(regs.hour & 0x1f); tm 92 drivers/rtc/rtc-ds1216.c tm->tm_hour += 12; tm 94 drivers/rtc/rtc-ds1216.c tm->tm_hour = bcd2bin(regs.hour & 0x3f); tm 95 drivers/rtc/rtc-ds1216.c tm->tm_wday = (regs.wday & 7) - 1; tm 96 drivers/rtc/rtc-ds1216.c tm->tm_mday = bcd2bin(regs.mday & 0x3f); tm 97 drivers/rtc/rtc-ds1216.c tm->tm_mon = bcd2bin(regs.month & 0x1f); tm 98 drivers/rtc/rtc-ds1216.c tm->tm_year = bcd2bin(regs.year); tm 99 drivers/rtc/rtc-ds1216.c if (tm->tm_year < 70) tm 100 drivers/rtc/rtc-ds1216.c tm->tm_year += 100; tm 105 drivers/rtc/rtc-ds1216.c static int ds1216_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 114 drivers/rtc/rtc-ds1216.c regs.sec = bin2bcd(tm->tm_sec); tm 115 drivers/rtc/rtc-ds1216.c regs.min = bin2bcd(tm->tm_min); tm 117 drivers/rtc/rtc-ds1216.c if (regs.hour && tm->tm_hour > 12) { tm 119 drivers/rtc/rtc-ds1216.c tm->tm_hour -= 12; tm 121 drivers/rtc/rtc-ds1216.c regs.hour |= bin2bcd(tm->tm_hour); tm 123 drivers/rtc/rtc-ds1216.c regs.wday |= tm->tm_wday; tm 124 drivers/rtc/rtc-ds1216.c regs.mday = bin2bcd(tm->tm_mday); tm 125 drivers/rtc/rtc-ds1216.c regs.month = bin2bcd(tm->tm_mon); tm 126 drivers/rtc/rtc-ds1216.c regs.year = bin2bcd(tm->tm_year % 100); tm 150 drivers/rtc/rtc-ds1286.c static int ds1286_read_time(struct device *dev, struct rtc_time *tm) tm 181 drivers/rtc/rtc-ds1286.c tm->tm_sec = ds1286_rtc_read(priv, RTC_SECONDS); tm 182 drivers/rtc/rtc-ds1286.c tm->tm_min = ds1286_rtc_read(priv, RTC_MINUTES); tm 183 drivers/rtc/rtc-ds1286.c tm->tm_hour = ds1286_rtc_read(priv, RTC_HOURS) & 0x3f; tm 184 drivers/rtc/rtc-ds1286.c tm->tm_mday = ds1286_rtc_read(priv, RTC_DATE); tm 185 drivers/rtc/rtc-ds1286.c tm->tm_mon = ds1286_rtc_read(priv, RTC_MONTH) & 0x1f; tm 186 drivers/rtc/rtc-ds1286.c tm->tm_year = ds1286_rtc_read(priv, RTC_YEAR); tm 191 drivers/rtc/rtc-ds1286.c tm->tm_sec = bcd2bin(tm->tm_sec); tm 192 drivers/rtc/rtc-ds1286.c tm->tm_min = bcd2bin(tm->tm_min); tm 193 drivers/rtc/rtc-ds1286.c tm->tm_hour = bcd2bin(tm->tm_hour); tm 194 drivers/rtc/rtc-ds1286.c tm->tm_mday = bcd2bin(tm->tm_mday); tm 195 drivers/rtc/rtc-ds1286.c tm->tm_mon = bcd2bin(tm->tm_mon); tm 196 drivers/rtc/rtc-ds1286.c tm->tm_year = bcd2bin(tm->tm_year); tm 202 drivers/rtc/rtc-ds1286.c if (tm->tm_year < 45) tm 203 drivers/rtc/rtc-ds1286.c tm->tm_year += 30; tm 204 drivers/rtc/rtc-ds1286.c tm->tm_year += 40; tm 205 drivers/rtc/rtc-ds1286.c if (tm->tm_year < 70) tm 206 drivers/rtc/rtc-ds1286.c tm->tm_year += 100; tm 208 drivers/rtc/rtc-ds1286.c tm->tm_mon--; tm 213 drivers/rtc/rtc-ds1286.c static int ds1286_set_time(struct device *dev, struct rtc_time *tm) tm 221 drivers/rtc/rtc-ds1286.c yrs = tm->tm_year + 1900; tm 222 drivers/rtc/rtc-ds1286.c mon = tm->tm_mon + 1; /* tm_mon starts at zero */ tm 223 drivers/rtc/rtc-ds1286.c day = tm->tm_mday; tm 224 drivers/rtc/rtc-ds1286.c hrs = tm->tm_hour; tm 225 drivers/rtc/rtc-ds1286.c min = tm->tm_min; tm 226 drivers/rtc/rtc-ds1286.c sec = tm->tm_sec; tm 323 drivers/rtc/rtc-ds1305.c struct rtc_time tm; tm 333 drivers/rtc/rtc-ds1305.c status = ds1305_get_time(dev, &tm); tm 336 drivers/rtc/rtc-ds1305.c status = rtc_tm_to_time(&tm, &now); tm 71 drivers/rtc/rtc-ds1553.c static int ds1553_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 77 drivers/rtc/rtc-ds1553.c century = bin2bcd((tm->tm_year + 1900) / 100); tm 81 drivers/rtc/rtc-ds1553.c writeb(bin2bcd(tm->tm_year % 100), ioaddr + RTC_YEAR); tm 82 drivers/rtc/rtc-ds1553.c writeb(bin2bcd(tm->tm_mon + 1), ioaddr + RTC_MONTH); tm 83 drivers/rtc/rtc-ds1553.c writeb(bin2bcd(tm->tm_wday) & RTC_DAY_MASK, ioaddr + RTC_DAY); tm 84 drivers/rtc/rtc-ds1553.c writeb(bin2bcd(tm->tm_mday), ioaddr + RTC_DATE); tm 85 drivers/rtc/rtc-ds1553.c writeb(bin2bcd(tm->tm_hour), ioaddr + RTC_HOURS); tm 86 drivers/rtc/rtc-ds1553.c writeb(bin2bcd(tm->tm_min), ioaddr + RTC_MINUTES); tm 87 drivers/rtc/rtc-ds1553.c writeb(bin2bcd(tm->tm_sec) & RTC_SECONDS_MASK, ioaddr + RTC_SECONDS); tm 95 drivers/rtc/rtc-ds1553.c static int ds1553_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 116 drivers/rtc/rtc-ds1553.c tm->tm_sec = bcd2bin(second); tm 117 drivers/rtc/rtc-ds1553.c tm->tm_min = bcd2bin(minute); tm 118 drivers/rtc/rtc-ds1553.c tm->tm_hour = bcd2bin(hour); tm 119 drivers/rtc/rtc-ds1553.c tm->tm_mday = bcd2bin(day); tm 120 drivers/rtc/rtc-ds1553.c tm->tm_wday = bcd2bin(week); tm 121 drivers/rtc/rtc-ds1553.c tm->tm_mon = bcd2bin(month) - 1; tm 123 drivers/rtc/rtc-ds1553.c tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900; tm 26 drivers/rtc/rtc-ds1672.c static int ds1672_read_time(struct device *dev, struct rtc_time *tm) tm 74 drivers/rtc/rtc-ds1672.c rtc_time64_to_tm(time, tm); tm 76 drivers/rtc/rtc-ds1672.c dev_dbg(&client->dev, "%s: tm is %ptR\n", __func__, tm); tm 81 drivers/rtc/rtc-ds1672.c static int ds1672_set_time(struct device *dev, struct rtc_time *tm) tm 86 drivers/rtc/rtc-ds1672.c unsigned long secs = rtc_tm_to_time64(tm); tm 229 drivers/rtc/rtc-ds1685.c ds1685_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 253 drivers/rtc/rtc-ds1685.c tm->tm_sec = ds1685_rtc_bcd2bin(rtc, seconds, RTC_SECS_BCD_MASK, tm 255 drivers/rtc/rtc-ds1685.c tm->tm_min = ds1685_rtc_bcd2bin(rtc, minutes, RTC_MINS_BCD_MASK, tm 257 drivers/rtc/rtc-ds1685.c tm->tm_hour = ds1685_rtc_bcd2bin(rtc, hours, RTC_HRS_24_BCD_MASK, tm 259 drivers/rtc/rtc-ds1685.c tm->tm_wday = (ds1685_rtc_bcd2bin(rtc, wday, RTC_WDAY_MASK, tm 261 drivers/rtc/rtc-ds1685.c tm->tm_mday = ds1685_rtc_bcd2bin(rtc, mday, RTC_MDAY_BCD_MASK, tm 263 drivers/rtc/rtc-ds1685.c tm->tm_mon = (ds1685_rtc_bcd2bin(rtc, month, RTC_MONTH_BCD_MASK, tm 265 drivers/rtc/rtc-ds1685.c tm->tm_year = ((years + (century * 100)) - 1900); tm 266 drivers/rtc/rtc-ds1685.c tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); tm 267 drivers/rtc/rtc-ds1685.c tm->tm_isdst = 0; /* RTC has hardcoded timezone, so don't use. */ tm 278 drivers/rtc/rtc-ds1685.c ds1685_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 284 drivers/rtc/rtc-ds1685.c seconds = ds1685_rtc_bin2bcd(rtc, tm->tm_sec, RTC_SECS_BIN_MASK, tm 286 drivers/rtc/rtc-ds1685.c minutes = ds1685_rtc_bin2bcd(rtc, tm->tm_min, RTC_MINS_BIN_MASK, tm 288 drivers/rtc/rtc-ds1685.c hours = ds1685_rtc_bin2bcd(rtc, tm->tm_hour, RTC_HRS_24_BIN_MASK, tm 290 drivers/rtc/rtc-ds1685.c wday = ds1685_rtc_bin2bcd(rtc, (tm->tm_wday + 1), RTC_WDAY_MASK, tm 292 drivers/rtc/rtc-ds1685.c mday = ds1685_rtc_bin2bcd(rtc, tm->tm_mday, RTC_MDAY_BIN_MASK, tm 294 drivers/rtc/rtc-ds1685.c month = ds1685_rtc_bin2bcd(rtc, (tm->tm_mon + 1), RTC_MONTH_BIN_MASK, tm 296 drivers/rtc/rtc-ds1685.c years = ds1685_rtc_bin2bcd(rtc, (tm->tm_year % 100), tm 298 drivers/rtc/rtc-ds1685.c century = ds1685_rtc_bin2bcd(rtc, ((tm->tm_year + 1900) / 100), tm 307 drivers/rtc/rtc-ds1685.c if ((tm->tm_mon > 11) || (mday == 0)) tm 310 drivers/rtc/rtc-ds1685.c if (tm->tm_mday > rtc_month_days(tm->tm_mon, tm->tm_year)) tm 313 drivers/rtc/rtc-ds1685.c if ((tm->tm_hour >= 24) || (tm->tm_min >= 60) || tm 314 drivers/rtc/rtc-ds1685.c (tm->tm_sec >= 60) || (wday > 7)) tm 56 drivers/rtc/rtc-ds1742.c static int ds1742_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 62 drivers/rtc/rtc-ds1742.c century = bin2bcd((tm->tm_year + 1900) / 100); tm 66 drivers/rtc/rtc-ds1742.c writeb(bin2bcd(tm->tm_year % 100), ioaddr + RTC_YEAR); tm 67 drivers/rtc/rtc-ds1742.c writeb(bin2bcd(tm->tm_mon + 1), ioaddr + RTC_MONTH); tm 68 drivers/rtc/rtc-ds1742.c writeb(bin2bcd(tm->tm_wday) & RTC_DAY_MASK, ioaddr + RTC_DAY); tm 69 drivers/rtc/rtc-ds1742.c writeb(bin2bcd(tm->tm_mday), ioaddr + RTC_DATE); tm 70 drivers/rtc/rtc-ds1742.c writeb(bin2bcd(tm->tm_hour), ioaddr + RTC_HOURS); tm 71 drivers/rtc/rtc-ds1742.c writeb(bin2bcd(tm->tm_min), ioaddr + RTC_MINUTES); tm 72 drivers/rtc/rtc-ds1742.c writeb(bin2bcd(tm->tm_sec) & RTC_SECONDS_MASK, ioaddr + RTC_SECONDS); tm 80 drivers/rtc/rtc-ds1742.c static int ds1742_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 101 drivers/rtc/rtc-ds1742.c tm->tm_sec = bcd2bin(second); tm 102 drivers/rtc/rtc-ds1742.c tm->tm_min = bcd2bin(minute); tm 103 drivers/rtc/rtc-ds1742.c tm->tm_hour = bcd2bin(hour); tm 104 drivers/rtc/rtc-ds1742.c tm->tm_mday = bcd2bin(day); tm 105 drivers/rtc/rtc-ds1742.c tm->tm_wday = bcd2bin(week); tm 106 drivers/rtc/rtc-ds1742.c tm->tm_mon = bcd2bin(month) - 1; tm 108 drivers/rtc/rtc-ds1742.c tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900; tm 157 drivers/rtc/rtc-efi.c static int efi_read_time(struct device *dev, struct rtc_time *tm) tm 171 drivers/rtc/rtc-efi.c if (!convert_from_efi_time(&eft, tm)) tm 177 drivers/rtc/rtc-efi.c static int efi_set_time(struct device *dev, struct rtc_time *tm) tm 182 drivers/rtc/rtc-efi.c convert_to_efi_time(tm, &eft); tm 42 drivers/rtc/rtc-em3027.c static int em3027_get_time(struct device *dev, struct rtc_time *tm) tm 69 drivers/rtc/rtc-em3027.c tm->tm_sec = bcd2bin(buf[0]); tm 70 drivers/rtc/rtc-em3027.c tm->tm_min = bcd2bin(buf[1]); tm 71 drivers/rtc/rtc-em3027.c tm->tm_hour = bcd2bin(buf[2]); tm 72 drivers/rtc/rtc-em3027.c tm->tm_mday = bcd2bin(buf[3]); tm 73 drivers/rtc/rtc-em3027.c tm->tm_wday = bcd2bin(buf[4]); tm 74 drivers/rtc/rtc-em3027.c tm->tm_mon = bcd2bin(buf[5]); tm 75 drivers/rtc/rtc-em3027.c tm->tm_year = bcd2bin(buf[6]) + 100; tm 80 drivers/rtc/rtc-em3027.c static int em3027_set_time(struct device *dev, struct rtc_time *tm) tm 92 drivers/rtc/rtc-em3027.c buf[1] = bin2bcd(tm->tm_sec); tm 93 drivers/rtc/rtc-em3027.c buf[2] = bin2bcd(tm->tm_min); tm 94 drivers/rtc/rtc-em3027.c buf[3] = bin2bcd(tm->tm_hour); tm 95 drivers/rtc/rtc-em3027.c buf[4] = bin2bcd(tm->tm_mday); tm 96 drivers/rtc/rtc-em3027.c buf[5] = bin2bcd(tm->tm_wday); tm 97 drivers/rtc/rtc-em3027.c buf[6] = bin2bcd(tm->tm_mon); tm 98 drivers/rtc/rtc-em3027.c buf[7] = bin2bcd(tm->tm_year % 100); tm 52 drivers/rtc/rtc-ep93xx.c static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 59 drivers/rtc/rtc-ep93xx.c rtc_time64_to_tm(time, tm); tm 63 drivers/rtc/rtc-ep93xx.c static int ep93xx_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 66 drivers/rtc/rtc-ep93xx.c unsigned long secs = rtc_tm_to_time64(tm); tm 186 drivers/rtc/rtc-fm3130.c struct rtc_time *tm = &alrm->time; tm 211 drivers/rtc/rtc-fm3130.c tm->tm_sec = bcd2bin(fm3130->regs[FM3130_ALARM_SECONDS] & 0x7F); tm 212 drivers/rtc/rtc-fm3130.c tm->tm_min = bcd2bin(fm3130->regs[FM3130_ALARM_MINUTES] & 0x7F); tm 213 drivers/rtc/rtc-fm3130.c tm->tm_hour = bcd2bin(fm3130->regs[FM3130_ALARM_HOURS] & 0x3F); tm 214 drivers/rtc/rtc-fm3130.c tm->tm_mday = bcd2bin(fm3130->regs[FM3130_ALARM_DATE] & 0x3F); tm 215 drivers/rtc/rtc-fm3130.c tm->tm_mon = bcd2bin(fm3130->regs[FM3130_ALARM_MONTHS] & 0x1F); tm 217 drivers/rtc/rtc-fm3130.c if (tm->tm_mon > 0) tm 218 drivers/rtc/rtc-fm3130.c tm->tm_mon -= 1; /* RTC is 1-12, tm_mon is 0-11 */ tm 222 drivers/rtc/rtc-fm3130.c "read alarm", tm->tm_sec, tm->tm_min, tm 223 drivers/rtc/rtc-fm3130.c tm->tm_hour, tm->tm_mday, tm 224 drivers/rtc/rtc-fm3130.c tm->tm_mon, tm->tm_year, tm->tm_wday); tm 242 drivers/rtc/rtc-fm3130.c struct rtc_time *tm = &alrm->time; tm 247 drivers/rtc/rtc-fm3130.c "write alarm", tm->tm_sec, tm->tm_min, tm 248 drivers/rtc/rtc-fm3130.c tm->tm_hour, tm->tm_mday, tm 249 drivers/rtc/rtc-fm3130.c tm->tm_mon, tm->tm_year, tm->tm_wday); tm 252 drivers/rtc/rtc-fm3130.c (tm->tm_sec != -1) ? bin2bcd(tm->tm_sec) : 0x80; tm 255 drivers/rtc/rtc-fm3130.c (tm->tm_min != -1) ? bin2bcd(tm->tm_min) : 0x80; tm 258 drivers/rtc/rtc-fm3130.c (tm->tm_hour != -1) ? bin2bcd(tm->tm_hour) : 0x80; tm 261 drivers/rtc/rtc-fm3130.c (tm->tm_mday != -1) ? bin2bcd(tm->tm_mday) : 0x80; tm 264 drivers/rtc/rtc-fm3130.c (tm->tm_mon != -1) ? bin2bcd(tm->tm_mon + 1) : 0x80; tm 181 drivers/rtc/rtc-fsl-ftm-alarm.c static int ftm_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 186 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_time_to_tm(ts64.tv_sec, tm); tm 209 drivers/rtc/rtc-fsl-ftm-alarm.c struct rtc_time tm; tm 213 drivers/rtc/rtc-fsl-ftm-alarm.c ftm_rtc_read_time(dev, &tm); tm 214 drivers/rtc/rtc-fsl-ftm-alarm.c rtc_tm_to_time(&tm, &now); tm 64 drivers/rtc/rtc-ftrtc010.c static int ftrtc010_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 79 drivers/rtc/rtc-ftrtc010.c rtc_time64_to_tm(time, tm); tm 84 drivers/rtc/rtc-ftrtc010.c static int ftrtc010_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 90 drivers/rtc/rtc-ftrtc010.c time = rtc_tm_to_time64(tm); tm 119 drivers/rtc/rtc-goldfish.c static int goldfish_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 136 drivers/rtc/rtc-goldfish.c rtc_time64_to_tm(time, tm); tm 141 drivers/rtc/rtc-goldfish.c static int goldfish_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 150 drivers/rtc/rtc-goldfish.c now64 = rtc_tm_to_time64(tm) * NSEC_PER_SEC; tm 192 drivers/rtc/rtc-hid-sensor-time.c static int hid_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 209 drivers/rtc/rtc-hid-sensor-time.c *tm = time_state->last_time; tm 91 drivers/rtc/rtc-hym8563.c static int hym8563_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 107 drivers/rtc/rtc-hym8563.c tm->tm_sec = bcd2bin(buf[0] & HYM8563_SEC_MASK); tm 108 drivers/rtc/rtc-hym8563.c tm->tm_min = bcd2bin(buf[1] & HYM8563_MIN_MASK); tm 109 drivers/rtc/rtc-hym8563.c tm->tm_hour = bcd2bin(buf[2] & HYM8563_HOUR_MASK); tm 110 drivers/rtc/rtc-hym8563.c tm->tm_mday = bcd2bin(buf[3] & HYM8563_DAY_MASK); tm 111 drivers/rtc/rtc-hym8563.c tm->tm_wday = bcd2bin(buf[4] & HYM8563_WEEKDAY_MASK); /* 0 = Sun */ tm 112 drivers/rtc/rtc-hym8563.c tm->tm_mon = bcd2bin(buf[5] & HYM8563_MONTH_MASK) - 1; /* 0 = Jan */ tm 113 drivers/rtc/rtc-hym8563.c tm->tm_year = bcd2bin(buf[6]) + 100; tm 118 drivers/rtc/rtc-hym8563.c static int hym8563_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 126 drivers/rtc/rtc-hym8563.c if (tm->tm_year < 100 || tm->tm_year >= 200) tm 129 drivers/rtc/rtc-hym8563.c buf[0] = bin2bcd(tm->tm_sec); tm 130 drivers/rtc/rtc-hym8563.c buf[1] = bin2bcd(tm->tm_min); tm 131 drivers/rtc/rtc-hym8563.c buf[2] = bin2bcd(tm->tm_hour); tm 132 drivers/rtc/rtc-hym8563.c buf[3] = bin2bcd(tm->tm_mday); tm 133 drivers/rtc/rtc-hym8563.c buf[4] = bin2bcd(tm->tm_wday); tm 134 drivers/rtc/rtc-hym8563.c buf[5] = bin2bcd(tm->tm_mon + 1); tm 141 drivers/rtc/rtc-hym8563.c buf[6] = bin2bcd(tm->tm_year - 100); tm 42 drivers/rtc/rtc-imx-sc.c static int imx_sc_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 59 drivers/rtc/rtc-imx-sc.c rtc_time64_to_tm(msg.time, tm); tm 64 drivers/rtc/rtc-imx-sc.c static int imx_sc_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 70 drivers/rtc/rtc-imx-sc.c ((tm->tm_year + 1900) << 16) | (tm->tm_mon + 1), tm 71 drivers/rtc/rtc-imx-sc.c (tm->tm_mday << 16) | tm->tm_hour, tm 72 drivers/rtc/rtc-imx-sc.c (tm->tm_min << 16) | tm->tm_sec, tm 539 drivers/rtc/rtc-imxdi.c static int dryice_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 545 drivers/rtc/rtc-imxdi.c rtc_time64_to_tm(now, tm); tm 554 drivers/rtc/rtc-imxdi.c static int dryice_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 581 drivers/rtc/rtc-imxdi.c rc = di_write_wait(imxdi, rtc_tm_to_time64(tm), DTCMR); tm 104 drivers/rtc/rtc-isl12022.c static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 136 drivers/rtc/rtc-isl12022.c tm->tm_sec = bcd2bin(buf[ISL12022_REG_SC] & 0x7F); tm 137 drivers/rtc/rtc-isl12022.c tm->tm_min = bcd2bin(buf[ISL12022_REG_MN] & 0x7F); tm 138 drivers/rtc/rtc-isl12022.c tm->tm_hour = bcd2bin(buf[ISL12022_REG_HR] & 0x3F); tm 139 drivers/rtc/rtc-isl12022.c tm->tm_mday = bcd2bin(buf[ISL12022_REG_DT] & 0x3F); tm 140 drivers/rtc/rtc-isl12022.c tm->tm_wday = buf[ISL12022_REG_DW] & 0x07; tm 141 drivers/rtc/rtc-isl12022.c tm->tm_mon = bcd2bin(buf[ISL12022_REG_MO] & 0x1F) - 1; tm 142 drivers/rtc/rtc-isl12022.c tm->tm_year = bcd2bin(buf[ISL12022_REG_YR]) + 100; tm 147 drivers/rtc/rtc-isl12022.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 148 drivers/rtc/rtc-isl12022.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 153 drivers/rtc/rtc-isl12022.c static int isl12022_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 164 drivers/rtc/rtc-isl12022.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 165 drivers/rtc/rtc-isl12022.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 205 drivers/rtc/rtc-isl12022.c buf[ISL12022_REG_SC] = bin2bcd(tm->tm_sec); tm 206 drivers/rtc/rtc-isl12022.c buf[ISL12022_REG_MN] = bin2bcd(tm->tm_min); tm 207 drivers/rtc/rtc-isl12022.c buf[ISL12022_REG_HR] = bin2bcd(tm->tm_hour) | ISL12022_HR_MIL; tm 209 drivers/rtc/rtc-isl12022.c buf[ISL12022_REG_DT] = bin2bcd(tm->tm_mday); tm 212 drivers/rtc/rtc-isl12022.c buf[ISL12022_REG_MO] = bin2bcd(tm->tm_mon + 1); tm 215 drivers/rtc/rtc-isl12022.c buf[ISL12022_REG_YR] = bin2bcd(tm->tm_year % 100); tm 217 drivers/rtc/rtc-isl12022.c buf[ISL12022_REG_DW] = tm->tm_wday & 0x07; tm 165 drivers/rtc/rtc-isl12026.c static int isl12026_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 184 drivers/rtc/rtc-isl12026.c op[2] = bin2bcd(tm->tm_sec); /* SC */ tm 185 drivers/rtc/rtc-isl12026.c op[3] = bin2bcd(tm->tm_min); /* MN */ tm 186 drivers/rtc/rtc-isl12026.c op[4] = bin2bcd(tm->tm_hour) | ISL12026_REG_HR_MIL; /* HR */ tm 187 drivers/rtc/rtc-isl12026.c op[5] = bin2bcd(tm->tm_mday); /* DT */ tm 188 drivers/rtc/rtc-isl12026.c op[6] = bin2bcd(tm->tm_mon + 1); /* MO */ tm 189 drivers/rtc/rtc-isl12026.c op[7] = bin2bcd(tm->tm_year % 100); /* YR */ tm 190 drivers/rtc/rtc-isl12026.c op[8] = bin2bcd(tm->tm_wday & 7); /* DW */ tm 191 drivers/rtc/rtc-isl12026.c op[9] = bin2bcd(tm->tm_year >= 100 ? 20 : 19); /* Y2K */ tm 204 drivers/rtc/rtc-isl12026.c static int isl12026_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 254 drivers/rtc/rtc-isl12026.c tm->tm_sec = bcd2bin(ccr[0] & 0x7F); tm 255 drivers/rtc/rtc-isl12026.c tm->tm_min = bcd2bin(ccr[1] & 0x7F); tm 257 drivers/rtc/rtc-isl12026.c tm->tm_hour = bcd2bin(ccr[2] & 0x3F); tm 259 drivers/rtc/rtc-isl12026.c tm->tm_hour = bcd2bin(ccr[2] & 0x1F) + tm 261 drivers/rtc/rtc-isl12026.c tm->tm_mday = bcd2bin(ccr[3] & 0x3F); tm 262 drivers/rtc/rtc-isl12026.c tm->tm_mon = bcd2bin(ccr[4] & 0x1F) - 1; tm 263 drivers/rtc/rtc-isl12026.c tm->tm_year = bcd2bin(ccr[5]); tm 265 drivers/rtc/rtc-isl12026.c tm->tm_year += 100; tm 266 drivers/rtc/rtc-isl12026.c tm->tm_wday = ccr[6] & 0x07; tm 304 drivers/rtc/rtc-isl1208.c isl1208_i2c_read_time(struct i2c_client *client, struct rtc_time *tm) tm 322 drivers/rtc/rtc-isl1208.c tm->tm_sec = bcd2bin(regs[ISL1208_REG_SC]); tm 323 drivers/rtc/rtc-isl1208.c tm->tm_min = bcd2bin(regs[ISL1208_REG_MN]); tm 329 drivers/rtc/rtc-isl1208.c tm->tm_hour = bcd2bin(_hr & 0x3f); tm 332 drivers/rtc/rtc-isl1208.c tm->tm_hour = bcd2bin(_hr & 0x1f); tm 334 drivers/rtc/rtc-isl1208.c tm->tm_hour += 12; tm 338 drivers/rtc/rtc-isl1208.c tm->tm_mday = bcd2bin(regs[ISL1208_REG_DT]); tm 339 drivers/rtc/rtc-isl1208.c tm->tm_mon = bcd2bin(regs[ISL1208_REG_MO]) - 1; /* rtc starts at 1 */ tm 340 drivers/rtc/rtc-isl1208.c tm->tm_year = bcd2bin(regs[ISL1208_REG_YR]) + 100; tm 341 drivers/rtc/rtc-isl1208.c tm->tm_wday = bcd2bin(regs[ISL1208_REG_DW]); tm 349 drivers/rtc/rtc-isl1208.c struct rtc_time *const tm = &alarm->time; tm 367 drivers/rtc/rtc-isl1208.c tm->tm_sec = bcd2bin(regs[ISL1208_REG_SCA - ISL1208_REG_SCA] & 0x7f); tm 368 drivers/rtc/rtc-isl1208.c tm->tm_min = bcd2bin(regs[ISL1208_REG_MNA - ISL1208_REG_SCA] & 0x7f); tm 369 drivers/rtc/rtc-isl1208.c tm->tm_hour = bcd2bin(regs[ISL1208_REG_HRA - ISL1208_REG_SCA] & 0x3f); tm 370 drivers/rtc/rtc-isl1208.c tm->tm_mday = bcd2bin(regs[ISL1208_REG_DTA - ISL1208_REG_SCA] & 0x3f); tm 371 drivers/rtc/rtc-isl1208.c tm->tm_mon = tm 373 drivers/rtc/rtc-isl1208.c tm->tm_wday = bcd2bin(regs[ISL1208_REG_DWA - ISL1208_REG_SCA] & 0x03); tm 381 drivers/rtc/rtc-isl1208.c tm->tm_year = bcd2bin(yr) + 100; tm 439 drivers/rtc/rtc-isl1208.c isl1208_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 441 drivers/rtc/rtc-isl1208.c return isl1208_i2c_read_time(to_i2c_client(dev), tm); tm 445 drivers/rtc/rtc-isl1208.c isl1208_i2c_set_time(struct i2c_client *client, struct rtc_time const *tm) tm 454 drivers/rtc/rtc-isl1208.c if (tm->tm_year < 100) tm 457 drivers/rtc/rtc-isl1208.c regs[ISL1208_REG_SC] = bin2bcd(tm->tm_sec); tm 458 drivers/rtc/rtc-isl1208.c regs[ISL1208_REG_MN] = bin2bcd(tm->tm_min); tm 459 drivers/rtc/rtc-isl1208.c regs[ISL1208_REG_HR] = bin2bcd(tm->tm_hour) | ISL1208_REG_HR_MIL; tm 461 drivers/rtc/rtc-isl1208.c regs[ISL1208_REG_DT] = bin2bcd(tm->tm_mday); tm 462 drivers/rtc/rtc-isl1208.c regs[ISL1208_REG_MO] = bin2bcd(tm->tm_mon + 1); tm 463 drivers/rtc/rtc-isl1208.c regs[ISL1208_REG_YR] = bin2bcd(tm->tm_year - 100); tm 465 drivers/rtc/rtc-isl1208.c regs[ISL1208_REG_DW] = bin2bcd(tm->tm_wday & 7); tm 507 drivers/rtc/rtc-isl1208.c isl1208_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 509 drivers/rtc/rtc-isl1208.c return isl1208_i2c_set_time(to_i2c_client(dev), tm); tm 552 drivers/rtc/rtc-isl1208.c struct rtc_time tm; tm 573 drivers/rtc/rtc-isl1208.c tm.tm_sec = bcd2bin(regs[ISL1219_REG_SCT - ISL1219_REG_SCT] & 0x7f); tm 574 drivers/rtc/rtc-isl1208.c tm.tm_min = bcd2bin(regs[ISL1219_REG_MNT - ISL1219_REG_SCT] & 0x7f); tm 575 drivers/rtc/rtc-isl1208.c tm.tm_hour = bcd2bin(regs[ISL1219_REG_HRT - ISL1219_REG_SCT] & 0x3f); tm 576 drivers/rtc/rtc-isl1208.c tm.tm_mday = bcd2bin(regs[ISL1219_REG_DTT - ISL1219_REG_SCT] & 0x3f); tm 577 drivers/rtc/rtc-isl1208.c tm.tm_mon = tm 579 drivers/rtc/rtc-isl1208.c tm.tm_year = bcd2bin(regs[ISL1219_REG_YRT - ISL1219_REG_SCT]) + 100; tm 581 drivers/rtc/rtc-isl1208.c sr = rtc_valid_tm(&tm); tm 586 drivers/rtc/rtc-isl1208.c (unsigned long long)rtc_tm_to_time64(&tm)); tm 109 drivers/rtc/rtc-lp8788.c static int lp8788_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 122 drivers/rtc/rtc-lp8788.c tm->tm_sec = data[LPTIME_SEC]; tm 123 drivers/rtc/rtc-lp8788.c tm->tm_min = data[LPTIME_MIN]; tm 124 drivers/rtc/rtc-lp8788.c tm->tm_hour = data[LPTIME_HOUR]; tm 125 drivers/rtc/rtc-lp8788.c tm->tm_mday = data[LPTIME_MDAY]; tm 126 drivers/rtc/rtc-lp8788.c tm->tm_mon = data[LPTIME_MON] - LP8788_MONTH_OFFSET; tm 127 drivers/rtc/rtc-lp8788.c tm->tm_year = data[LPTIME_YEAR] + LP8788_BASE_YEAR - 1900; tm 128 drivers/rtc/rtc-lp8788.c tm->tm_wday = _to_tm_wday(data[LPTIME_WDAY]); tm 133 drivers/rtc/rtc-lp8788.c static int lp8788_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 140 drivers/rtc/rtc-lp8788.c year = tm->tm_year + 1900 - LP8788_BASE_YEAR; tm 147 drivers/rtc/rtc-lp8788.c data[LPTIME_SEC] = tm->tm_sec; tm 148 drivers/rtc/rtc-lp8788.c data[LPTIME_MIN] = tm->tm_min; tm 149 drivers/rtc/rtc-lp8788.c data[LPTIME_HOUR] = tm->tm_hour; tm 150 drivers/rtc/rtc-lp8788.c data[LPTIME_MDAY] = tm->tm_mday; tm 151 drivers/rtc/rtc-lp8788.c data[LPTIME_MON] = tm->tm_mon + LP8788_MONTH_OFFSET; tm 167 drivers/rtc/rtc-lp8788.c struct rtc_time *tm = &alarm->time; tm 176 drivers/rtc/rtc-lp8788.c tm->tm_sec = data[LPTIME_SEC]; tm 177 drivers/rtc/rtc-lp8788.c tm->tm_min = data[LPTIME_MIN]; tm 178 drivers/rtc/rtc-lp8788.c tm->tm_hour = data[LPTIME_HOUR]; tm 179 drivers/rtc/rtc-lp8788.c tm->tm_mday = data[LPTIME_MDAY]; tm 180 drivers/rtc/rtc-lp8788.c tm->tm_mon = data[LPTIME_MON] - LP8788_MONTH_OFFSET; tm 181 drivers/rtc/rtc-lp8788.c tm->tm_year = data[LPTIME_YEAR] + LP8788_BASE_YEAR - 1900; tm 182 drivers/rtc/rtc-lp8788.c tm->tm_wday = _to_tm_wday(data[LPTIME_WDAY]); tm 192 drivers/rtc/rtc-lp8788.c struct rtc_time *tm = &alarm->time; tm 196 drivers/rtc/rtc-lp8788.c year = tm->tm_year + 1900 - LP8788_BASE_YEAR; tm 202 drivers/rtc/rtc-lp8788.c data[LPTIME_SEC] = tm->tm_sec; tm 203 drivers/rtc/rtc-lp8788.c data[LPTIME_MIN] = tm->tm_min; tm 204 drivers/rtc/rtc-lp8788.c data[LPTIME_HOUR] = tm->tm_hour; tm 205 drivers/rtc/rtc-lp8788.c data[LPTIME_MDAY] = tm->tm_mday; tm 206 drivers/rtc/rtc-lp8788.c data[LPTIME_MON] = tm->tm_mon + LP8788_MONTH_OFFSET; tm 208 drivers/rtc/rtc-lp8788.c data[LPTIME_WDAY] = _to_lp8788_wday(tm->tm_wday); tm 69 drivers/rtc/rtc-lpc24xx.c static int lpc24xx_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 76 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_SEC, tm->tm_sec); tm 77 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_MIN, tm->tm_min); tm 78 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_HOUR, tm->tm_hour); tm 79 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_DOW, tm->tm_wday); tm 80 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_DOM, tm->tm_mday); tm 81 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_DOY, tm->tm_yday); tm 82 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_MONTH, tm->tm_mon); tm 83 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_YEAR, tm->tm_year); tm 90 drivers/rtc/rtc-lpc24xx.c static int lpc24xx_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 99 drivers/rtc/rtc-lpc24xx.c tm->tm_sec = CT0_SECS(ct0); tm 100 drivers/rtc/rtc-lpc24xx.c tm->tm_min = CT0_MINS(ct0); tm 101 drivers/rtc/rtc-lpc24xx.c tm->tm_hour = CT0_HOURS(ct0); tm 102 drivers/rtc/rtc-lpc24xx.c tm->tm_wday = CT0_DOW(ct0); tm 103 drivers/rtc/rtc-lpc24xx.c tm->tm_mon = CT1_MONTH(ct1); tm 104 drivers/rtc/rtc-lpc24xx.c tm->tm_mday = CT1_DOM(ct1); tm 105 drivers/rtc/rtc-lpc24xx.c tm->tm_year = CT1_YEAR(ct1); tm 106 drivers/rtc/rtc-lpc24xx.c tm->tm_yday = CT2_DOY(ct2); tm 114 drivers/rtc/rtc-lpc24xx.c struct rtc_time *tm = &wkalrm->time; tm 116 drivers/rtc/rtc-lpc24xx.c tm->tm_sec = rtc_readl(rtc, LPC24XX_ALSEC); tm 117 drivers/rtc/rtc-lpc24xx.c tm->tm_min = rtc_readl(rtc, LPC24XX_ALMIN); tm 118 drivers/rtc/rtc-lpc24xx.c tm->tm_hour = rtc_readl(rtc, LPC24XX_ALHOUR); tm 119 drivers/rtc/rtc-lpc24xx.c tm->tm_mday = rtc_readl(rtc, LPC24XX_ALDOM); tm 120 drivers/rtc/rtc-lpc24xx.c tm->tm_wday = rtc_readl(rtc, LPC24XX_ALDOW); tm 121 drivers/rtc/rtc-lpc24xx.c tm->tm_yday = rtc_readl(rtc, LPC24XX_ALDOY); tm 122 drivers/rtc/rtc-lpc24xx.c tm->tm_mon = rtc_readl(rtc, LPC24XX_ALMON); tm 123 drivers/rtc/rtc-lpc24xx.c tm->tm_year = rtc_readl(rtc, LPC24XX_ALYEAR); tm 134 drivers/rtc/rtc-lpc24xx.c struct rtc_time *tm = &wkalrm->time; tm 139 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALSEC, tm->tm_sec); tm 140 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALMIN, tm->tm_min); tm 141 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALHOUR, tm->tm_hour); tm 142 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALDOM, tm->tm_mday); tm 143 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALDOW, tm->tm_wday); tm 144 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALDOY, tm->tm_yday); tm 145 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALMON, tm->tm_mon); tm 146 drivers/rtc/rtc-lpc24xx.c rtc_writel(rtc, LPC24XX_ALYEAR, tm->tm_year); tm 197 drivers/rtc/rtc-m41t80.c static int m41t80_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 219 drivers/rtc/rtc-m41t80.c tm->tm_sec = bcd2bin(buf[M41T80_REG_SEC] & 0x7f); tm 220 drivers/rtc/rtc-m41t80.c tm->tm_min = bcd2bin(buf[M41T80_REG_MIN] & 0x7f); tm 221 drivers/rtc/rtc-m41t80.c tm->tm_hour = bcd2bin(buf[M41T80_REG_HOUR] & 0x3f); tm 222 drivers/rtc/rtc-m41t80.c tm->tm_mday = bcd2bin(buf[M41T80_REG_DAY] & 0x3f); tm 223 drivers/rtc/rtc-m41t80.c tm->tm_wday = buf[M41T80_REG_WDAY] & 0x07; tm 224 drivers/rtc/rtc-m41t80.c tm->tm_mon = bcd2bin(buf[M41T80_REG_MON] & 0x1f) - 1; tm 227 drivers/rtc/rtc-m41t80.c tm->tm_year = bcd2bin(buf[M41T80_REG_YEAR]) + 100; tm 231 drivers/rtc/rtc-m41t80.c static int m41t80_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 238 drivers/rtc/rtc-m41t80.c if (tm->tm_year < 100 || tm->tm_year > 199) tm 242 drivers/rtc/rtc-m41t80.c buf[M41T80_REG_SEC] = bin2bcd(tm->tm_sec); tm 243 drivers/rtc/rtc-m41t80.c buf[M41T80_REG_MIN] = bin2bcd(tm->tm_min); tm 244 drivers/rtc/rtc-m41t80.c buf[M41T80_REG_HOUR] = bin2bcd(tm->tm_hour); tm 245 drivers/rtc/rtc-m41t80.c buf[M41T80_REG_DAY] = bin2bcd(tm->tm_mday); tm 246 drivers/rtc/rtc-m41t80.c buf[M41T80_REG_MON] = bin2bcd(tm->tm_mon + 1); tm 247 drivers/rtc/rtc-m41t80.c buf[M41T80_REG_YEAR] = bin2bcd(tm->tm_year - 100); tm 248 drivers/rtc/rtc-m41t80.c buf[M41T80_REG_WDAY] = tm->tm_wday; tm 877 drivers/rtc/rtc-m41t80.c struct rtc_time tm; tm 939 drivers/rtc/rtc-m41t80.c m41t80_rtc_read_time(&client->dev, &tm); tm 941 drivers/rtc/rtc-m41t80.c dev_info(&client->dev, "Power Down at %ptR\n", &tm); tm 45 drivers/rtc/rtc-m41t93.c static int m41t93_set_time(struct device *dev, struct rtc_time *tm) tm 54 drivers/rtc/rtc-m41t93.c "write", tm->tm_sec, tm->tm_min, tm 55 drivers/rtc/rtc-m41t93.c tm->tm_hour, tm->tm_mday, tm 56 drivers/rtc/rtc-m41t93.c tm->tm_mon, tm->tm_year, tm->tm_wday); tm 58 drivers/rtc/rtc-m41t93.c if (tm->tm_year < 100) { tm 88 drivers/rtc/rtc-m41t93.c data[M41T93_REG_ST_SEC] = bin2bcd(tm->tm_sec); tm 89 drivers/rtc/rtc-m41t93.c data[M41T93_REG_MIN] = bin2bcd(tm->tm_min); tm 90 drivers/rtc/rtc-m41t93.c data[M41T93_REG_CENT_HOUR] = bin2bcd(tm->tm_hour) | tm 91 drivers/rtc/rtc-m41t93.c ((tm->tm_year/100-1) << 6); tm 92 drivers/rtc/rtc-m41t93.c data[M41T93_REG_DAY] = bin2bcd(tm->tm_mday); tm 93 drivers/rtc/rtc-m41t93.c data[M41T93_REG_WDAY] = bin2bcd(tm->tm_wday + 1); tm 94 drivers/rtc/rtc-m41t93.c data[M41T93_REG_MON] = bin2bcd(tm->tm_mon + 1); tm 95 drivers/rtc/rtc-m41t93.c data[M41T93_REG_YEAR] = bin2bcd(tm->tm_year % 100); tm 101 drivers/rtc/rtc-m41t93.c static int m41t93_get_time(struct device *dev, struct rtc_time *tm) tm 143 drivers/rtc/rtc-m41t93.c tm->tm_sec = bcd2bin(buf[M41T93_REG_ST_SEC]); tm 144 drivers/rtc/rtc-m41t93.c tm->tm_min = bcd2bin(buf[M41T93_REG_MIN]); tm 145 drivers/rtc/rtc-m41t93.c tm->tm_hour = bcd2bin(buf[M41T93_REG_CENT_HOUR] & 0x3f); tm 146 drivers/rtc/rtc-m41t93.c tm->tm_mday = bcd2bin(buf[M41T93_REG_DAY]); tm 147 drivers/rtc/rtc-m41t93.c tm->tm_mon = bcd2bin(buf[M41T93_REG_MON]) - 1; tm 148 drivers/rtc/rtc-m41t93.c tm->tm_wday = bcd2bin(buf[M41T93_REG_WDAY] & 0x0f) - 1; tm 151 drivers/rtc/rtc-m41t93.c tm->tm_year = bcd2bin(buf[M41T93_REG_YEAR]) + century_after_1900 * 100; tm 155 drivers/rtc/rtc-m41t93.c "read", tm->tm_sec, tm->tm_min, tm 156 drivers/rtc/rtc-m41t93.c tm->tm_hour, tm->tm_mday, tm 157 drivers/rtc/rtc-m41t93.c tm->tm_mon, tm->tm_year, tm->tm_wday); tm 29 drivers/rtc/rtc-m41t94.c static int m41t94_set_time(struct device *dev, struct rtc_time *tm) tm 36 drivers/rtc/rtc-m41t94.c "write", tm->tm_sec, tm->tm_min, tm 37 drivers/rtc/rtc-m41t94.c tm->tm_hour, tm->tm_mday, tm 38 drivers/rtc/rtc-m41t94.c tm->tm_mon, tm->tm_year, tm->tm_wday); tm 41 drivers/rtc/rtc-m41t94.c buf[M41T94_REG_SECONDS] = bin2bcd(tm->tm_sec); tm 42 drivers/rtc/rtc-m41t94.c buf[M41T94_REG_MINUTES] = bin2bcd(tm->tm_min); tm 43 drivers/rtc/rtc-m41t94.c buf[M41T94_REG_HOURS] = bin2bcd(tm->tm_hour); tm 44 drivers/rtc/rtc-m41t94.c buf[M41T94_REG_WDAY] = bin2bcd(tm->tm_wday + 1); tm 45 drivers/rtc/rtc-m41t94.c buf[M41T94_REG_DAY] = bin2bcd(tm->tm_mday); tm 46 drivers/rtc/rtc-m41t94.c buf[M41T94_REG_MONTH] = bin2bcd(tm->tm_mon + 1); tm 49 drivers/rtc/rtc-m41t94.c if (tm->tm_year >= 100) tm 51 drivers/rtc/rtc-m41t94.c buf[M41T94_REG_YEAR] = bin2bcd(tm->tm_year % 100); tm 56 drivers/rtc/rtc-m41t94.c static int m41t94_read_time(struct device *dev, struct rtc_time *tm) tm 82 drivers/rtc/rtc-m41t94.c tm->tm_sec = bcd2bin(spi_w8r8(spi, M41T94_REG_SECONDS)); tm 83 drivers/rtc/rtc-m41t94.c tm->tm_min = bcd2bin(spi_w8r8(spi, M41T94_REG_MINUTES)); tm 85 drivers/rtc/rtc-m41t94.c tm->tm_hour = bcd2bin(hour & 0x3f); tm 86 drivers/rtc/rtc-m41t94.c tm->tm_wday = bcd2bin(spi_w8r8(spi, M41T94_REG_WDAY)) - 1; tm 87 drivers/rtc/rtc-m41t94.c tm->tm_mday = bcd2bin(spi_w8r8(spi, M41T94_REG_DAY)); tm 88 drivers/rtc/rtc-m41t94.c tm->tm_mon = bcd2bin(spi_w8r8(spi, M41T94_REG_MONTH)) - 1; tm 89 drivers/rtc/rtc-m41t94.c tm->tm_year = bcd2bin(spi_w8r8(spi, M41T94_REG_YEAR)); tm 91 drivers/rtc/rtc-m41t94.c tm->tm_year += 100; tm 95 drivers/rtc/rtc-m41t94.c "read", tm->tm_sec, tm->tm_min, tm 96 drivers/rtc/rtc-m41t94.c tm->tm_hour, tm->tm_mday, tm 97 drivers/rtc/rtc-m41t94.c tm->tm_mon, tm->tm_year, tm->tm_wday); tm 44 drivers/rtc/rtc-m48t35.c static int m48t35_read_time(struct device *dev, struct rtc_time *tm) tm 58 drivers/rtc/rtc-m48t35.c tm->tm_sec = readb(&priv->reg->sec); tm 59 drivers/rtc/rtc-m48t35.c tm->tm_min = readb(&priv->reg->min); tm 60 drivers/rtc/rtc-m48t35.c tm->tm_hour = readb(&priv->reg->hour); tm 61 drivers/rtc/rtc-m48t35.c tm->tm_mday = readb(&priv->reg->date); tm 62 drivers/rtc/rtc-m48t35.c tm->tm_mon = readb(&priv->reg->month); tm 63 drivers/rtc/rtc-m48t35.c tm->tm_year = readb(&priv->reg->year); tm 67 drivers/rtc/rtc-m48t35.c tm->tm_sec = bcd2bin(tm->tm_sec); tm 68 drivers/rtc/rtc-m48t35.c tm->tm_min = bcd2bin(tm->tm_min); tm 69 drivers/rtc/rtc-m48t35.c tm->tm_hour = bcd2bin(tm->tm_hour); tm 70 drivers/rtc/rtc-m48t35.c tm->tm_mday = bcd2bin(tm->tm_mday); tm 71 drivers/rtc/rtc-m48t35.c tm->tm_mon = bcd2bin(tm->tm_mon); tm 72 drivers/rtc/rtc-m48t35.c tm->tm_year = bcd2bin(tm->tm_year); tm 78 drivers/rtc/rtc-m48t35.c tm->tm_year += 70; tm 79 drivers/rtc/rtc-m48t35.c if (tm->tm_year <= 69) tm 80 drivers/rtc/rtc-m48t35.c tm->tm_year += 100; tm 82 drivers/rtc/rtc-m48t35.c tm->tm_mon--; tm 86 drivers/rtc/rtc-m48t35.c static int m48t35_set_time(struct device *dev, struct rtc_time *tm) tm 93 drivers/rtc/rtc-m48t35.c yrs = tm->tm_year + 1900; tm 94 drivers/rtc/rtc-m48t35.c mon = tm->tm_mon + 1; /* tm_mon starts at zero */ tm 95 drivers/rtc/rtc-m48t35.c day = tm->tm_mday; tm 96 drivers/rtc/rtc-m48t35.c hrs = tm->tm_hour; tm 97 drivers/rtc/rtc-m48t35.c min = tm->tm_min; tm 98 drivers/rtc/rtc-m48t35.c sec = tm->tm_sec; tm 63 drivers/rtc/rtc-m48t59.c static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 74 drivers/rtc/rtc-m48t59.c tm->tm_year = bcd2bin(M48T59_READ(M48T59_YEAR)); tm 76 drivers/rtc/rtc-m48t59.c tm->tm_mon = bcd2bin(M48T59_READ(M48T59_MONTH)) - 1; tm 77 drivers/rtc/rtc-m48t59.c tm->tm_mday = bcd2bin(M48T59_READ(M48T59_MDAY)); tm 83 drivers/rtc/rtc-m48t59.c tm->tm_year += 100; /* one century */ tm 87 drivers/rtc/rtc-m48t59.c tm->tm_year += 68; tm 90 drivers/rtc/rtc-m48t59.c tm->tm_wday = bcd2bin(val & 0x07); tm 91 drivers/rtc/rtc-m48t59.c tm->tm_hour = bcd2bin(M48T59_READ(M48T59_HOUR) & 0x3F); tm 92 drivers/rtc/rtc-m48t59.c tm->tm_min = bcd2bin(M48T59_READ(M48T59_MIN) & 0x7F); tm 93 drivers/rtc/rtc-m48t59.c tm->tm_sec = bcd2bin(M48T59_READ(M48T59_SEC) & 0x7F); tm 99 drivers/rtc/rtc-m48t59.c dev_dbg(dev, "RTC read time %ptR\n", tm); tm 103 drivers/rtc/rtc-m48t59.c static int m48t59_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 109 drivers/rtc/rtc-m48t59.c int year = tm->tm_year; tm 117 drivers/rtc/rtc-m48t59.c year + 1900, tm->tm_mon, tm->tm_mday, tm 118 drivers/rtc/rtc-m48t59.c tm->tm_hour, tm->tm_min, tm->tm_sec); tm 127 drivers/rtc/rtc-m48t59.c M48T59_WRITE((bin2bcd(tm->tm_sec) & 0x7F), M48T59_SEC); tm 128 drivers/rtc/rtc-m48t59.c M48T59_WRITE((bin2bcd(tm->tm_min) & 0x7F), M48T59_MIN); tm 129 drivers/rtc/rtc-m48t59.c M48T59_WRITE((bin2bcd(tm->tm_hour) & 0x3F), M48T59_HOUR); tm 130 drivers/rtc/rtc-m48t59.c M48T59_WRITE((bin2bcd(tm->tm_mday) & 0x3F), M48T59_MDAY); tm 132 drivers/rtc/rtc-m48t59.c M48T59_WRITE((bin2bcd(tm->tm_mon + 1) & 0x1F), M48T59_MONTH); tm 137 drivers/rtc/rtc-m48t59.c val |= (bin2bcd(tm->tm_wday) & 0x07); tm 153 drivers/rtc/rtc-m48t59.c struct rtc_time *tm = &alrm->time; tm 165 drivers/rtc/rtc-m48t59.c tm->tm_year = bcd2bin(M48T59_READ(M48T59_YEAR)); tm 168 drivers/rtc/rtc-m48t59.c tm->tm_year += 68; tm 171 drivers/rtc/rtc-m48t59.c tm->tm_mon = bcd2bin(M48T59_READ(M48T59_MONTH)) - 1; tm 175 drivers/rtc/rtc-m48t59.c tm->tm_year += 100; /* one century */ tm 177 drivers/rtc/rtc-m48t59.c tm->tm_mday = bcd2bin(M48T59_READ(M48T59_ALARM_DATE)); tm 178 drivers/rtc/rtc-m48t59.c tm->tm_hour = bcd2bin(M48T59_READ(M48T59_ALARM_HOUR)); tm 179 drivers/rtc/rtc-m48t59.c tm->tm_min = bcd2bin(M48T59_READ(M48T59_ALARM_MIN)); tm 180 drivers/rtc/rtc-m48t59.c tm->tm_sec = bcd2bin(M48T59_READ(M48T59_ALARM_SEC)); tm 186 drivers/rtc/rtc-m48t59.c dev_dbg(dev, "RTC read alarm time %ptR\n", tm); tm 187 drivers/rtc/rtc-m48t59.c return rtc_valid_tm(tm); tm 197 drivers/rtc/rtc-m48t59.c struct rtc_time *tm = &alrm->time; tm 200 drivers/rtc/rtc-m48t59.c int year = tm->tm_year; tm 217 drivers/rtc/rtc-m48t59.c mday = tm->tm_mday; tm 222 drivers/rtc/rtc-m48t59.c hour = tm->tm_hour; tm 225 drivers/rtc/rtc-m48t59.c min = tm->tm_min; tm 228 drivers/rtc/rtc-m48t59.c sec = tm->tm_sec; tm 245 drivers/rtc/rtc-m48t59.c year + 1900, tm->tm_mon, tm->tm_mday, tm 246 drivers/rtc/rtc-m48t59.c tm->tm_hour, tm->tm_min, tm->tm_sec); tm 66 drivers/rtc/rtc-m48t86.c static int m48t86_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 74 drivers/rtc/rtc-m48t86.c tm->tm_sec = m48t86_readb(dev, M48T86_SEC); tm 75 drivers/rtc/rtc-m48t86.c tm->tm_min = m48t86_readb(dev, M48T86_MIN); tm 76 drivers/rtc/rtc-m48t86.c tm->tm_hour = m48t86_readb(dev, M48T86_HOUR) & 0x3f; tm 77 drivers/rtc/rtc-m48t86.c tm->tm_mday = m48t86_readb(dev, M48T86_DOM); tm 79 drivers/rtc/rtc-m48t86.c tm->tm_mon = m48t86_readb(dev, M48T86_MONTH) - 1; tm 80 drivers/rtc/rtc-m48t86.c tm->tm_year = m48t86_readb(dev, M48T86_YEAR) + 100; tm 81 drivers/rtc/rtc-m48t86.c tm->tm_wday = m48t86_readb(dev, M48T86_DOW); tm 84 drivers/rtc/rtc-m48t86.c tm->tm_sec = bcd2bin(m48t86_readb(dev, M48T86_SEC)); tm 85 drivers/rtc/rtc-m48t86.c tm->tm_min = bcd2bin(m48t86_readb(dev, M48T86_MIN)); tm 86 drivers/rtc/rtc-m48t86.c tm->tm_hour = bcd2bin(m48t86_readb(dev, M48T86_HOUR) & tm 88 drivers/rtc/rtc-m48t86.c tm->tm_mday = bcd2bin(m48t86_readb(dev, M48T86_DOM)); tm 90 drivers/rtc/rtc-m48t86.c tm->tm_mon = bcd2bin(m48t86_readb(dev, M48T86_MONTH)) - 1; tm 91 drivers/rtc/rtc-m48t86.c tm->tm_year = bcd2bin(m48t86_readb(dev, M48T86_YEAR)) + 100; tm 92 drivers/rtc/rtc-m48t86.c tm->tm_wday = bcd2bin(m48t86_readb(dev, M48T86_DOW)); tm 98 drivers/rtc/rtc-m48t86.c tm->tm_hour += 12; tm 103 drivers/rtc/rtc-m48t86.c static int m48t86_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 115 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, tm->tm_sec, M48T86_SEC); tm 116 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, tm->tm_min, M48T86_MIN); tm 117 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, tm->tm_hour, M48T86_HOUR); tm 118 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, tm->tm_mday, M48T86_DOM); tm 119 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, tm->tm_mon + 1, M48T86_MONTH); tm 120 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, tm->tm_year % 100, M48T86_YEAR); tm 121 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, tm->tm_wday, M48T86_DOW); tm 124 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, bin2bcd(tm->tm_sec), M48T86_SEC); tm 125 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, bin2bcd(tm->tm_min), M48T86_MIN); tm 126 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, bin2bcd(tm->tm_hour), M48T86_HOUR); tm 127 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, bin2bcd(tm->tm_mday), M48T86_DOM); tm 128 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, bin2bcd(tm->tm_mon + 1), M48T86_MONTH); tm 129 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, bin2bcd(tm->tm_year % 100), M48T86_YEAR); tm 130 drivers/rtc/rtc-m48t86.c m48t86_writeb(dev, bin2bcd(tm->tm_wday), M48T86_DOW); tm 142 drivers/rtc/rtc-max6900.c static int max6900_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 152 drivers/rtc/rtc-max6900.c tm->tm_sec = bcd2bin(regs[MAX6900_REG_SC]); tm 153 drivers/rtc/rtc-max6900.c tm->tm_min = bcd2bin(regs[MAX6900_REG_MN]); tm 154 drivers/rtc/rtc-max6900.c tm->tm_hour = bcd2bin(regs[MAX6900_REG_HR] & 0x3f); tm 155 drivers/rtc/rtc-max6900.c tm->tm_mday = bcd2bin(regs[MAX6900_REG_DT]); tm 156 drivers/rtc/rtc-max6900.c tm->tm_mon = bcd2bin(regs[MAX6900_REG_MO]) - 1; tm 157 drivers/rtc/rtc-max6900.c tm->tm_year = bcd2bin(regs[MAX6900_REG_YR]) + tm 159 drivers/rtc/rtc-max6900.c tm->tm_wday = bcd2bin(regs[MAX6900_REG_DW]); tm 169 drivers/rtc/rtc-max6900.c static int max6900_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 179 drivers/rtc/rtc-max6900.c regs[MAX6900_REG_SC] = bin2bcd(tm->tm_sec); tm 180 drivers/rtc/rtc-max6900.c regs[MAX6900_REG_MN] = bin2bcd(tm->tm_min); tm 181 drivers/rtc/rtc-max6900.c regs[MAX6900_REG_HR] = bin2bcd(tm->tm_hour); tm 182 drivers/rtc/rtc-max6900.c regs[MAX6900_REG_DT] = bin2bcd(tm->tm_mday); tm 183 drivers/rtc/rtc-max6900.c regs[MAX6900_REG_MO] = bin2bcd(tm->tm_mon + 1); tm 184 drivers/rtc/rtc-max6900.c regs[MAX6900_REG_DW] = bin2bcd(tm->tm_wday); tm 185 drivers/rtc/rtc-max6900.c regs[MAX6900_REG_YR] = bin2bcd(tm->tm_year % 100); tm 186 drivers/rtc/rtc-max6900.c regs[MAX6900_REG_CENTURY] = bin2bcd((tm->tm_year + 1900) / 100); tm 256 drivers/rtc/rtc-max77686.c static void max77686_rtc_data_to_tm(u8 *data, struct rtc_time *tm, tm 261 drivers/rtc/rtc-max77686.c tm->tm_sec = data[RTC_SEC] & mask; tm 262 drivers/rtc/rtc-max77686.c tm->tm_min = data[RTC_MIN] & mask; tm 264 drivers/rtc/rtc-max77686.c tm->tm_hour = data[RTC_HOUR] & 0x1f; tm 266 drivers/rtc/rtc-max77686.c tm->tm_hour = data[RTC_HOUR] & 0x0f; tm 268 drivers/rtc/rtc-max77686.c tm->tm_hour += 12; tm 272 drivers/rtc/rtc-max77686.c tm->tm_wday = ffs(data[RTC_WEEKDAY] & mask) - 1; tm 273 drivers/rtc/rtc-max77686.c tm->tm_mday = data[RTC_DATE] & 0x1f; tm 274 drivers/rtc/rtc-max77686.c tm->tm_mon = (data[RTC_MONTH] & 0x0f) - 1; tm 275 drivers/rtc/rtc-max77686.c tm->tm_year = data[RTC_YEAR] & mask; tm 276 drivers/rtc/rtc-max77686.c tm->tm_yday = 0; tm 277 drivers/rtc/rtc-max77686.c tm->tm_isdst = 0; tm 284 drivers/rtc/rtc-max77686.c tm->tm_year += 100; tm 287 drivers/rtc/rtc-max77686.c static int max77686_rtc_tm_to_data(struct rtc_time *tm, u8 *data, tm 290 drivers/rtc/rtc-max77686.c data[RTC_SEC] = tm->tm_sec; tm 291 drivers/rtc/rtc-max77686.c data[RTC_MIN] = tm->tm_min; tm 292 drivers/rtc/rtc-max77686.c data[RTC_HOUR] = tm->tm_hour; tm 293 drivers/rtc/rtc-max77686.c data[RTC_WEEKDAY] = 1 << tm->tm_wday; tm 294 drivers/rtc/rtc-max77686.c data[RTC_DATE] = tm->tm_mday; tm 295 drivers/rtc/rtc-max77686.c data[RTC_MONTH] = tm->tm_mon + 1; tm 298 drivers/rtc/rtc-max77686.c data[RTC_YEAR] = tm->tm_year; tm 302 drivers/rtc/rtc-max77686.c data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; tm 304 drivers/rtc/rtc-max77686.c if (tm->tm_year < 100) { tm 306 drivers/rtc/rtc-max77686.c 1900 + tm->tm_year); tm 339 drivers/rtc/rtc-max77686.c static int max77686_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 359 drivers/rtc/rtc-max77686.c max77686_rtc_data_to_tm(data, tm, info); tm 366 drivers/rtc/rtc-max77686.c static int max77686_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 372 drivers/rtc/rtc-max77686.c ret = max77686_rtc_tm_to_data(tm, data, info); tm 469 drivers/rtc/rtc-max77686.c struct rtc_time tm; tm 496 drivers/rtc/rtc-max77686.c max77686_rtc_data_to_tm(data, &tm, info); tm 519 drivers/rtc/rtc-max77686.c struct rtc_time tm; tm 540 drivers/rtc/rtc-max77686.c max77686_rtc_data_to_tm(data, &tm, info); tm 58 drivers/rtc/rtc-max8907.c static void regs_to_tm(u8 *regs, struct rtc_time *tm) tm 60 drivers/rtc/rtc-max8907.c tm->tm_year = bcd2bin(regs[RTC_YEAR2]) * 100 + tm 62 drivers/rtc/rtc-max8907.c tm->tm_mon = bcd2bin(regs[RTC_MONTH] & 0x1f) - 1; tm 63 drivers/rtc/rtc-max8907.c tm->tm_mday = bcd2bin(regs[RTC_DATE] & 0x3f); tm 64 drivers/rtc/rtc-max8907.c tm->tm_wday = (regs[RTC_WEEKDAY] & 0x07); tm 66 drivers/rtc/rtc-max8907.c tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x01f); tm 67 drivers/rtc/rtc-max8907.c if (tm->tm_hour == 12) tm 68 drivers/rtc/rtc-max8907.c tm->tm_hour = 0; tm 70 drivers/rtc/rtc-max8907.c tm->tm_hour += 12; tm 72 drivers/rtc/rtc-max8907.c tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x03f); tm 74 drivers/rtc/rtc-max8907.c tm->tm_min = bcd2bin(regs[RTC_MIN] & 0x7f); tm 75 drivers/rtc/rtc-max8907.c tm->tm_sec = bcd2bin(regs[RTC_SEC] & 0x7f); tm 78 drivers/rtc/rtc-max8907.c static void tm_to_regs(struct rtc_time *tm, u8 *regs) tm 82 drivers/rtc/rtc-max8907.c high = (tm->tm_year + 1900) / 100; tm 83 drivers/rtc/rtc-max8907.c low = tm->tm_year % 100; tm 86 drivers/rtc/rtc-max8907.c regs[RTC_MONTH] = bin2bcd(tm->tm_mon + 1); tm 87 drivers/rtc/rtc-max8907.c regs[RTC_DATE] = bin2bcd(tm->tm_mday); tm 88 drivers/rtc/rtc-max8907.c regs[RTC_WEEKDAY] = tm->tm_wday; tm 89 drivers/rtc/rtc-max8907.c regs[RTC_HOUR] = bin2bcd(tm->tm_hour); tm 90 drivers/rtc/rtc-max8907.c regs[RTC_MIN] = bin2bcd(tm->tm_min); tm 91 drivers/rtc/rtc-max8907.c regs[RTC_SEC] = bin2bcd(tm->tm_sec); tm 94 drivers/rtc/rtc-max8907.c static int max8907_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 105 drivers/rtc/rtc-max8907.c regs_to_tm(regs, tm); tm 110 drivers/rtc/rtc-max8907.c static int max8907_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 115 drivers/rtc/rtc-max8907.c tm_to_regs(tm, regs); tm 82 drivers/rtc/rtc-max8925.c static int tm_calc(struct rtc_time *tm, unsigned char *buf, int len) tm 86 drivers/rtc/rtc-max8925.c tm->tm_year = (buf[RTC_YEAR2] >> 4) * 1000 tm 90 drivers/rtc/rtc-max8925.c tm->tm_year -= 1900; tm 91 drivers/rtc/rtc-max8925.c tm->tm_mon = ((buf[RTC_MONTH] >> 4) & 0x01) * 10 tm 93 drivers/rtc/rtc-max8925.c tm->tm_mday = ((buf[RTC_DATE] >> 4) & 0x03) * 10 tm 95 drivers/rtc/rtc-max8925.c tm->tm_wday = buf[RTC_WEEKDAY] & 0x07; tm 97 drivers/rtc/rtc-max8925.c tm->tm_hour = ((buf[RTC_HOUR] >> 4) & 0x1) * 10 tm 100 drivers/rtc/rtc-max8925.c tm->tm_hour += 12; tm 102 drivers/rtc/rtc-max8925.c tm->tm_hour = ((buf[RTC_HOUR] >> 4) & 0x03) * 10 tm 104 drivers/rtc/rtc-max8925.c tm->tm_min = ((buf[RTC_MIN] >> 4) & 0x7) * 10 tm 106 drivers/rtc/rtc-max8925.c tm->tm_sec = ((buf[RTC_SEC] >> 4) & 0x7) * 10 tm 111 drivers/rtc/rtc-max8925.c static int data_calc(unsigned char *buf, struct rtc_time *tm, int len) tm 118 drivers/rtc/rtc-max8925.c high = (tm->tm_year + 1900) / 1000; tm 119 drivers/rtc/rtc-max8925.c low = (tm->tm_year + 1900) / 100; tm 122 drivers/rtc/rtc-max8925.c high = (tm->tm_year + 1900) / 10; tm 123 drivers/rtc/rtc-max8925.c low = tm->tm_year + 1900; tm 127 drivers/rtc/rtc-max8925.c high = tm->tm_mon / 10; tm 128 drivers/rtc/rtc-max8925.c low = tm->tm_mon; tm 131 drivers/rtc/rtc-max8925.c high = tm->tm_mday / 10; tm 132 drivers/rtc/rtc-max8925.c low = tm->tm_mday; tm 135 drivers/rtc/rtc-max8925.c buf[RTC_WEEKDAY] = tm->tm_wday; tm 136 drivers/rtc/rtc-max8925.c high = tm->tm_hour / 10; tm 137 drivers/rtc/rtc-max8925.c low = tm->tm_hour; tm 140 drivers/rtc/rtc-max8925.c high = tm->tm_min / 10; tm 141 drivers/rtc/rtc-max8925.c low = tm->tm_min; tm 144 drivers/rtc/rtc-max8925.c high = tm->tm_sec / 10; tm 145 drivers/rtc/rtc-max8925.c low = tm->tm_sec; tm 151 drivers/rtc/rtc-max8925.c static int max8925_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 160 drivers/rtc/rtc-max8925.c ret = tm_calc(tm, buf, TIME_NUM); tm 165 drivers/rtc/rtc-max8925.c static int max8925_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 171 drivers/rtc/rtc-max8925.c ret = data_calc(buf, tm, TIME_NUM); tm 74 drivers/rtc/rtc-max8997.c static void max8997_rtc_data_to_tm(u8 *data, struct rtc_time *tm, tm 77 drivers/rtc/rtc-max8997.c tm->tm_sec = data[RTC_SEC] & 0x7f; tm 78 drivers/rtc/rtc-max8997.c tm->tm_min = data[RTC_MIN] & 0x7f; tm 80 drivers/rtc/rtc-max8997.c tm->tm_hour = data[RTC_HOUR] & 0x1f; tm 82 drivers/rtc/rtc-max8997.c tm->tm_hour = data[RTC_HOUR] & 0x0f; tm 84 drivers/rtc/rtc-max8997.c tm->tm_hour += 12; tm 87 drivers/rtc/rtc-max8997.c tm->tm_wday = fls(data[RTC_WEEKDAY] & 0x7f) - 1; tm 88 drivers/rtc/rtc-max8997.c tm->tm_mday = data[RTC_DATE] & 0x1f; tm 89 drivers/rtc/rtc-max8997.c tm->tm_mon = (data[RTC_MONTH] & 0x0f) - 1; tm 90 drivers/rtc/rtc-max8997.c tm->tm_year = (data[RTC_YEAR] & 0x7f) + 100; tm 91 drivers/rtc/rtc-max8997.c tm->tm_yday = 0; tm 92 drivers/rtc/rtc-max8997.c tm->tm_isdst = 0; tm 95 drivers/rtc/rtc-max8997.c static int max8997_rtc_tm_to_data(struct rtc_time *tm, u8 *data) tm 97 drivers/rtc/rtc-max8997.c data[RTC_SEC] = tm->tm_sec; tm 98 drivers/rtc/rtc-max8997.c data[RTC_MIN] = tm->tm_min; tm 99 drivers/rtc/rtc-max8997.c data[RTC_HOUR] = tm->tm_hour; tm 100 drivers/rtc/rtc-max8997.c data[RTC_WEEKDAY] = 1 << tm->tm_wday; tm 101 drivers/rtc/rtc-max8997.c data[RTC_DATE] = tm->tm_mday; tm 102 drivers/rtc/rtc-max8997.c data[RTC_MONTH] = tm->tm_mon + 1; tm 103 drivers/rtc/rtc-max8997.c data[RTC_YEAR] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; tm 105 drivers/rtc/rtc-max8997.c if (tm->tm_year < 100) { tm 107 drivers/rtc/rtc-max8997.c 1900 + tm->tm_year); tm 132 drivers/rtc/rtc-max8997.c static int max8997_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 148 drivers/rtc/rtc-max8997.c max8997_rtc_data_to_tm(data, tm, info->rtc_24hr_mode); tm 153 drivers/rtc/rtc-max8997.c static int max8997_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 159 drivers/rtc/rtc-max8997.c ret = max8997_rtc_tm_to_data(tm, data); tm 75 drivers/rtc/rtc-max8998.c static void max8998_data_to_tm(u8 *data, struct rtc_time *tm) tm 77 drivers/rtc/rtc-max8998.c tm->tm_sec = bcd2bin(data[RTC_SEC]); tm 78 drivers/rtc/rtc-max8998.c tm->tm_min = bcd2bin(data[RTC_MIN]); tm 80 drivers/rtc/rtc-max8998.c tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x1f); tm 82 drivers/rtc/rtc-max8998.c tm->tm_hour += 12; tm 84 drivers/rtc/rtc-max8998.c tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3f); tm 86 drivers/rtc/rtc-max8998.c tm->tm_wday = data[RTC_WEEKDAY] & 0x07; tm 87 drivers/rtc/rtc-max8998.c tm->tm_mday = bcd2bin(data[RTC_DATE]); tm 88 drivers/rtc/rtc-max8998.c tm->tm_mon = bcd2bin(data[RTC_MONTH]); tm 89 drivers/rtc/rtc-max8998.c tm->tm_year = bcd2bin(data[RTC_YEAR1]) + bcd2bin(data[RTC_YEAR2]) * 100; tm 90 drivers/rtc/rtc-max8998.c tm->tm_year -= 1900; tm 93 drivers/rtc/rtc-max8998.c static void max8998_tm_to_data(struct rtc_time *tm, u8 *data) tm 95 drivers/rtc/rtc-max8998.c data[RTC_SEC] = bin2bcd(tm->tm_sec); tm 96 drivers/rtc/rtc-max8998.c data[RTC_MIN] = bin2bcd(tm->tm_min); tm 97 drivers/rtc/rtc-max8998.c data[RTC_HOUR] = bin2bcd(tm->tm_hour); tm 98 drivers/rtc/rtc-max8998.c data[RTC_WEEKDAY] = tm->tm_wday; tm 99 drivers/rtc/rtc-max8998.c data[RTC_DATE] = bin2bcd(tm->tm_mday); tm 100 drivers/rtc/rtc-max8998.c data[RTC_MONTH] = bin2bcd(tm->tm_mon); tm 101 drivers/rtc/rtc-max8998.c data[RTC_YEAR1] = bin2bcd(tm->tm_year % 100); tm 102 drivers/rtc/rtc-max8998.c data[RTC_YEAR2] = bin2bcd((tm->tm_year + 1900) / 100); tm 105 drivers/rtc/rtc-max8998.c static int max8998_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 115 drivers/rtc/rtc-max8998.c max8998_data_to_tm(data, tm); tm 120 drivers/rtc/rtc-max8998.c static int max8998_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 126 drivers/rtc/rtc-max8998.c max8998_tm_to_data(tm, data); tm 60 drivers/rtc/rtc-mc13xxx.c static int mc13xxx_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 84 drivers/rtc/rtc-mc13xxx.c rtc_time64_to_tm((time64_t)days1 * SEC_PER_DAY + seconds, tm); tm 89 drivers/rtc/rtc-mc13xxx.c static int mc13xxx_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 96 drivers/rtc/rtc-mc13xxx.c days = div_s64_rem(rtc_tm_to_time64(tm), SEC_PER_DAY, &seconds); tm 21 drivers/rtc/rtc-meson-vrtc.c static int meson_vrtc_read_time(struct device *dev, struct rtc_time *tm) tm 27 drivers/rtc/rtc-meson-vrtc.c rtc_time64_to_tm(time.tv_sec, tm); tm 231 drivers/rtc/rtc-meson.c static int meson_rtc_gettime(struct device *dev, struct rtc_time *tm) tm 239 drivers/rtc/rtc-meson.c rtc_time64_to_tm(time, tm); tm 244 drivers/rtc/rtc-meson.c static int meson_rtc_settime(struct device *dev, struct rtc_time *tm) tm 248 drivers/rtc/rtc-meson.c return regmap_write(rtc->serial, RTC_COUNTER, rtc_tm_to_time64(tm)); tm 298 drivers/rtc/rtc-meson.c u32 tm; tm 363 drivers/rtc/rtc-meson.c ret = regmap_read(rtc->serial, RTC_COUNTER, &tm); tm 142 drivers/rtc/rtc-moxart.c static int moxart_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 150 drivers/rtc/rtc-moxart.c (((tm->tm_year - 100) / 10) << 4) | tm 151 drivers/rtc/rtc-moxart.c ((tm->tm_year - 100) % 10)); tm 154 drivers/rtc/rtc-moxart.c (((tm->tm_mon + 1) / 10) << 4) | tm 155 drivers/rtc/rtc-moxart.c ((tm->tm_mon + 1) % 10)); tm 158 drivers/rtc/rtc-moxart.c ((tm->tm_mday / 10) << 4) | tm 159 drivers/rtc/rtc-moxart.c (tm->tm_mday % 10)); tm 162 drivers/rtc/rtc-moxart.c ((tm->tm_hour / 10) << 4) | tm 163 drivers/rtc/rtc-moxart.c (tm->tm_hour % 10)); tm 166 drivers/rtc/rtc-moxart.c ((tm->tm_min / 10) << 4) | tm 167 drivers/rtc/rtc-moxart.c (tm->tm_min % 10)); tm 170 drivers/rtc/rtc-moxart.c ((tm->tm_sec / 10) << 4) | tm 171 drivers/rtc/rtc-moxart.c (tm->tm_sec % 10)); tm 179 drivers/rtc/rtc-moxart.c __func__, tm->tm_year, tm->tm_mon, tm->tm_mday, tm 180 drivers/rtc/rtc-moxart.c tm->tm_hour, tm->tm_min, tm->tm_sec); tm 185 drivers/rtc/rtc-moxart.c static int moxart_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 193 drivers/rtc/rtc-moxart.c tm->tm_sec = (((v & 0x70) >> 4) * 10) + (v & 0x0F); tm 196 drivers/rtc/rtc-moxart.c tm->tm_min = (((v & 0x70) >> 4) * 10) + (v & 0x0F); tm 200 drivers/rtc/rtc-moxart.c tm->tm_hour = (((v & 0x10) >> 4) * 10) + (v & 0x0F); tm 202 drivers/rtc/rtc-moxart.c tm->tm_hour += 12; tm 203 drivers/rtc/rtc-moxart.c if (tm->tm_hour >= 24) tm 204 drivers/rtc/rtc-moxart.c tm->tm_hour = 0; tm 207 drivers/rtc/rtc-moxart.c tm->tm_hour = (((v & 0x30) >> 4) * 10) + (v & 0x0F); tm 211 drivers/rtc/rtc-moxart.c tm->tm_mday = (((v & 0x30) >> 4) * 10) + (v & 0x0F); tm 214 drivers/rtc/rtc-moxart.c tm->tm_mon = (((v & 0x10) >> 4) * 10) + (v & 0x0F); tm 215 drivers/rtc/rtc-moxart.c tm->tm_mon--; tm 218 drivers/rtc/rtc-moxart.c tm->tm_year = (((v & 0xF0) >> 4) * 10) + (v & 0x0F); tm 219 drivers/rtc/rtc-moxart.c tm->tm_year += 100; tm 220 drivers/rtc/rtc-moxart.c if (tm->tm_year <= 69) tm 221 drivers/rtc/rtc-moxart.c tm->tm_year += 100; tm 224 drivers/rtc/rtc-moxart.c tm->tm_wday = (v & 0x0f) - 1; tm 225 drivers/rtc/rtc-moxart.c tm->tm_yday = day_of_year[tm->tm_mon]; tm 226 drivers/rtc/rtc-moxart.c tm->tm_yday += (tm->tm_mday - 1); tm 227 drivers/rtc/rtc-moxart.c if (tm->tm_mon >= 2) { tm 228 drivers/rtc/rtc-moxart.c if (!(tm->tm_year % 4) && (tm->tm_year % 100)) tm 229 drivers/rtc/rtc-moxart.c tm->tm_yday++; tm 232 drivers/rtc/rtc-moxart.c tm->tm_isdst = 0; tm 90 drivers/rtc/rtc-mpc5121.c struct rtc_time *tm) tm 92 drivers/rtc/rtc-mpc5121.c out_8(®s->second_set, tm->tm_sec); tm 93 drivers/rtc/rtc-mpc5121.c out_8(®s->minute_set, tm->tm_min); tm 94 drivers/rtc/rtc-mpc5121.c out_8(®s->hour_set, tm->tm_hour); tm 103 drivers/rtc/rtc-mpc5121.c static int mpc5121_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 114 drivers/rtc/rtc-mpc5121.c rtc_time_to_tm(now, tm); tm 120 drivers/rtc/rtc-mpc5121.c mpc5121_rtc_update_smh(regs, tm); tm 125 drivers/rtc/rtc-mpc5121.c static int mpc5121_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 136 drivers/rtc/rtc-mpc5121.c ret = rtc_tm_to_time(tm, &now); tm 144 drivers/rtc/rtc-mpc5121.c mpc5121_rtc_update_smh(regs, tm); tm 149 drivers/rtc/rtc-mpc5121.c static int mpc5200_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 155 drivers/rtc/rtc-mpc5121.c tm->tm_sec = in_8(®s->second); tm 156 drivers/rtc/rtc-mpc5121.c tm->tm_min = in_8(®s->minute); tm 160 drivers/rtc/rtc-mpc5121.c tm->tm_hour = (in_8(®s->hour) >> 1) + tm 163 drivers/rtc/rtc-mpc5121.c tm->tm_hour = in_8(®s->hour); tm 166 drivers/rtc/rtc-mpc5121.c tm->tm_mday = tmp & 0x1f; tm 167 drivers/rtc/rtc-mpc5121.c tm->tm_mon = in_8(®s->month) - 1; tm 168 drivers/rtc/rtc-mpc5121.c tm->tm_year = in_be16(®s->year) - 1900; tm 169 drivers/rtc/rtc-mpc5121.c tm->tm_wday = (tmp >> 5) % 7; tm 170 drivers/rtc/rtc-mpc5121.c tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); tm 171 drivers/rtc/rtc-mpc5121.c tm->tm_isdst = 0; tm 176 drivers/rtc/rtc-mpc5121.c static int mpc5200_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 181 drivers/rtc/rtc-mpc5121.c mpc5121_rtc_update_smh(regs, tm); tm 184 drivers/rtc/rtc-mpc5121.c out_8(®s->month_set, tm->tm_mon + 1); tm 185 drivers/rtc/rtc-mpc5121.c out_8(®s->weekday_set, tm->tm_wday ? tm->tm_wday : 7); tm 186 drivers/rtc/rtc-mpc5121.c out_8(®s->date_set, tm->tm_mday); tm 187 drivers/rtc/rtc-mpc5121.c out_be16(®s->year_set, tm->tm_year + 1900); tm 126 drivers/rtc/rtc-msm6242.c static int msm6242_read_time(struct device *dev, struct rtc_time *tm) tm 132 drivers/rtc/rtc-msm6242.c tm->tm_sec = msm6242_read(priv, MSM6242_SECOND10) * 10 + tm 134 drivers/rtc/rtc-msm6242.c tm->tm_min = msm6242_read(priv, MSM6242_MINUTE10) * 10 + tm 136 drivers/rtc/rtc-msm6242.c tm->tm_hour = (msm6242_read(priv, MSM6242_HOUR10) & tm 139 drivers/rtc/rtc-msm6242.c tm->tm_mday = msm6242_read(priv, MSM6242_DAY10) * 10 + tm 141 drivers/rtc/rtc-msm6242.c tm->tm_wday = msm6242_read(priv, MSM6242_WEEK); tm 142 drivers/rtc/rtc-msm6242.c tm->tm_mon = msm6242_read(priv, MSM6242_MONTH10) * 10 + tm 144 drivers/rtc/rtc-msm6242.c tm->tm_year = msm6242_read(priv, MSM6242_YEAR10) * 10 + tm 146 drivers/rtc/rtc-msm6242.c if (tm->tm_year <= 69) tm 147 drivers/rtc/rtc-msm6242.c tm->tm_year += 100; tm 152 drivers/rtc/rtc-msm6242.c if (!pm && tm->tm_hour == 12) tm 153 drivers/rtc/rtc-msm6242.c tm->tm_hour = 0; tm 154 drivers/rtc/rtc-msm6242.c else if (pm && tm->tm_hour != 12) tm 155 drivers/rtc/rtc-msm6242.c tm->tm_hour += 12; tm 163 drivers/rtc/rtc-msm6242.c static int msm6242_set_time(struct device *dev, struct rtc_time *tm) tm 169 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_sec / 10, MSM6242_SECOND10); tm 170 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_sec % 10, MSM6242_SECOND1); tm 171 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_min / 10, MSM6242_MINUTE10); tm 172 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_min % 10, MSM6242_MINUTE1); tm 174 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_hour / 10, MSM6242_HOUR10); tm 175 drivers/rtc/rtc-msm6242.c else if (tm->tm_hour >= 12) tm 176 drivers/rtc/rtc-msm6242.c msm6242_write(priv, MSM6242_HOUR10_PM + (tm->tm_hour - 12) / 10, tm 179 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_hour / 10, MSM6242_HOUR10); tm 180 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_hour % 10, MSM6242_HOUR1); tm 181 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_mday / 10, MSM6242_DAY10); tm 182 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_mday % 10, MSM6242_DAY1); tm 183 drivers/rtc/rtc-msm6242.c if (tm->tm_wday != -1) tm 184 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_wday, MSM6242_WEEK); tm 185 drivers/rtc/rtc-msm6242.c msm6242_write(priv, (tm->tm_mon + 1) / 10, MSM6242_MONTH10); tm 186 drivers/rtc/rtc-msm6242.c msm6242_write(priv, (tm->tm_mon + 1) % 10, MSM6242_MONTH1); tm 187 drivers/rtc/rtc-msm6242.c if (tm->tm_year >= 100) tm 188 drivers/rtc/rtc-msm6242.c tm->tm_year -= 100; tm 189 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_year / 10, MSM6242_YEAR10); tm 190 drivers/rtc/rtc-msm6242.c msm6242_write(priv, tm->tm_year % 10, MSM6242_YEAR1); tm 125 drivers/rtc/rtc-mt6397.c struct rtc_time *tm, int *sec) tm 136 drivers/rtc/rtc-mt6397.c tm->tm_sec = data[RTC_OFFSET_SEC]; tm 137 drivers/rtc/rtc-mt6397.c tm->tm_min = data[RTC_OFFSET_MIN]; tm 138 drivers/rtc/rtc-mt6397.c tm->tm_hour = data[RTC_OFFSET_HOUR]; tm 139 drivers/rtc/rtc-mt6397.c tm->tm_mday = data[RTC_OFFSET_DOM]; tm 140 drivers/rtc/rtc-mt6397.c tm->tm_mon = data[RTC_OFFSET_MTH]; tm 141 drivers/rtc/rtc-mt6397.c tm->tm_year = data[RTC_OFFSET_YEAR]; tm 149 drivers/rtc/rtc-mt6397.c static int mtk_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 156 drivers/rtc/rtc-mt6397.c ret = __mtk_rtc_read_time(rtc, tm, &sec); tm 159 drivers/rtc/rtc-mt6397.c } while (sec < tm->tm_sec); tm 165 drivers/rtc/rtc-mt6397.c tm->tm_year += RTC_MIN_YEAR_OFFSET; tm 168 drivers/rtc/rtc-mt6397.c tm->tm_mon--; tm 169 drivers/rtc/rtc-mt6397.c time = rtc_tm_to_time64(tm); tm 175 drivers/rtc/rtc-mt6397.c tm->tm_wday = (days + 4) % 7; tm 181 drivers/rtc/rtc-mt6397.c static int mtk_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 187 drivers/rtc/rtc-mt6397.c tm->tm_year -= RTC_MIN_YEAR_OFFSET; tm 188 drivers/rtc/rtc-mt6397.c tm->tm_mon++; tm 190 drivers/rtc/rtc-mt6397.c data[RTC_OFFSET_SEC] = tm->tm_sec; tm 191 drivers/rtc/rtc-mt6397.c data[RTC_OFFSET_MIN] = tm->tm_min; tm 192 drivers/rtc/rtc-mt6397.c data[RTC_OFFSET_HOUR] = tm->tm_hour; tm 193 drivers/rtc/rtc-mt6397.c data[RTC_OFFSET_DOM] = tm->tm_mday; tm 194 drivers/rtc/rtc-mt6397.c data[RTC_OFFSET_MTH] = tm->tm_mon; tm 195 drivers/rtc/rtc-mt6397.c data[RTC_OFFSET_YEAR] = tm->tm_year; tm 213 drivers/rtc/rtc-mt6397.c struct rtc_time *tm = &alm->time; tm 236 drivers/rtc/rtc-mt6397.c tm->tm_sec = data[RTC_OFFSET_SEC] & RTC_AL_SEC_MASK; tm 237 drivers/rtc/rtc-mt6397.c tm->tm_min = data[RTC_OFFSET_MIN] & RTC_AL_MIN_MASK; tm 238 drivers/rtc/rtc-mt6397.c tm->tm_hour = data[RTC_OFFSET_HOUR] & RTC_AL_HOU_MASK; tm 239 drivers/rtc/rtc-mt6397.c tm->tm_mday = data[RTC_OFFSET_DOM] & RTC_AL_DOM_MASK; tm 240 drivers/rtc/rtc-mt6397.c tm->tm_mon = data[RTC_OFFSET_MTH] & RTC_AL_MTH_MASK; tm 241 drivers/rtc/rtc-mt6397.c tm->tm_year = data[RTC_OFFSET_YEAR] & RTC_AL_YEA_MASK; tm 243 drivers/rtc/rtc-mt6397.c tm->tm_year += RTC_MIN_YEAR_OFFSET; tm 244 drivers/rtc/rtc-mt6397.c tm->tm_mon--; tm 254 drivers/rtc/rtc-mt6397.c struct rtc_time *tm = &alm->time; tm 259 drivers/rtc/rtc-mt6397.c tm->tm_year -= RTC_MIN_YEAR_OFFSET; tm 260 drivers/rtc/rtc-mt6397.c tm->tm_mon++; tm 269 drivers/rtc/rtc-mt6397.c (tm->tm_sec & RTC_AL_SEC_MASK)); tm 271 drivers/rtc/rtc-mt6397.c (tm->tm_min & RTC_AL_MIN_MASK)); tm 273 drivers/rtc/rtc-mt6397.c (tm->tm_hour & RTC_AL_HOU_MASK)); tm 275 drivers/rtc/rtc-mt6397.c (tm->tm_mday & RTC_AL_DOM_MASK)); tm 277 drivers/rtc/rtc-mt6397.c (tm->tm_mon & RTC_AL_MTH_MASK)); tm 279 drivers/rtc/rtc-mt6397.c (tm->tm_year & RTC_AL_YEA_MASK)); tm 152 drivers/rtc/rtc-mt7622.c static void mtk_rtc_get_alarm_or_time(struct mtk_rtc *hw, struct rtc_time *tm, tm 173 drivers/rtc/rtc-mt7622.c tm->tm_sec = sec; tm 174 drivers/rtc/rtc-mt7622.c tm->tm_min = min; tm 175 drivers/rtc/rtc-mt7622.c tm->tm_hour = hour; tm 176 drivers/rtc/rtc-mt7622.c tm->tm_wday = wday; tm 177 drivers/rtc/rtc-mt7622.c tm->tm_mday = mday; tm 178 drivers/rtc/rtc-mt7622.c tm->tm_mon = mon - 1; tm 181 drivers/rtc/rtc-mt7622.c tm->tm_year = year + MTK_RTC_TM_YR_OFFSET; tm 184 drivers/rtc/rtc-mt7622.c static void mtk_rtc_set_alarm_or_time(struct mtk_rtc *hw, struct rtc_time *tm, tm 190 drivers/rtc/rtc-mt7622.c year = tm->tm_year - MTK_RTC_TM_YR_OFFSET; tm 193 drivers/rtc/rtc-mt7622.c mtk_w32(hw, MTK_RTC_TREG(time_alarm, MTK_MON), tm->tm_mon + 1); tm 194 drivers/rtc/rtc-mt7622.c mtk_w32(hw, MTK_RTC_TREG(time_alarm, MTK_DOW), tm->tm_wday); tm 195 drivers/rtc/rtc-mt7622.c mtk_w32(hw, MTK_RTC_TREG(time_alarm, MTK_DOM), tm->tm_mday); tm 196 drivers/rtc/rtc-mt7622.c mtk_w32(hw, MTK_RTC_TREG(time_alarm, MTK_HOU), tm->tm_hour); tm 197 drivers/rtc/rtc-mt7622.c mtk_w32(hw, MTK_RTC_TREG(time_alarm, MTK_MIN), tm->tm_min); tm 198 drivers/rtc/rtc-mt7622.c mtk_w32(hw, MTK_RTC_TREG(time_alarm, MTK_SEC), tm->tm_sec); tm 220 drivers/rtc/rtc-mt7622.c static int mtk_rtc_gettime(struct device *dev, struct rtc_time *tm) tm 224 drivers/rtc/rtc-mt7622.c mtk_rtc_get_alarm_or_time(hw, tm, MTK_TC); tm 229 drivers/rtc/rtc-mt7622.c static int mtk_rtc_settime(struct device *dev, struct rtc_time *tm) tm 233 drivers/rtc/rtc-mt7622.c if (!MTK_RTC_TM_YR_VALID(tm->tm_year)) tm 239 drivers/rtc/rtc-mt7622.c mtk_rtc_set_alarm_or_time(hw, tm, MTK_TC); tm 46 drivers/rtc/rtc-mv.c static int mv_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 52 drivers/rtc/rtc-mv.c rtc_reg = (bin2bcd(tm->tm_sec) << RTC_SECONDS_OFFS) | tm 53 drivers/rtc/rtc-mv.c (bin2bcd(tm->tm_min) << RTC_MINUTES_OFFS) | tm 54 drivers/rtc/rtc-mv.c (bin2bcd(tm->tm_hour) << RTC_HOURS_OFFS) | tm 55 drivers/rtc/rtc-mv.c (bin2bcd(tm->tm_wday) << RTC_WDAY_OFFS); tm 58 drivers/rtc/rtc-mv.c rtc_reg = (bin2bcd(tm->tm_mday) << RTC_MDAY_OFFS) | tm 59 drivers/rtc/rtc-mv.c (bin2bcd(tm->tm_mon + 1) << RTC_MONTH_OFFS) | tm 60 drivers/rtc/rtc-mv.c (bin2bcd(tm->tm_year - 100) << RTC_YEAR_OFFS); tm 66 drivers/rtc/rtc-mv.c static int mv_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 85 drivers/rtc/rtc-mv.c tm->tm_sec = bcd2bin(second); tm 86 drivers/rtc/rtc-mv.c tm->tm_min = bcd2bin(minute); tm 87 drivers/rtc/rtc-mv.c tm->tm_hour = bcd2bin(hour); tm 88 drivers/rtc/rtc-mv.c tm->tm_mday = bcd2bin(day); tm 89 drivers/rtc/rtc-mv.c tm->tm_wday = bcd2bin(wday); tm 90 drivers/rtc/rtc-mv.c tm->tm_mon = bcd2bin(month) - 1; tm 92 drivers/rtc/rtc-mv.c tm->tm_year = bcd2bin(year) + 100; tm 241 drivers/rtc/rtc-mxc.c static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 250 drivers/rtc/rtc-mxc.c rtc_time64_to_tm(val, tm); tm 258 drivers/rtc/rtc-mxc.c static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 260 drivers/rtc/rtc-mxc.c time64_t time = rtc_tm_to_time64(tm); tm 340 drivers/rtc/rtc-mxc.c struct rtc_time tm; tm 349 drivers/rtc/rtc-mxc.c rtc_time64_to_tm(ktime_get_real_seconds(), &tm); tm 350 drivers/rtc/rtc-mxc.c rtc->start_secs = mktime64(tm.tm_year, 1, 1, 0, 0, 0); tm 142 drivers/rtc/rtc-mxc_v2.c static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 150 drivers/rtc/rtc-mxc_v2.c rtc_time64_to_tm(now, tm); tm 164 drivers/rtc/rtc-mxc_v2.c static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 167 drivers/rtc/rtc-mxc_v2.c time64_t time = rtc_tm_to_time64(tm); tm 270 drivers/rtc/rtc-omap.c static void tm2bcd(struct rtc_time *tm) tm 272 drivers/rtc/rtc-omap.c tm->tm_sec = bin2bcd(tm->tm_sec); tm 273 drivers/rtc/rtc-omap.c tm->tm_min = bin2bcd(tm->tm_min); tm 274 drivers/rtc/rtc-omap.c tm->tm_hour = bin2bcd(tm->tm_hour); tm 275 drivers/rtc/rtc-omap.c tm->tm_mday = bin2bcd(tm->tm_mday); tm 277 drivers/rtc/rtc-omap.c tm->tm_mon = bin2bcd(tm->tm_mon + 1); tm 278 drivers/rtc/rtc-omap.c tm->tm_year = bin2bcd(tm->tm_year - 100); tm 281 drivers/rtc/rtc-omap.c static void bcd2tm(struct rtc_time *tm) tm 283 drivers/rtc/rtc-omap.c tm->tm_sec = bcd2bin(tm->tm_sec); tm 284 drivers/rtc/rtc-omap.c tm->tm_min = bcd2bin(tm->tm_min); tm 285 drivers/rtc/rtc-omap.c tm->tm_hour = bcd2bin(tm->tm_hour); tm 286 drivers/rtc/rtc-omap.c tm->tm_mday = bcd2bin(tm->tm_mday); tm 287 drivers/rtc/rtc-omap.c tm->tm_mon = bcd2bin(tm->tm_mon) - 1; tm 289 drivers/rtc/rtc-omap.c tm->tm_year = bcd2bin(tm->tm_year) + 100; tm 292 drivers/rtc/rtc-omap.c static void omap_rtc_read_time_raw(struct omap_rtc *rtc, struct rtc_time *tm) tm 294 drivers/rtc/rtc-omap.c tm->tm_sec = rtc_read(rtc, OMAP_RTC_SECONDS_REG); tm 295 drivers/rtc/rtc-omap.c tm->tm_min = rtc_read(rtc, OMAP_RTC_MINUTES_REG); tm 296 drivers/rtc/rtc-omap.c tm->tm_hour = rtc_read(rtc, OMAP_RTC_HOURS_REG); tm 297 drivers/rtc/rtc-omap.c tm->tm_mday = rtc_read(rtc, OMAP_RTC_DAYS_REG); tm 298 drivers/rtc/rtc-omap.c tm->tm_mon = rtc_read(rtc, OMAP_RTC_MONTHS_REG); tm 299 drivers/rtc/rtc-omap.c tm->tm_year = rtc_read(rtc, OMAP_RTC_YEARS_REG); tm 302 drivers/rtc/rtc-omap.c static int omap_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 309 drivers/rtc/rtc-omap.c omap_rtc_read_time_raw(rtc, tm); tm 312 drivers/rtc/rtc-omap.c bcd2tm(tm); tm 317 drivers/rtc/rtc-omap.c static int omap_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 321 drivers/rtc/rtc-omap.c tm2bcd(tm); tm 327 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_YEARS_REG, tm->tm_year); tm 328 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_MONTHS_REG, tm->tm_mon); tm 329 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_DAYS_REG, tm->tm_mday); tm 330 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_HOURS_REG, tm->tm_hour); tm 331 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_MINUTES_REG, tm->tm_min); tm 332 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_SECONDS_REG, tm->tm_sec); tm 414 drivers/rtc/rtc-omap.c struct rtc_time tm; tm 429 drivers/rtc/rtc-omap.c omap_rtc_read_time_raw(rtc, &tm); tm 430 drivers/rtc/rtc-omap.c seconds = tm.tm_sec; tm 431 drivers/rtc/rtc-omap.c bcd2tm(&tm); tm 432 drivers/rtc/rtc-omap.c now = rtc_tm_to_time64(&tm); tm 433 drivers/rtc/rtc-omap.c rtc_time64_to_tm(now + 1, &tm); tm 435 drivers/rtc/rtc-omap.c tm2bcd(&tm); tm 439 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_SECONDS_REG, tm.tm_sec); tm 440 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_MINUTES_REG, tm.tm_min); tm 441 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_HOURS_REG, tm.tm_hour); tm 442 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_DAYS_REG, tm.tm_mday); tm 443 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_MONTHS_REG, tm.tm_mon); tm 444 drivers/rtc/rtc-omap.c rtc_write(rtc, OMAP_RTC_ALARM2_YEARS_REG, tm.tm_year); tm 21 drivers/rtc/rtc-opal.c static void opal_to_tm(u32 y_m_d, u64 h_m_s_ms, struct rtc_time *tm) tm 23 drivers/rtc/rtc-opal.c tm->tm_year = ((bcd2bin(y_m_d >> 24) * 100) + tm 25 drivers/rtc/rtc-opal.c tm->tm_mon = bcd2bin((y_m_d >> 8) & 0xff) - 1; tm 26 drivers/rtc/rtc-opal.c tm->tm_mday = bcd2bin(y_m_d & 0xff); tm 27 drivers/rtc/rtc-opal.c tm->tm_hour = bcd2bin((h_m_s_ms >> 56) & 0xff); tm 28 drivers/rtc/rtc-opal.c tm->tm_min = bcd2bin((h_m_s_ms >> 48) & 0xff); tm 29 drivers/rtc/rtc-opal.c tm->tm_sec = bcd2bin((h_m_s_ms >> 40) & 0xff); tm 31 drivers/rtc/rtc-opal.c tm->tm_wday = -1; tm 34 drivers/rtc/rtc-opal.c static void tm_to_opal(struct rtc_time *tm, u32 *y_m_d, u64 *h_m_s_ms) tm 36 drivers/rtc/rtc-opal.c *y_m_d |= ((u32)bin2bcd((tm->tm_year + 1900) / 100)) << 24; tm 37 drivers/rtc/rtc-opal.c *y_m_d |= ((u32)bin2bcd((tm->tm_year + 1900) % 100)) << 16; tm 38 drivers/rtc/rtc-opal.c *y_m_d |= ((u32)bin2bcd((tm->tm_mon + 1))) << 8; tm 39 drivers/rtc/rtc-opal.c *y_m_d |= ((u32)bin2bcd(tm->tm_mday)); tm 41 drivers/rtc/rtc-opal.c *h_m_s_ms |= ((u64)bin2bcd(tm->tm_hour)) << 56; tm 42 drivers/rtc/rtc-opal.c *h_m_s_ms |= ((u64)bin2bcd(tm->tm_min)) << 48; tm 43 drivers/rtc/rtc-opal.c *h_m_s_ms |= ((u64)bin2bcd(tm->tm_sec)) << 40; tm 46 drivers/rtc/rtc-opal.c static int opal_get_rtc_time(struct device *dev, struct rtc_time *tm) tm 75 drivers/rtc/rtc-opal.c opal_to_tm(y_m_d, h_m_s_ms, tm); tm 80 drivers/rtc/rtc-opal.c static int opal_set_rtc_time(struct device *dev, struct rtc_time *tm) tm 87 drivers/rtc/rtc-opal.c tm_to_opal(tm, &y_m_d, &h_m_s_ms); tm 48 drivers/rtc/rtc-palmas.c static int palmas_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 69 drivers/rtc/rtc-palmas.c tm->tm_sec = bcd2bin(rtc_data[0]); tm 70 drivers/rtc/rtc-palmas.c tm->tm_min = bcd2bin(rtc_data[1]); tm 71 drivers/rtc/rtc-palmas.c tm->tm_hour = bcd2bin(rtc_data[2]); tm 72 drivers/rtc/rtc-palmas.c tm->tm_mday = bcd2bin(rtc_data[3]); tm 73 drivers/rtc/rtc-palmas.c tm->tm_mon = bcd2bin(rtc_data[4]) - 1; tm 74 drivers/rtc/rtc-palmas.c tm->tm_year = bcd2bin(rtc_data[5]) + 100; tm 79 drivers/rtc/rtc-palmas.c static int palmas_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 85 drivers/rtc/rtc-palmas.c rtc_data[0] = bin2bcd(tm->tm_sec); tm 86 drivers/rtc/rtc-palmas.c rtc_data[1] = bin2bcd(tm->tm_min); tm 87 drivers/rtc/rtc-palmas.c rtc_data[2] = bin2bcd(tm->tm_hour); tm 88 drivers/rtc/rtc-palmas.c rtc_data[3] = bin2bcd(tm->tm_mday); tm 89 drivers/rtc/rtc-palmas.c rtc_data[4] = bin2bcd(tm->tm_mon + 1); tm 90 drivers/rtc/rtc-palmas.c rtc_data[5] = bin2bcd(tm->tm_year - 100); tm 43 drivers/rtc/rtc-pcap.c struct rtc_time *tm = &alrm->time; tm 54 drivers/rtc/rtc-pcap.c rtc_time64_to_tm(secs, tm); tm 74 drivers/rtc/rtc-pcap.c static int pcap_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 86 drivers/rtc/rtc-pcap.c rtc_time64_to_tm(secs, tm); tm 91 drivers/rtc/rtc-pcap.c static int pcap_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 94 drivers/rtc/rtc-pcap.c unsigned long secs = rtc_tm_to_time64(tm); tm 175 drivers/rtc/rtc-pcf2123.c static int pcf2123_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 191 drivers/rtc/rtc-pcf2123.c tm->tm_sec = bcd2bin(rxbuf[0] & 0x7F); tm 192 drivers/rtc/rtc-pcf2123.c tm->tm_min = bcd2bin(rxbuf[1] & 0x7F); tm 193 drivers/rtc/rtc-pcf2123.c tm->tm_hour = bcd2bin(rxbuf[2] & 0x3F); /* rtc hr 0-23 */ tm 194 drivers/rtc/rtc-pcf2123.c tm->tm_mday = bcd2bin(rxbuf[3] & 0x3F); tm 195 drivers/rtc/rtc-pcf2123.c tm->tm_wday = rxbuf[4] & 0x07; tm 196 drivers/rtc/rtc-pcf2123.c tm->tm_mon = bcd2bin(rxbuf[5] & 0x1F) - 1; /* rtc mn 1-12 */ tm 197 drivers/rtc/rtc-pcf2123.c tm->tm_year = bcd2bin(rxbuf[6]) + 100; tm 199 drivers/rtc/rtc-pcf2123.c dev_dbg(dev, "%s: tm is %ptR\n", __func__, tm); tm 204 drivers/rtc/rtc-pcf2123.c static int pcf2123_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 210 drivers/rtc/rtc-pcf2123.c dev_dbg(dev, "%s: tm is %ptR\n", __func__, tm); tm 218 drivers/rtc/rtc-pcf2123.c txbuf[0] = bin2bcd(tm->tm_sec & 0x7F); tm 219 drivers/rtc/rtc-pcf2123.c txbuf[1] = bin2bcd(tm->tm_min & 0x7F); tm 220 drivers/rtc/rtc-pcf2123.c txbuf[2] = bin2bcd(tm->tm_hour & 0x3F); tm 221 drivers/rtc/rtc-pcf2123.c txbuf[3] = bin2bcd(tm->tm_mday & 0x3F); tm 222 drivers/rtc/rtc-pcf2123.c txbuf[4] = tm->tm_wday & 0x07; tm 223 drivers/rtc/rtc-pcf2123.c txbuf[5] = bin2bcd((tm->tm_mon + 1) & 0x1F); /* rtc mn 1-12 */ tm 224 drivers/rtc/rtc-pcf2123.c txbuf[6] = bin2bcd(tm->tm_year - 100); tm 379 drivers/rtc/rtc-pcf2123.c struct rtc_time tm; tm 396 drivers/rtc/rtc-pcf2123.c ret = pcf2123_rtc_read_time(&spi->dev, &tm); tm 92 drivers/rtc/rtc-pcf2127.c static int pcf2127_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 133 drivers/rtc/rtc-pcf2127.c tm->tm_sec = bcd2bin(buf[PCF2127_REG_SC] & 0x7F); tm 134 drivers/rtc/rtc-pcf2127.c tm->tm_min = bcd2bin(buf[PCF2127_REG_MN] & 0x7F); tm 135 drivers/rtc/rtc-pcf2127.c tm->tm_hour = bcd2bin(buf[PCF2127_REG_HR] & 0x3F); /* rtc hr 0-23 */ tm 136 drivers/rtc/rtc-pcf2127.c tm->tm_mday = bcd2bin(buf[PCF2127_REG_DM] & 0x3F); tm 137 drivers/rtc/rtc-pcf2127.c tm->tm_wday = buf[PCF2127_REG_DW] & 0x07; tm 138 drivers/rtc/rtc-pcf2127.c tm->tm_mon = bcd2bin(buf[PCF2127_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ tm 139 drivers/rtc/rtc-pcf2127.c tm->tm_year = bcd2bin(buf[PCF2127_REG_YR]); tm 140 drivers/rtc/rtc-pcf2127.c if (tm->tm_year < 70) tm 141 drivers/rtc/rtc-pcf2127.c tm->tm_year += 100; /* assume we are in 1970...2069 */ tm 146 drivers/rtc/rtc-pcf2127.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 147 drivers/rtc/rtc-pcf2127.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 152 drivers/rtc/rtc-pcf2127.c static int pcf2127_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 161 drivers/rtc/rtc-pcf2127.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 162 drivers/rtc/rtc-pcf2127.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 165 drivers/rtc/rtc-pcf2127.c buf[i++] = bin2bcd(tm->tm_sec); /* this will also clear OSF flag */ tm 166 drivers/rtc/rtc-pcf2127.c buf[i++] = bin2bcd(tm->tm_min); tm 167 drivers/rtc/rtc-pcf2127.c buf[i++] = bin2bcd(tm->tm_hour); tm 168 drivers/rtc/rtc-pcf2127.c buf[i++] = bin2bcd(tm->tm_mday); tm 169 drivers/rtc/rtc-pcf2127.c buf[i++] = tm->tm_wday & 0x07; tm 172 drivers/rtc/rtc-pcf2127.c buf[i++] = bin2bcd(tm->tm_mon + 1); tm 175 drivers/rtc/rtc-pcf2127.c buf[i++] = bin2bcd(tm->tm_year % 100); tm 359 drivers/rtc/rtc-pcf2127.c struct rtc_time tm; tm 387 drivers/rtc/rtc-pcf2127.c tm.tm_sec = bcd2bin(data[PCF2127_REG_TS_SC] & 0x7F); tm 388 drivers/rtc/rtc-pcf2127.c tm.tm_min = bcd2bin(data[PCF2127_REG_TS_MN] & 0x7F); tm 389 drivers/rtc/rtc-pcf2127.c tm.tm_hour = bcd2bin(data[PCF2127_REG_TS_HR] & 0x3F); tm 390 drivers/rtc/rtc-pcf2127.c tm.tm_mday = bcd2bin(data[PCF2127_REG_TS_DM] & 0x3F); tm 392 drivers/rtc/rtc-pcf2127.c tm.tm_mon = bcd2bin(data[PCF2127_REG_TS_MO] & 0x1F) - 1; tm 393 drivers/rtc/rtc-pcf2127.c tm.tm_year = bcd2bin(data[PCF2127_REG_TS_YR]); tm 394 drivers/rtc/rtc-pcf2127.c if (tm.tm_year < 70) tm 395 drivers/rtc/rtc-pcf2127.c tm.tm_year += 100; /* assume we are in 1970...2069 */ tm 397 drivers/rtc/rtc-pcf2127.c ret = rtc_valid_tm(&tm); tm 402 drivers/rtc/rtc-pcf2127.c (unsigned long long)rtc_tm_to_time64(&tm)); tm 103 drivers/rtc/rtc-pcf50633.c static int pcf50633_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 127 drivers/rtc/rtc-pcf50633.c pcf2rtc_time(tm, &pcf_tm); tm 129 drivers/rtc/rtc-pcf50633.c dev_dbg(dev, "RTC_TIME: %ptRr\n", tm); tm 134 drivers/rtc/rtc-pcf50633.c static int pcf50633_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 142 drivers/rtc/rtc-pcf50633.c dev_dbg(dev, "RTC_TIME: %ptRr\n", tm); tm 144 drivers/rtc/rtc-pcf50633.c rtc2pcf_time(&pcf_tm, tm); tm 66 drivers/rtc/rtc-pcf85063.c static int pcf85063_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 89 drivers/rtc/rtc-pcf85063.c tm->tm_sec = bcd2bin(regs[0] & 0x7F); tm 90 drivers/rtc/rtc-pcf85063.c tm->tm_min = bcd2bin(regs[1] & 0x7F); tm 91 drivers/rtc/rtc-pcf85063.c tm->tm_hour = bcd2bin(regs[2] & 0x3F); /* rtc hr 0-23 */ tm 92 drivers/rtc/rtc-pcf85063.c tm->tm_mday = bcd2bin(regs[3] & 0x3F); tm 93 drivers/rtc/rtc-pcf85063.c tm->tm_wday = regs[4] & 0x07; tm 94 drivers/rtc/rtc-pcf85063.c tm->tm_mon = bcd2bin(regs[5] & 0x1F) - 1; /* rtc mn 1-12 */ tm 95 drivers/rtc/rtc-pcf85063.c tm->tm_year = bcd2bin(regs[6]); tm 96 drivers/rtc/rtc-pcf85063.c tm->tm_year += 100; tm 101 drivers/rtc/rtc-pcf85063.c static int pcf85063_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 118 drivers/rtc/rtc-pcf85063.c regs[0] = bin2bcd(tm->tm_sec) & 0x7F; /* clear OS flag */ tm 120 drivers/rtc/rtc-pcf85063.c regs[1] = bin2bcd(tm->tm_min); tm 121 drivers/rtc/rtc-pcf85063.c regs[2] = bin2bcd(tm->tm_hour); tm 124 drivers/rtc/rtc-pcf85063.c regs[3] = bin2bcd(tm->tm_mday); tm 127 drivers/rtc/rtc-pcf85063.c regs[4] = tm->tm_wday & 0x07; tm 130 drivers/rtc/rtc-pcf85063.c regs[5] = bin2bcd(tm->tm_mon + 1); tm 133 drivers/rtc/rtc-pcf85063.c regs[6] = bin2bcd(tm->tm_year - 100); tm 183 drivers/rtc/rtc-pcf8523.c static int pcf8523_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 215 drivers/rtc/rtc-pcf8523.c tm->tm_sec = bcd2bin(regs[0] & 0x7f); tm 216 drivers/rtc/rtc-pcf8523.c tm->tm_min = bcd2bin(regs[1] & 0x7f); tm 217 drivers/rtc/rtc-pcf8523.c tm->tm_hour = bcd2bin(regs[2] & 0x3f); tm 218 drivers/rtc/rtc-pcf8523.c tm->tm_mday = bcd2bin(regs[3] & 0x3f); tm 219 drivers/rtc/rtc-pcf8523.c tm->tm_wday = regs[4] & 0x7; tm 220 drivers/rtc/rtc-pcf8523.c tm->tm_mon = bcd2bin(regs[5] & 0x1f) - 1; tm 221 drivers/rtc/rtc-pcf8523.c tm->tm_year = bcd2bin(regs[6]) + 100; tm 226 drivers/rtc/rtc-pcf8523.c static int pcf8523_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 241 drivers/rtc/rtc-pcf8523.c if (tm->tm_year < 100 || tm->tm_year >= 200) tm 250 drivers/rtc/rtc-pcf8523.c regs[1] = bin2bcd(tm->tm_sec); tm 251 drivers/rtc/rtc-pcf8523.c regs[2] = bin2bcd(tm->tm_min); tm 252 drivers/rtc/rtc-pcf8523.c regs[3] = bin2bcd(tm->tm_hour); tm 253 drivers/rtc/rtc-pcf8523.c regs[4] = bin2bcd(tm->tm_mday); tm 254 drivers/rtc/rtc-pcf8523.c regs[5] = tm->tm_wday; tm 255 drivers/rtc/rtc-pcf8523.c regs[6] = bin2bcd(tm->tm_mon + 1); tm 256 drivers/rtc/rtc-pcf8523.c regs[7] = bin2bcd(tm->tm_year - 100); tm 120 drivers/rtc/rtc-pcf85363.c static int pcf85363_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 133 drivers/rtc/rtc-pcf85363.c tm->tm_year = bcd2bin(buf[DT_YEARS]); tm 135 drivers/rtc/rtc-pcf85363.c tm->tm_year += 100; tm 137 drivers/rtc/rtc-pcf85363.c tm->tm_wday = buf[DT_WEEKDAYS] & 7; tm 139 drivers/rtc/rtc-pcf85363.c tm->tm_sec = bcd2bin(buf[DT_SECS]); tm 141 drivers/rtc/rtc-pcf85363.c tm->tm_min = bcd2bin(buf[DT_MINUTES]); tm 142 drivers/rtc/rtc-pcf85363.c tm->tm_hour = bcd2bin(buf[DT_HOURS]); tm 143 drivers/rtc/rtc-pcf85363.c tm->tm_mday = bcd2bin(buf[DT_DAYS]); tm 144 drivers/rtc/rtc-pcf85363.c tm->tm_mon = bcd2bin(buf[DT_MONTHS]) - 1; tm 149 drivers/rtc/rtc-pcf85363.c static int pcf85363_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 160 drivers/rtc/rtc-pcf85363.c buf[DT_SECS] = bin2bcd(tm->tm_sec); tm 161 drivers/rtc/rtc-pcf85363.c buf[DT_MINUTES] = bin2bcd(tm->tm_min); tm 162 drivers/rtc/rtc-pcf85363.c buf[DT_HOURS] = bin2bcd(tm->tm_hour); tm 163 drivers/rtc/rtc-pcf85363.c buf[DT_DAYS] = bin2bcd(tm->tm_mday); tm 164 drivers/rtc/rtc-pcf85363.c buf[DT_WEEKDAYS] = tm->tm_wday; tm 165 drivers/rtc/rtc-pcf85363.c buf[DT_MONTHS] = bin2bcd(tm->tm_mon + 1); tm 166 drivers/rtc/rtc-pcf85363.c buf[DT_YEARS] = bin2bcd(tm->tm_year % 100); tm 199 drivers/rtc/rtc-pcf8563.c static int pcf8563_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 226 drivers/rtc/rtc-pcf8563.c tm->tm_sec = bcd2bin(buf[PCF8563_REG_SC] & 0x7F); tm 227 drivers/rtc/rtc-pcf8563.c tm->tm_min = bcd2bin(buf[PCF8563_REG_MN] & 0x7F); tm 228 drivers/rtc/rtc-pcf8563.c tm->tm_hour = bcd2bin(buf[PCF8563_REG_HR] & 0x3F); /* rtc hr 0-23 */ tm 229 drivers/rtc/rtc-pcf8563.c tm->tm_mday = bcd2bin(buf[PCF8563_REG_DM] & 0x3F); tm 230 drivers/rtc/rtc-pcf8563.c tm->tm_wday = buf[PCF8563_REG_DW] & 0x07; tm 231 drivers/rtc/rtc-pcf8563.c tm->tm_mon = bcd2bin(buf[PCF8563_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ tm 232 drivers/rtc/rtc-pcf8563.c tm->tm_year = bcd2bin(buf[PCF8563_REG_YR]) + 100; tm 235 drivers/rtc/rtc-pcf8563.c (tm->tm_year >= 100) : (tm->tm_year < 100); tm 240 drivers/rtc/rtc-pcf8563.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 241 drivers/rtc/rtc-pcf8563.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 246 drivers/rtc/rtc-pcf8563.c static int pcf8563_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 255 drivers/rtc/rtc-pcf8563.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 256 drivers/rtc/rtc-pcf8563.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 259 drivers/rtc/rtc-pcf8563.c buf[PCF8563_REG_SC] = bin2bcd(tm->tm_sec); tm 260 drivers/rtc/rtc-pcf8563.c buf[PCF8563_REG_MN] = bin2bcd(tm->tm_min); tm 261 drivers/rtc/rtc-pcf8563.c buf[PCF8563_REG_HR] = bin2bcd(tm->tm_hour); tm 263 drivers/rtc/rtc-pcf8563.c buf[PCF8563_REG_DM] = bin2bcd(tm->tm_mday); tm 266 drivers/rtc/rtc-pcf8563.c buf[PCF8563_REG_MO] = bin2bcd(tm->tm_mon + 1); tm 269 drivers/rtc/rtc-pcf8563.c buf[PCF8563_REG_YR] = bin2bcd(tm->tm_year - 100); tm 270 drivers/rtc/rtc-pcf8563.c if (pcf8563->c_polarity ? (tm->tm_year >= 100) : (tm->tm_year < 100)) tm 273 drivers/rtc/rtc-pcf8563.c buf[PCF8563_REG_DW] = tm->tm_wday & 0x07; tm 283 drivers/rtc/rtc-pcf8563.c struct rtc_time tm; tm 302 drivers/rtc/rtc-pcf8563.c if (pcf8563_rtc_read_time(dev, &tm)) tm 303 drivers/rtc/rtc-pcf8563.c pcf8563_rtc_set_time(dev, &tm); tm 317 drivers/rtc/rtc-pcf8563.c static int pcf8563_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *tm) tm 331 drivers/rtc/rtc-pcf8563.c tm->time.tm_sec = 0; tm 332 drivers/rtc/rtc-pcf8563.c tm->time.tm_min = bcd2bin(buf[0] & 0x7F); tm 333 drivers/rtc/rtc-pcf8563.c tm->time.tm_hour = bcd2bin(buf[1] & 0x3F); tm 334 drivers/rtc/rtc-pcf8563.c tm->time.tm_mday = bcd2bin(buf[2] & 0x3F); tm 335 drivers/rtc/rtc-pcf8563.c tm->time.tm_wday = bcd2bin(buf[3] & 0x7); tm 337 drivers/rtc/rtc-pcf8563.c err = pcf8563_get_alarm_mode(client, &tm->enabled, &tm->pending); tm 342 drivers/rtc/rtc-pcf8563.c " enabled=%d, pending=%d\n", __func__, tm->time.tm_min, tm 343 drivers/rtc/rtc-pcf8563.c tm->time.tm_hour, tm->time.tm_mday, tm->time.tm_wday, tm 344 drivers/rtc/rtc-pcf8563.c tm->enabled, tm->pending); tm 349 drivers/rtc/rtc-pcf8563.c static int pcf8563_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *tm) tm 356 drivers/rtc/rtc-pcf8563.c if (tm->time.tm_sec) { tm 357 drivers/rtc/rtc-pcf8563.c time64_t alarm_time = rtc_tm_to_time64(&tm->time); tm 359 drivers/rtc/rtc-pcf8563.c alarm_time += 60 - tm->time.tm_sec; tm 360 drivers/rtc/rtc-pcf8563.c rtc_time64_to_tm(alarm_time, &tm->time); tm 365 drivers/rtc/rtc-pcf8563.c tm->time.tm_min, tm->time.tm_hour, tm->time.tm_wday, tm 366 drivers/rtc/rtc-pcf8563.c tm->time.tm_mday, tm->enabled, tm->pending); tm 368 drivers/rtc/rtc-pcf8563.c buf[0] = bin2bcd(tm->time.tm_min); tm 369 drivers/rtc/rtc-pcf8563.c buf[1] = bin2bcd(tm->time.tm_hour); tm 370 drivers/rtc/rtc-pcf8563.c buf[2] = bin2bcd(tm->time.tm_mday); tm 371 drivers/rtc/rtc-pcf8563.c buf[3] = tm->time.tm_wday & 0x07; tm 377 drivers/rtc/rtc-pcf8563.c return pcf8563_set_alarm_mode(client, !!tm->enabled); tm 172 drivers/rtc/rtc-pcf8583.c static int pcf8583_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 198 drivers/rtc/rtc-pcf8583.c if (pcf8583_get_datetime(client, tm) || tm 210 drivers/rtc/rtc-pcf8583.c year_offset = tm->tm_year - (real_year & 3); tm 217 drivers/rtc/rtc-pcf8583.c tm->tm_year = (real_year + year_offset + year[1] * 100) - 1900; tm 222 drivers/rtc/rtc-pcf8583.c static int pcf8583_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 236 drivers/rtc/rtc-pcf8583.c unsigned int proper_year = tm->tm_year + 1900; tm 244 drivers/rtc/rtc-pcf8583.c ret = pcf8583_set_datetime(client, tm, 1); tm 171 drivers/rtc/rtc-pic32.c static int pic32_rtc_settime(struct device *dev, struct rtc_time *tm) tm 176 drivers/rtc/rtc-pic32.c dev_dbg(dev, "set time %ptR\n", tm); tm 179 drivers/rtc/rtc-pic32.c writeb(bin2bcd(tm->tm_sec), base + PIC32_RTCSEC); tm 180 drivers/rtc/rtc-pic32.c writeb(bin2bcd(tm->tm_min), base + PIC32_RTCMIN); tm 181 drivers/rtc/rtc-pic32.c writeb(bin2bcd(tm->tm_hour), base + PIC32_RTCHOUR); tm 182 drivers/rtc/rtc-pic32.c writeb(bin2bcd(tm->tm_mday), base + PIC32_RTCDAY); tm 183 drivers/rtc/rtc-pic32.c writeb(bin2bcd(tm->tm_mon + 1), base + PIC32_RTCMON); tm 184 drivers/rtc/rtc-pic32.c writeb(bin2bcd(tm->tm_year - 100), base + PIC32_RTCYEAR); tm 225 drivers/rtc/rtc-pic32.c struct rtc_time *tm = &alrm->time; tm 229 drivers/rtc/rtc-pic32.c dev_dbg(dev, "setalarm: %d, %ptR\n", alrm->enabled, tm); tm 60 drivers/rtc/rtc-pl030.c static int pl030_read_time(struct device *dev, struct rtc_time *tm) tm 64 drivers/rtc/rtc-pl030.c rtc_time_to_tm(readl(rtc->base + RTC_DR), tm); tm 77 drivers/rtc/rtc-pl030.c static int pl030_set_time(struct device *dev, struct rtc_time *tm) tm 83 drivers/rtc/rtc-pl030.c ret = rtc_tm_to_time(tm, &time); tm 114 drivers/rtc/rtc-pl031.c struct rtc_time *tm, unsigned long *st_time, tm 117 drivers/rtc/rtc-pl031.c int year = tm->tm_year + 1900; tm 118 drivers/rtc/rtc-pl031.c int wday = tm->tm_wday; tm 122 drivers/rtc/rtc-pl031.c dev_err(dev, "invalid wday value %d\n", tm->tm_wday); tm 129 drivers/rtc/rtc-pl031.c rtc_tm_to_time(tm, &time); tm 136 drivers/rtc/rtc-pl031.c *st_time = ((tm->tm_mon + 1) << RTC_MON_SHIFT) tm 137 drivers/rtc/rtc-pl031.c | (tm->tm_mday << RTC_MDAY_SHIFT) tm 139 drivers/rtc/rtc-pl031.c | (tm->tm_hour << RTC_HOUR_SHIFT) tm 140 drivers/rtc/rtc-pl031.c | (tm->tm_min << RTC_MIN_SHIFT) tm 141 drivers/rtc/rtc-pl031.c | (tm->tm_sec << RTC_SEC_SHIFT); tm 150 drivers/rtc/rtc-pl031.c struct rtc_time *tm) tm 152 drivers/rtc/rtc-pl031.c tm->tm_year = bcd2bin(bcd_year) + (bcd2bin(bcd_year >> 8) * 100); tm 153 drivers/rtc/rtc-pl031.c tm->tm_mon = ((st_time & RTC_MON_MASK) >> RTC_MON_SHIFT) - 1; tm 154 drivers/rtc/rtc-pl031.c tm->tm_mday = ((st_time & RTC_MDAY_MASK) >> RTC_MDAY_SHIFT); tm 155 drivers/rtc/rtc-pl031.c tm->tm_wday = ((st_time & RTC_WDAY_MASK) >> RTC_WDAY_SHIFT) - 1; tm 156 drivers/rtc/rtc-pl031.c tm->tm_hour = ((st_time & RTC_HOUR_MASK) >> RTC_HOUR_SHIFT); tm 157 drivers/rtc/rtc-pl031.c tm->tm_min = ((st_time & RTC_MIN_MASK) >> RTC_MIN_SHIFT); tm 158 drivers/rtc/rtc-pl031.c tm->tm_sec = ((st_time & RTC_SEC_MASK) >> RTC_SEC_SHIFT); tm 160 drivers/rtc/rtc-pl031.c tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); tm 161 drivers/rtc/rtc-pl031.c tm->tm_year -= 1900; tm 166 drivers/rtc/rtc-pl031.c static int pl031_stv2_read_time(struct device *dev, struct rtc_time *tm) tm 171 drivers/rtc/rtc-pl031.c readl(ldata->base + RTC_YDR), tm); tm 176 drivers/rtc/rtc-pl031.c static int pl031_stv2_set_time(struct device *dev, struct rtc_time *tm) tm 183 drivers/rtc/rtc-pl031.c ret = pl031_stv2_tm_to_time(dev, tm, &time, &bcd_year); tm 247 drivers/rtc/rtc-pl031.c static int pl031_read_time(struct device *dev, struct rtc_time *tm) tm 251 drivers/rtc/rtc-pl031.c rtc_time_to_tm(readl(ldata->base + RTC_DR), tm); tm 256 drivers/rtc/rtc-pl031.c static int pl031_set_time(struct device *dev, struct rtc_time *tm) tm 262 drivers/rtc/rtc-pl031.c ret = rtc_tm_to_time(tm, &time); tm 75 drivers/rtc/rtc-pm8xxx.c static int pm8xxx_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 87 drivers/rtc/rtc-pm8xxx.c rtc_tm_to_time(tm, &secs); tm 174 drivers/rtc/rtc-pm8xxx.c static int pm8xxx_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 211 drivers/rtc/rtc-pm8xxx.c rtc_time_to_tm(secs, tm); tm 213 drivers/rtc/rtc-pm8xxx.c dev_dbg(dev, "secs = %lu, h:m:s == %ptRt, y-m-d = %ptRdr\n", secs, tm, tm); tm 29 drivers/rtc/rtc-ps3.c static int ps3_get_time(struct device *dev, struct rtc_time *tm) tm 31 drivers/rtc/rtc-ps3.c rtc_time64_to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm); tm 35 drivers/rtc/rtc-ps3.c static int ps3_set_time(struct device *dev, struct rtc_time *tm) tm 37 drivers/rtc/rtc-ps3.c ps3_os_area_set_rtc_diff(rtc_tm_to_time64(tm) - read_rtc()); tm 95 drivers/rtc/rtc-puv3.c static int puv3_rtc_settime(struct device *dev, struct rtc_time *tm) tm 99 drivers/rtc/rtc-puv3.c dev_dbg(dev, "set time %ptRr\n", tm); tm 101 drivers/rtc/rtc-puv3.c rtc_tm_to_time(tm, &rtc_count); tm 122 drivers/rtc/rtc-puv3.c struct rtc_time *tm = &alrm->time; tm 125 drivers/rtc/rtc-puv3.c dev_dbg(dev, "set alarm: %d, %ptRr\n", alrm->enabled, tm); tm 127 drivers/rtc/rtc-puv3.c rtc_tm_to_time(tm, &rtcalarm_count); tm 85 drivers/rtc/rtc-pxa.c static u32 ryxr_calc(struct rtc_time *tm) tm 87 drivers/rtc/rtc-pxa.c return ((tm->tm_year + 1900) << RYxR_YEAR_S) tm 88 drivers/rtc/rtc-pxa.c | ((tm->tm_mon + 1) << RYxR_MONTH_S) tm 89 drivers/rtc/rtc-pxa.c | tm->tm_mday; tm 92 drivers/rtc/rtc-pxa.c static u32 rdxr_calc(struct rtc_time *tm) tm 94 drivers/rtc/rtc-pxa.c return ((((tm->tm_mday + 6) / 7) << RDxR_WOM_S) & RDxR_WOM_MASK) tm 95 drivers/rtc/rtc-pxa.c | (((tm->tm_wday + 1) << RDxR_DOW_S) & RDxR_DOW_MASK) tm 96 drivers/rtc/rtc-pxa.c | (tm->tm_hour << RDxR_HOUR_S) tm 97 drivers/rtc/rtc-pxa.c | (tm->tm_min << RDxR_MIN_S) tm 98 drivers/rtc/rtc-pxa.c | tm->tm_sec; tm 101 drivers/rtc/rtc-pxa.c static void tm_calc(u32 rycr, u32 rdcr, struct rtc_time *tm) tm 103 drivers/rtc/rtc-pxa.c tm->tm_year = ((rycr & RYxR_YEAR_MASK) >> RYxR_YEAR_S) - 1900; tm 104 drivers/rtc/rtc-pxa.c tm->tm_mon = (((rycr & RYxR_MONTH_MASK) >> RYxR_MONTH_S)) - 1; tm 105 drivers/rtc/rtc-pxa.c tm->tm_mday = (rycr & RYxR_DAY_MASK); tm 106 drivers/rtc/rtc-pxa.c tm->tm_wday = ((rycr & RDxR_DOW_MASK) >> RDxR_DOW_S) - 1; tm 107 drivers/rtc/rtc-pxa.c tm->tm_hour = (rdcr & RDxR_HOUR_MASK) >> RDxR_HOUR_S; tm 108 drivers/rtc/rtc-pxa.c tm->tm_min = (rdcr & RDxR_MIN_MASK) >> RDxR_MIN_S; tm 109 drivers/rtc/rtc-pxa.c tm->tm_sec = rdcr & RDxR_SEC_MASK; tm 223 drivers/rtc/rtc-pxa.c static int pxa_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 231 drivers/rtc/rtc-pxa.c tm_calc(rycr, rdcr, tm); tm 235 drivers/rtc/rtc-pxa.c static int pxa_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 239 drivers/rtc/rtc-pxa.c rtc_writel(pxa_rtc, RYCR, ryxr_calc(tm)); tm 240 drivers/rtc/rtc-pxa.c rtc_writel(pxa_rtc, RDCR, rdxr_calc(tm)); tm 136 drivers/rtc/rtc-r7301.c static void rtc7301_get_time(struct rtc7301_priv *priv, struct rtc_time *tm, tm 141 drivers/rtc/rtc-r7301.c tm->tm_sec = rtc7301_read(priv, RTC7301_1_SEC); tm 142 drivers/rtc/rtc-r7301.c tm->tm_sec += (rtc7301_read(priv, RTC7301_10_SEC) & ~RTC7301_AE) * 10; tm 143 drivers/rtc/rtc-r7301.c tm->tm_min = rtc7301_read(priv, RTC7301_1_MIN); tm 144 drivers/rtc/rtc-r7301.c tm->tm_min += (rtc7301_read(priv, RTC7301_10_MIN) & ~RTC7301_AE) * 10; tm 145 drivers/rtc/rtc-r7301.c tm->tm_hour = rtc7301_read(priv, RTC7301_1_HOUR); tm 146 drivers/rtc/rtc-r7301.c tm->tm_hour += (rtc7301_read(priv, RTC7301_10_HOUR) & ~RTC7301_AE) * 10; tm 147 drivers/rtc/rtc-r7301.c tm->tm_mday = rtc7301_read(priv, RTC7301_1_DAY); tm 148 drivers/rtc/rtc-r7301.c tm->tm_mday += (rtc7301_read(priv, RTC7301_10_DAY) & ~RTC7301_AE) * 10; tm 151 drivers/rtc/rtc-r7301.c tm->tm_wday = -1; tm 152 drivers/rtc/rtc-r7301.c tm->tm_mon = -1; tm 153 drivers/rtc/rtc-r7301.c tm->tm_year = -1; tm 154 drivers/rtc/rtc-r7301.c tm->tm_yday = -1; tm 155 drivers/rtc/rtc-r7301.c tm->tm_isdst = -1; tm 159 drivers/rtc/rtc-r7301.c tm->tm_wday = (rtc7301_read(priv, RTC7301_DAY_OF_WEEK) & ~RTC7301_AE); tm 160 drivers/rtc/rtc-r7301.c tm->tm_mon = rtc7301_read(priv, RTC7301_10_MONTH) * 10 + tm 167 drivers/rtc/rtc-r7301.c tm->tm_year = year - 1900; tm 170 drivers/rtc/rtc-r7301.c static void rtc7301_write_time(struct rtc7301_priv *priv, struct rtc_time *tm, tm 175 drivers/rtc/rtc-r7301.c rtc7301_write(priv, tm->tm_sec % 10, RTC7301_1_SEC); tm 176 drivers/rtc/rtc-r7301.c rtc7301_write(priv, tm->tm_sec / 10, RTC7301_10_SEC); tm 178 drivers/rtc/rtc-r7301.c rtc7301_write(priv, tm->tm_min % 10, RTC7301_1_MIN); tm 179 drivers/rtc/rtc-r7301.c rtc7301_write(priv, tm->tm_min / 10, RTC7301_10_MIN); tm 181 drivers/rtc/rtc-r7301.c rtc7301_write(priv, tm->tm_hour % 10, RTC7301_1_HOUR); tm 182 drivers/rtc/rtc-r7301.c rtc7301_write(priv, tm->tm_hour / 10, RTC7301_10_HOUR); tm 184 drivers/rtc/rtc-r7301.c rtc7301_write(priv, tm->tm_mday % 10, RTC7301_1_DAY); tm 185 drivers/rtc/rtc-r7301.c rtc7301_write(priv, tm->tm_mday / 10, RTC7301_10_DAY); tm 188 drivers/rtc/rtc-r7301.c rtc7301_write(priv, alarm ? RTC7301_AE : tm->tm_wday, tm 194 drivers/rtc/rtc-r7301.c rtc7301_write(priv, (tm->tm_mon + 1) % 10, RTC7301_1_MONTH); tm 195 drivers/rtc/rtc-r7301.c rtc7301_write(priv, (tm->tm_mon + 1) / 10, RTC7301_10_MONTH); tm 197 drivers/rtc/rtc-r7301.c year = tm->tm_year + 1900; tm 213 drivers/rtc/rtc-r7301.c static int rtc7301_read_time(struct device *dev, struct rtc_time *tm) tm 225 drivers/rtc/rtc-r7301.c rtc7301_get_time(priv, tm, false); tm 232 drivers/rtc/rtc-r7301.c static int rtc7301_set_time(struct device *dev, struct rtc_time *tm) tm 242 drivers/rtc/rtc-r7301.c rtc7301_write_time(priv, tm, false); tm 59 drivers/rtc/rtc-rc5t583.c static int rc5t583_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 72 drivers/rtc/rtc-rc5t583.c tm->tm_sec = bcd2bin(rtc_data[0]); tm 73 drivers/rtc/rtc-rc5t583.c tm->tm_min = bcd2bin(rtc_data[1]); tm 74 drivers/rtc/rtc-rc5t583.c tm->tm_hour = bcd2bin(rtc_data[2]); tm 75 drivers/rtc/rtc-rc5t583.c tm->tm_wday = bcd2bin(rtc_data[3]); tm 76 drivers/rtc/rtc-rc5t583.c tm->tm_mday = bcd2bin(rtc_data[4]); tm 77 drivers/rtc/rtc-rc5t583.c tm->tm_mon = bcd2bin(rtc_data[5]) - 1; tm 78 drivers/rtc/rtc-rc5t583.c tm->tm_year = bcd2bin(rtc_data[6]) + 100; tm 83 drivers/rtc/rtc-rc5t583.c static int rc5t583_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 89 drivers/rtc/rtc-rc5t583.c rtc_data[0] = bin2bcd(tm->tm_sec); tm 90 drivers/rtc/rtc-rc5t583.c rtc_data[1] = bin2bcd(tm->tm_min); tm 91 drivers/rtc/rtc-rc5t583.c rtc_data[2] = bin2bcd(tm->tm_hour); tm 92 drivers/rtc/rtc-rc5t583.c rtc_data[3] = bin2bcd(tm->tm_wday); tm 93 drivers/rtc/rtc-rc5t583.c rtc_data[4] = bin2bcd(tm->tm_mday); tm 94 drivers/rtc/rtc-rc5t583.c rtc_data[5] = bin2bcd(tm->tm_mon + 1); tm 95 drivers/rtc/rtc-rc5t583.c rtc_data[6] = bin2bcd(tm->tm_year - 100); tm 69 drivers/rtc/rtc-rk808.c static time64_t nov2dec_transitions(struct rtc_time *tm) tm 71 drivers/rtc/rtc-rk808.c return (tm->tm_year + 1900) - 2016 + (tm->tm_mon + 1 > 11 ? 1 : 0); tm 74 drivers/rtc/rtc-rk808.c static void rockchip_to_gregorian(struct rtc_time *tm) tm 77 drivers/rtc/rtc-rk808.c time64_t time = rtc_tm_to_time64(tm); tm 78 drivers/rtc/rtc-rk808.c rtc_time64_to_tm(time + nov2dec_transitions(tm) * 86400, tm); tm 81 drivers/rtc/rtc-rk808.c static void gregorian_to_rockchip(struct rtc_time *tm) tm 83 drivers/rtc/rtc-rk808.c time64_t extra_days = nov2dec_transitions(tm); tm 84 drivers/rtc/rtc-rk808.c time64_t time = rtc_tm_to_time64(tm); tm 85 drivers/rtc/rtc-rk808.c rtc_time64_to_tm(time - extra_days * 86400, tm); tm 88 drivers/rtc/rtc-rk808.c if (nov2dec_transitions(tm) < extra_days) { tm 89 drivers/rtc/rtc-rk808.c if (tm->tm_mon + 1 == 11) tm 90 drivers/rtc/rtc-rk808.c tm->tm_mday++; /* This may result in 31! */ tm 92 drivers/rtc/rtc-rk808.c rtc_time64_to_tm(time - (extra_days - 1) * 86400, tm); tm 97 drivers/rtc/rtc-rk808.c static int rk808_rtc_readtime(struct device *dev, struct rtc_time *tm) tm 134 drivers/rtc/rtc-rk808.c tm->tm_sec = bcd2bin(rtc_data[0] & SECONDS_REG_MSK); tm 135 drivers/rtc/rtc-rk808.c tm->tm_min = bcd2bin(rtc_data[1] & MINUTES_REG_MAK); tm 136 drivers/rtc/rtc-rk808.c tm->tm_hour = bcd2bin(rtc_data[2] & HOURS_REG_MSK); tm 137 drivers/rtc/rtc-rk808.c tm->tm_mday = bcd2bin(rtc_data[3] & DAYS_REG_MSK); tm 138 drivers/rtc/rtc-rk808.c tm->tm_mon = (bcd2bin(rtc_data[4] & MONTHS_REG_MSK)) - 1; tm 139 drivers/rtc/rtc-rk808.c tm->tm_year = (bcd2bin(rtc_data[5] & YEARS_REG_MSK)) + 100; tm 140 drivers/rtc/rtc-rk808.c tm->tm_wday = bcd2bin(rtc_data[6] & WEEKS_REG_MSK); tm 141 drivers/rtc/rtc-rk808.c rockchip_to_gregorian(tm); tm 142 drivers/rtc/rtc-rk808.c dev_dbg(dev, "RTC date/time %ptRd(%d) %ptRt\n", tm, tm->tm_wday, tm); tm 148 drivers/rtc/rtc-rk808.c static int rk808_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 155 drivers/rtc/rtc-rk808.c dev_dbg(dev, "set RTC date/time %ptRd(%d) %ptRt\n", tm, tm->tm_wday, tm); tm 156 drivers/rtc/rtc-rk808.c gregorian_to_rockchip(tm); tm 157 drivers/rtc/rtc-rk808.c rtc_data[0] = bin2bcd(tm->tm_sec); tm 158 drivers/rtc/rtc-rk808.c rtc_data[1] = bin2bcd(tm->tm_min); tm 159 drivers/rtc/rtc-rk808.c rtc_data[2] = bin2bcd(tm->tm_hour); tm 160 drivers/rtc/rtc-rk808.c rtc_data[3] = bin2bcd(tm->tm_mday); tm 161 drivers/rtc/rtc-rk808.c rtc_data[4] = bin2bcd(tm->tm_mon + 1); tm 162 drivers/rtc/rtc-rk808.c rtc_data[5] = bin2bcd(tm->tm_year - 100); tm 163 drivers/rtc/rtc-rk808.c rtc_data[6] = bin2bcd(tm->tm_wday); tm 93 drivers/rtc/rtc-rp5c01.c static int rp5c01_read_time(struct device *dev, struct rtc_time *tm) tm 100 drivers/rtc/rtc-rp5c01.c tm->tm_sec = rp5c01_read(priv, RP5C01_10_SECOND) * 10 + tm 102 drivers/rtc/rtc-rp5c01.c tm->tm_min = rp5c01_read(priv, RP5C01_10_MINUTE) * 10 + tm 104 drivers/rtc/rtc-rp5c01.c tm->tm_hour = rp5c01_read(priv, RP5C01_10_HOUR) * 10 + tm 106 drivers/rtc/rtc-rp5c01.c tm->tm_mday = rp5c01_read(priv, RP5C01_10_DAY) * 10 + tm 108 drivers/rtc/rtc-rp5c01.c tm->tm_wday = rp5c01_read(priv, RP5C01_DAY_OF_WEEK); tm 109 drivers/rtc/rtc-rp5c01.c tm->tm_mon = rp5c01_read(priv, RP5C01_10_MONTH) * 10 + tm 111 drivers/rtc/rtc-rp5c01.c tm->tm_year = rp5c01_read(priv, RP5C01_10_YEAR) * 10 + tm 113 drivers/rtc/rtc-rp5c01.c if (tm->tm_year <= 69) tm 114 drivers/rtc/rtc-rp5c01.c tm->tm_year += 100; tm 122 drivers/rtc/rtc-rp5c01.c static int rp5c01_set_time(struct device *dev, struct rtc_time *tm) tm 129 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_sec / 10, RP5C01_10_SECOND); tm 130 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_sec % 10, RP5C01_1_SECOND); tm 131 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_min / 10, RP5C01_10_MINUTE); tm 132 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_min % 10, RP5C01_1_MINUTE); tm 133 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_hour / 10, RP5C01_10_HOUR); tm 134 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_hour % 10, RP5C01_1_HOUR); tm 135 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_mday / 10, RP5C01_10_DAY); tm 136 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_mday % 10, RP5C01_1_DAY); tm 137 drivers/rtc/rtc-rp5c01.c if (tm->tm_wday != -1) tm 138 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_wday, RP5C01_DAY_OF_WEEK); tm 139 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, (tm->tm_mon + 1) / 10, RP5C01_10_MONTH); tm 140 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, (tm->tm_mon + 1) % 10, RP5C01_1_MONTH); tm 141 drivers/rtc/rtc-rp5c01.c if (tm->tm_year >= 100) tm 142 drivers/rtc/rtc-rp5c01.c tm->tm_year -= 100; tm 143 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_year / 10, RP5C01_10_YEAR); tm 144 drivers/rtc/rtc-rp5c01.c rp5c01_write(priv, tm->tm_year % 10, RP5C01_1_YEAR); tm 213 drivers/rtc/rtc-rs5c313.c static int rs5c313_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 239 drivers/rtc/rtc-rs5c313.c tm->tm_sec = bcd2bin(data); tm 243 drivers/rtc/rtc-rs5c313.c tm->tm_min = bcd2bin(data); tm 247 drivers/rtc/rtc-rs5c313.c tm->tm_hour = bcd2bin(data); tm 251 drivers/rtc/rtc-rs5c313.c tm->tm_mday = bcd2bin(data); tm 255 drivers/rtc/rtc-rs5c313.c tm->tm_mon = bcd2bin(data) - 1; tm 259 drivers/rtc/rtc-rs5c313.c tm->tm_year = bcd2bin(data); tm 261 drivers/rtc/rtc-rs5c313.c if (tm->tm_year < 70) tm 262 drivers/rtc/rtc-rs5c313.c tm->tm_year += 100; tm 265 drivers/rtc/rtc-rs5c313.c tm->tm_wday = bcd2bin(data); tm 273 drivers/rtc/rtc-rs5c313.c static int rs5c313_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 298 drivers/rtc/rtc-rs5c313.c data = bin2bcd(tm->tm_sec); tm 302 drivers/rtc/rtc-rs5c313.c data = bin2bcd(tm->tm_min); tm 306 drivers/rtc/rtc-rs5c313.c data = bin2bcd(tm->tm_hour); tm 310 drivers/rtc/rtc-rs5c313.c data = bin2bcd(tm->tm_mday); tm 314 drivers/rtc/rtc-rs5c313.c data = bin2bcd(tm->tm_mon + 1); tm 318 drivers/rtc/rtc-rs5c313.c data = bin2bcd(tm->tm_year % 100); tm 322 drivers/rtc/rtc-rs5c313.c data = bin2bcd(tm->tm_wday); tm 333 drivers/rtc/rtc-rs5c313.c struct rtc_time tm; tm 350 drivers/rtc/rtc-rs5c313.c memset(&tm, 0, sizeof(struct rtc_time)); tm 351 drivers/rtc/rtc-rs5c313.c tm.tm_mday = 1; tm 352 drivers/rtc/rtc-rs5c313.c tm.tm_mon = 1 - 1; tm 353 drivers/rtc/rtc-rs5c313.c tm.tm_year = 2000 - 1900; tm 355 drivers/rtc/rtc-rs5c313.c rs5c313_rtc_set_time(NULL, &tm); tm 59 drivers/rtc/rtc-rs5c348.c rs5c348_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 85 drivers/rtc/rtc-rs5c348.c txp[RS5C348_REG_SECS] = bin2bcd(tm->tm_sec); tm 86 drivers/rtc/rtc-rs5c348.c txp[RS5C348_REG_MINS] = bin2bcd(tm->tm_min); tm 88 drivers/rtc/rtc-rs5c348.c txp[RS5C348_REG_HOURS] = bin2bcd(tm->tm_hour); tm 91 drivers/rtc/rtc-rs5c348.c txp[RS5C348_REG_HOURS] = bin2bcd((tm->tm_hour + 11) % 12 + 1) | tm 92 drivers/rtc/rtc-rs5c348.c (tm->tm_hour >= 12 ? RS5C348_BIT_PM : 0); tm 94 drivers/rtc/rtc-rs5c348.c txp[RS5C348_REG_WDAY] = bin2bcd(tm->tm_wday); tm 95 drivers/rtc/rtc-rs5c348.c txp[RS5C348_REG_DAY] = bin2bcd(tm->tm_mday); tm 96 drivers/rtc/rtc-rs5c348.c txp[RS5C348_REG_MONTH] = bin2bcd(tm->tm_mon + 1) | tm 97 drivers/rtc/rtc-rs5c348.c (tm->tm_year >= 100 ? RS5C348_BIT_Y2K : 0); tm 98 drivers/rtc/rtc-rs5c348.c txp[RS5C348_REG_YEAR] = bin2bcd(tm->tm_year % 100); tm 106 drivers/rtc/rtc-rs5c348.c rs5c348_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 137 drivers/rtc/rtc-rs5c348.c tm->tm_sec = bcd2bin(rxbuf[RS5C348_REG_SECS] & RS5C348_SECS_MASK); tm 138 drivers/rtc/rtc-rs5c348.c tm->tm_min = bcd2bin(rxbuf[RS5C348_REG_MINS] & RS5C348_MINS_MASK); tm 139 drivers/rtc/rtc-rs5c348.c tm->tm_hour = bcd2bin(rxbuf[RS5C348_REG_HOURS] & RS5C348_HOURS_MASK); tm 142 drivers/rtc/rtc-rs5c348.c tm->tm_hour -= 20; tm 143 drivers/rtc/rtc-rs5c348.c tm->tm_hour %= 12; tm 144 drivers/rtc/rtc-rs5c348.c tm->tm_hour += 12; tm 146 drivers/rtc/rtc-rs5c348.c tm->tm_hour %= 12; tm 148 drivers/rtc/rtc-rs5c348.c tm->tm_wday = bcd2bin(rxbuf[RS5C348_REG_WDAY] & RS5C348_WDAY_MASK); tm 149 drivers/rtc/rtc-rs5c348.c tm->tm_mday = bcd2bin(rxbuf[RS5C348_REG_DAY] & RS5C348_DAY_MASK); tm 150 drivers/rtc/rtc-rs5c348.c tm->tm_mon = tm 153 drivers/rtc/rtc-rs5c348.c tm->tm_year = bcd2bin(rxbuf[RS5C348_REG_YEAR]) + tm 209 drivers/rtc/rtc-rs5c372.c static int rs5c372_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 235 drivers/rtc/rtc-rs5c372.c tm->tm_sec = bcd2bin(rs5c->regs[RS5C372_REG_SECS] & 0x7f); tm 236 drivers/rtc/rtc-rs5c372.c tm->tm_min = bcd2bin(rs5c->regs[RS5C372_REG_MINS] & 0x7f); tm 237 drivers/rtc/rtc-rs5c372.c tm->tm_hour = rs5c_reg2hr(rs5c, rs5c->regs[RS5C372_REG_HOURS]); tm 239 drivers/rtc/rtc-rs5c372.c tm->tm_wday = bcd2bin(rs5c->regs[RS5C372_REG_WDAY] & 0x07); tm 240 drivers/rtc/rtc-rs5c372.c tm->tm_mday = bcd2bin(rs5c->regs[RS5C372_REG_DAY] & 0x3f); tm 243 drivers/rtc/rtc-rs5c372.c tm->tm_mon = bcd2bin(rs5c->regs[RS5C372_REG_MONTH] & 0x1f) - 1; tm 246 drivers/rtc/rtc-rs5c372.c tm->tm_year = bcd2bin(rs5c->regs[RS5C372_REG_YEAR]) + 100; tm 251 drivers/rtc/rtc-rs5c372.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 252 drivers/rtc/rtc-rs5c372.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 257 drivers/rtc/rtc-rs5c372.c static int rs5c372_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 268 drivers/rtc/rtc-rs5c372.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 269 drivers/rtc/rtc-rs5c372.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 272 drivers/rtc/rtc-rs5c372.c buf[0] = bin2bcd(tm->tm_sec); tm 273 drivers/rtc/rtc-rs5c372.c buf[1] = bin2bcd(tm->tm_min); tm 274 drivers/rtc/rtc-rs5c372.c buf[2] = rs5c_hr2reg(rs5c, tm->tm_hour); tm 275 drivers/rtc/rtc-rs5c372.c buf[3] = bin2bcd(tm->tm_wday); tm 276 drivers/rtc/rtc-rs5c372.c buf[4] = bin2bcd(tm->tm_mday); tm 277 drivers/rtc/rtc-rs5c372.c buf[5] = bin2bcd(tm->tm_mon + 1); tm 278 drivers/rtc/rtc-rs5c372.c buf[6] = bin2bcd(tm->tm_year - 100); tm 83 drivers/rtc/rtc-rtd119x.c static int rtd119x_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 92 drivers/rtc/rtc-rtd119x.c tm->tm_sec = (readl_relaxed(data->base + RTD_RTCSEC) & RTD_RTCSEC_RTCSEC_MASK) >> 1; tm 93 drivers/rtc/rtc-rtd119x.c tm->tm_min = readl_relaxed(data->base + RTD_RTCMIN) & RTD_RTCMIN_RTCMIN_MASK; tm 94 drivers/rtc/rtc-rtd119x.c tm->tm_hour = readl_relaxed(data->base + RTD_RTCHR) & RTD_RTCHR_RTCHR_MASK; tm 100 drivers/rtc/rtc-rtd119x.c if (sec == tm->tm_sec) tm 114 drivers/rtc/rtc-rtd119x.c tm->tm_year = year - 1900; tm 115 drivers/rtc/rtc-rtd119x.c tm->tm_yday = day; tm 117 drivers/rtc/rtc-rtd119x.c tm->tm_mon = 0; tm 118 drivers/rtc/rtc-rtd119x.c while (day >= rtc_month_days(tm->tm_mon, year)) { tm 119 drivers/rtc/rtc-rtd119x.c day -= rtc_month_days(tm->tm_mon, year); tm 120 drivers/rtc/rtc-rtd119x.c tm->tm_mon++; tm 122 drivers/rtc/rtc-rtd119x.c tm->tm_mday = day + 1; tm 127 drivers/rtc/rtc-rtd119x.c static int rtd119x_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 133 drivers/rtc/rtc-rtd119x.c if (1900 + tm->tm_year < data->base_year) tm 137 drivers/rtc/rtc-rtd119x.c for (i = data->base_year; i < 1900 + tm->tm_year; i++) tm 140 drivers/rtc/rtc-rtd119x.c day += tm->tm_yday; tm 146 drivers/rtc/rtc-rtd119x.c writel_relaxed((tm->tm_sec << 1) & RTD_RTCSEC_RTCSEC_MASK, data->base + RTD_RTCSEC); tm 147 drivers/rtc/rtc-rtd119x.c writel_relaxed(tm->tm_min & RTD_RTCMIN_RTCMIN_MASK, data->base + RTD_RTCMIN); tm 148 drivers/rtc/rtc-rtd119x.c writel_relaxed(tm->tm_hour & RTD_RTCHR_RTCHR_MASK, data->base + RTD_RTCHR); tm 107 drivers/rtc/rtc-rv3028.c struct rtc_time tm; tm 123 drivers/rtc/rtc-rv3028.c tm.tm_sec = bcd2bin(date[0]); tm 124 drivers/rtc/rtc-rv3028.c tm.tm_min = bcd2bin(date[1]); tm 125 drivers/rtc/rtc-rv3028.c tm.tm_hour = bcd2bin(date[2]); tm 126 drivers/rtc/rtc-rv3028.c tm.tm_mday = bcd2bin(date[3]); tm 127 drivers/rtc/rtc-rv3028.c tm.tm_mon = bcd2bin(date[4]) - 1; tm 128 drivers/rtc/rtc-rv3028.c tm.tm_year = bcd2bin(date[5]) + 100; tm 130 drivers/rtc/rtc-rv3028.c ret = rtc_valid_tm(&tm); tm 135 drivers/rtc/rtc-rv3028.c (unsigned long long)rtc_tm_to_time64(&tm)); tm 212 drivers/rtc/rtc-rv3028.c static int rv3028_get_time(struct device *dev, struct rtc_time *tm) tm 231 drivers/rtc/rtc-rv3028.c tm->tm_sec = bcd2bin(date[RV3028_SEC] & 0x7f); tm 232 drivers/rtc/rtc-rv3028.c tm->tm_min = bcd2bin(date[RV3028_MIN] & 0x7f); tm 233 drivers/rtc/rtc-rv3028.c tm->tm_hour = bcd2bin(date[RV3028_HOUR] & 0x3f); tm 234 drivers/rtc/rtc-rv3028.c tm->tm_wday = ilog2(date[RV3028_WDAY] & 0x7f); tm 235 drivers/rtc/rtc-rv3028.c tm->tm_mday = bcd2bin(date[RV3028_DAY] & 0x3f); tm 236 drivers/rtc/rtc-rv3028.c tm->tm_mon = bcd2bin(date[RV3028_MONTH] & 0x1f) - 1; tm 237 drivers/rtc/rtc-rv3028.c tm->tm_year = bcd2bin(date[RV3028_YEAR]) + 100; tm 242 drivers/rtc/rtc-rv3028.c static int rv3028_set_time(struct device *dev, struct rtc_time *tm) tm 248 drivers/rtc/rtc-rv3028.c date[RV3028_SEC] = bin2bcd(tm->tm_sec); tm 249 drivers/rtc/rtc-rv3028.c date[RV3028_MIN] = bin2bcd(tm->tm_min); tm 250 drivers/rtc/rtc-rv3028.c date[RV3028_HOUR] = bin2bcd(tm->tm_hour); tm 251 drivers/rtc/rtc-rv3028.c date[RV3028_WDAY] = 1 << (tm->tm_wday); tm 252 drivers/rtc/rtc-rv3028.c date[RV3028_DAY] = bin2bcd(tm->tm_mday); tm 253 drivers/rtc/rtc-rv3028.c date[RV3028_MONTH] = bin2bcd(tm->tm_mon + 1); tm 254 drivers/rtc/rtc-rv3028.c date[RV3028_YEAR] = bin2bcd(tm->tm_year - 100); tm 369 drivers/rtc/rtc-rv3029c2.c static int rv3029_read_time(struct device *dev, struct rtc_time *tm) tm 388 drivers/rtc/rtc-rv3029c2.c tm->tm_sec = bcd2bin(regs[RV3029_W_SEC - RV3029_W_SEC]); tm 389 drivers/rtc/rtc-rv3029c2.c tm->tm_min = bcd2bin(regs[RV3029_W_MINUTES - RV3029_W_SEC]); tm 397 drivers/rtc/rtc-rv3029c2.c tm->tm_hour = bcd2bin(_hr & 0x1f); tm 399 drivers/rtc/rtc-rv3029c2.c tm->tm_hour += 12; tm 401 drivers/rtc/rtc-rv3029c2.c tm->tm_hour = bcd2bin(_hr & 0x3f); tm 404 drivers/rtc/rtc-rv3029c2.c tm->tm_mday = bcd2bin(regs[RV3029_W_DATE - RV3029_W_SEC]); tm 405 drivers/rtc/rtc-rv3029c2.c tm->tm_mon = bcd2bin(regs[RV3029_W_MONTHS - RV3029_W_SEC]) - 1; tm 406 drivers/rtc/rtc-rv3029c2.c tm->tm_year = bcd2bin(regs[RV3029_W_YEARS - RV3029_W_SEC]) + 100; tm 407 drivers/rtc/rtc-rv3029c2.c tm->tm_wday = bcd2bin(regs[RV3029_W_DAYS - RV3029_W_SEC]) - 1; tm 414 drivers/rtc/rtc-rv3029c2.c struct rtc_time *const tm = &alarm->time; tm 443 drivers/rtc/rtc-rv3029c2.c tm->tm_sec = bcd2bin(regs[RV3029_A_SC - RV3029_A_SC] & 0x7f); tm 444 drivers/rtc/rtc-rv3029c2.c tm->tm_min = bcd2bin(regs[RV3029_A_MN - RV3029_A_SC] & 0x7f); tm 445 drivers/rtc/rtc-rv3029c2.c tm->tm_hour = bcd2bin(regs[RV3029_A_HR - RV3029_A_SC] & 0x3f); tm 446 drivers/rtc/rtc-rv3029c2.c tm->tm_mday = bcd2bin(regs[RV3029_A_DT - RV3029_A_SC] & 0x3f); tm 447 drivers/rtc/rtc-rv3029c2.c tm->tm_mon = bcd2bin(regs[RV3029_A_MO - RV3029_A_SC] & 0x1f) - 1; tm 448 drivers/rtc/rtc-rv3029c2.c tm->tm_year = bcd2bin(regs[RV3029_A_YR - RV3029_A_SC] & 0x7f) + 100; tm 449 drivers/rtc/rtc-rv3029c2.c tm->tm_wday = bcd2bin(regs[RV3029_A_DW - RV3029_A_SC] & 0x07) - 1; tm 485 drivers/rtc/rtc-rv3029c2.c struct rtc_time *const tm = &alarm->time; tm 494 drivers/rtc/rtc-rv3029c2.c if (tm->tm_year < 100) tm 504 drivers/rtc/rtc-rv3029c2.c regs[RV3029_A_SC - RV3029_A_SC] = bin2bcd(tm->tm_sec) | RV3029_A_AE_X; tm 505 drivers/rtc/rtc-rv3029c2.c regs[RV3029_A_MN - RV3029_A_SC] = bin2bcd(tm->tm_min) | RV3029_A_AE_X; tm 506 drivers/rtc/rtc-rv3029c2.c regs[RV3029_A_HR - RV3029_A_SC] = (bin2bcd(tm->tm_hour) & 0x3f) tm 508 drivers/rtc/rtc-rv3029c2.c regs[RV3029_A_DT - RV3029_A_SC] = (bin2bcd(tm->tm_mday) & 0x3f) tm 510 drivers/rtc/rtc-rv3029c2.c regs[RV3029_A_MO - RV3029_A_SC] = (bin2bcd(tm->tm_mon + 1) & 0x1f) tm 512 drivers/rtc/rtc-rv3029c2.c regs[RV3029_A_DW - RV3029_A_SC] = (bin2bcd(tm->tm_wday + 1) & 0x7) tm 514 drivers/rtc/rtc-rv3029c2.c regs[RV3029_A_YR - RV3029_A_SC] = (bin2bcd(tm->tm_year - 100)) tm 538 drivers/rtc/rtc-rv3029c2.c static int rv3029_set_time(struct device *dev, struct rtc_time *tm) tm 548 drivers/rtc/rtc-rv3029c2.c if (tm->tm_year < 100) tm 551 drivers/rtc/rtc-rv3029c2.c regs[RV3029_W_SEC - RV3029_W_SEC] = bin2bcd(tm->tm_sec); tm 552 drivers/rtc/rtc-rv3029c2.c regs[RV3029_W_MINUTES - RV3029_W_SEC] = bin2bcd(tm->tm_min); tm 553 drivers/rtc/rtc-rv3029c2.c regs[RV3029_W_HOURS - RV3029_W_SEC] = bin2bcd(tm->tm_hour); tm 554 drivers/rtc/rtc-rv3029c2.c regs[RV3029_W_DATE - RV3029_W_SEC] = bin2bcd(tm->tm_mday); tm 555 drivers/rtc/rtc-rv3029c2.c regs[RV3029_W_MONTHS - RV3029_W_SEC] = bin2bcd(tm->tm_mon + 1); tm 556 drivers/rtc/rtc-rv3029c2.c regs[RV3029_W_DAYS - RV3029_W_SEC] = bin2bcd(tm->tm_wday + 1) & 0x7; tm 557 drivers/rtc/rtc-rv3029c2.c regs[RV3029_W_YEARS - RV3029_W_SEC] = bin2bcd(tm->tm_year - 100); tm 188 drivers/rtc/rtc-rv8803.c static int rv8803_get_time(struct device *dev, struct rtc_time *tm) tm 218 drivers/rtc/rtc-rv8803.c tm->tm_sec = bcd2bin(date[RV8803_SEC] & 0x7f); tm 219 drivers/rtc/rtc-rv8803.c tm->tm_min = bcd2bin(date[RV8803_MIN] & 0x7f); tm 220 drivers/rtc/rtc-rv8803.c tm->tm_hour = bcd2bin(date[RV8803_HOUR] & 0x3f); tm 221 drivers/rtc/rtc-rv8803.c tm->tm_wday = ilog2(date[RV8803_WEEK] & 0x7f); tm 222 drivers/rtc/rtc-rv8803.c tm->tm_mday = bcd2bin(date[RV8803_DAY] & 0x3f); tm 223 drivers/rtc/rtc-rv8803.c tm->tm_mon = bcd2bin(date[RV8803_MONTH] & 0x1f) - 1; tm 224 drivers/rtc/rtc-rv8803.c tm->tm_year = bcd2bin(date[RV8803_YEAR]) + 100; tm 229 drivers/rtc/rtc-rv8803.c static int rv8803_set_time(struct device *dev, struct rtc_time *tm) tm 245 drivers/rtc/rtc-rv8803.c date[RV8803_SEC] = bin2bcd(tm->tm_sec); tm 246 drivers/rtc/rtc-rv8803.c date[RV8803_MIN] = bin2bcd(tm->tm_min); tm 247 drivers/rtc/rtc-rv8803.c date[RV8803_HOUR] = bin2bcd(tm->tm_hour); tm 248 drivers/rtc/rtc-rv8803.c date[RV8803_WEEK] = 1 << (tm->tm_wday); tm 249 drivers/rtc/rtc-rv8803.c date[RV8803_DAY] = bin2bcd(tm->tm_mday); tm 250 drivers/rtc/rtc-rv8803.c date[RV8803_MONTH] = bin2bcd(tm->tm_mon + 1); tm 251 drivers/rtc/rtc-rv8803.c date[RV8803_YEAR] = bin2bcd(tm->tm_year - 100); tm 94 drivers/rtc/rtc-rx4581.c static int rx4581_get_datetime(struct device *dev, struct rtc_time *tm) tm 150 drivers/rtc/rtc-rx4581.c tm->tm_sec = bcd2bin(date[RX4581_REG_SC] & 0x7F); tm 151 drivers/rtc/rtc-rx4581.c tm->tm_min = bcd2bin(date[RX4581_REG_MN] & 0x7F); tm 152 drivers/rtc/rtc-rx4581.c tm->tm_hour = bcd2bin(date[RX4581_REG_HR] & 0x3F); /* rtc hr 0-23 */ tm 153 drivers/rtc/rtc-rx4581.c tm->tm_wday = ilog2(date[RX4581_REG_DW] & 0x7F); tm 154 drivers/rtc/rtc-rx4581.c tm->tm_mday = bcd2bin(date[RX4581_REG_DM] & 0x3F); tm 155 drivers/rtc/rtc-rx4581.c tm->tm_mon = bcd2bin(date[RX4581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ tm 156 drivers/rtc/rtc-rx4581.c tm->tm_year = bcd2bin(date[RX4581_REG_YR]); tm 157 drivers/rtc/rtc-rx4581.c if (tm->tm_year < 70) tm 158 drivers/rtc/rtc-rx4581.c tm->tm_year += 100; /* assume we are in 1970...2069 */ tm 164 drivers/rtc/rtc-rx4581.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 165 drivers/rtc/rtc-rx4581.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 170 drivers/rtc/rtc-rx4581.c static int rx4581_set_datetime(struct device *dev, struct rtc_time *tm) tm 179 drivers/rtc/rtc-rx4581.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 180 drivers/rtc/rtc-rx4581.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 184 drivers/rtc/rtc-rx4581.c buf[RX4581_REG_SC+1] = bin2bcd(tm->tm_sec); tm 185 drivers/rtc/rtc-rx4581.c buf[RX4581_REG_MN+1] = bin2bcd(tm->tm_min); tm 186 drivers/rtc/rtc-rx4581.c buf[RX4581_REG_HR+1] = bin2bcd(tm->tm_hour); tm 188 drivers/rtc/rtc-rx4581.c buf[RX4581_REG_DM+1] = bin2bcd(tm->tm_mday); tm 191 drivers/rtc/rtc-rx4581.c buf[RX4581_REG_MO+1] = bin2bcd(tm->tm_mon + 1); tm 194 drivers/rtc/rtc-rx4581.c buf[RX4581_REG_YR+1] = bin2bcd(tm->tm_year % 100); tm 195 drivers/rtc/rtc-rx4581.c buf[RX4581_REG_DW+1] = (0x1 << tm->tm_wday); tm 117 drivers/rtc/rtc-rx6110.c static int rx6110_rtc_tm_to_data(struct rtc_time *tm, u8 *data) tm 119 drivers/rtc/rtc-rx6110.c pr_debug("%s: date %ptRr\n", __func__, tm); tm 126 drivers/rtc/rtc-rx6110.c if (tm->tm_year < 100 || tm->tm_year >= 200) tm 129 drivers/rtc/rtc-rx6110.c data[RTC_SEC] = bin2bcd(tm->tm_sec); tm 130 drivers/rtc/rtc-rx6110.c data[RTC_MIN] = bin2bcd(tm->tm_min); tm 131 drivers/rtc/rtc-rx6110.c data[RTC_HOUR] = bin2bcd(tm->tm_hour); tm 132 drivers/rtc/rtc-rx6110.c data[RTC_WDAY] = BIT(bin2bcd(tm->tm_wday)); tm 133 drivers/rtc/rtc-rx6110.c data[RTC_MDAY] = bin2bcd(tm->tm_mday); tm 134 drivers/rtc/rtc-rx6110.c data[RTC_MONTH] = bin2bcd(tm->tm_mon + 1); tm 135 drivers/rtc/rtc-rx6110.c data[RTC_YEAR] = bin2bcd(tm->tm_year % 100); tm 146 drivers/rtc/rtc-rx6110.c static int rx6110_data_to_rtc_tm(u8 *data, struct rtc_time *tm) tm 148 drivers/rtc/rtc-rx6110.c tm->tm_sec = bcd2bin(data[RTC_SEC] & 0x7f); tm 149 drivers/rtc/rtc-rx6110.c tm->tm_min = bcd2bin(data[RTC_MIN] & 0x7f); tm 151 drivers/rtc/rtc-rx6110.c tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3f); tm 152 drivers/rtc/rtc-rx6110.c tm->tm_wday = ffs(data[RTC_WDAY] & 0x7f); tm 153 drivers/rtc/rtc-rx6110.c tm->tm_mday = bcd2bin(data[RTC_MDAY] & 0x3f); tm 154 drivers/rtc/rtc-rx6110.c tm->tm_mon = bcd2bin(data[RTC_MONTH] & 0x1f) - 1; tm 155 drivers/rtc/rtc-rx6110.c tm->tm_year = bcd2bin(data[RTC_YEAR]) + 100; tm 157 drivers/rtc/rtc-rx6110.c pr_debug("%s: date %ptRr\n", __func__, tm); tm 164 drivers/rtc/rtc-rx6110.c if (tm->tm_year < 100 || tm->tm_year >= 200) tm 183 drivers/rtc/rtc-rx6110.c static int rx6110_set_time(struct device *dev, struct rtc_time *tm) tm 189 drivers/rtc/rtc-rx6110.c ret = rx6110_rtc_tm_to_data(tm, data); tm 222 drivers/rtc/rtc-rx6110.c static int rx6110_get_time(struct device *dev, struct rtc_time *tm) tm 245 drivers/rtc/rtc-rx6110.c ret = rx6110_data_to_rtc_tm(data, tm); tm 249 drivers/rtc/rtc-rx6110.c dev_dbg(dev, "%s: date %ptRr\n", __func__, tm); tm 70 drivers/rtc/rtc-rx8581.c static int rx8581_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 119 drivers/rtc/rtc-rx8581.c tm->tm_sec = bcd2bin(date[RX8581_REG_SC] & 0x7F); tm 120 drivers/rtc/rtc-rx8581.c tm->tm_min = bcd2bin(date[RX8581_REG_MN] & 0x7F); tm 121 drivers/rtc/rtc-rx8581.c tm->tm_hour = bcd2bin(date[RX8581_REG_HR] & 0x3F); /* rtc hr 0-23 */ tm 122 drivers/rtc/rtc-rx8581.c tm->tm_wday = ilog2(date[RX8581_REG_DW] & 0x7F); tm 123 drivers/rtc/rtc-rx8581.c tm->tm_mday = bcd2bin(date[RX8581_REG_DM] & 0x3F); tm 124 drivers/rtc/rtc-rx8581.c tm->tm_mon = bcd2bin(date[RX8581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ tm 125 drivers/rtc/rtc-rx8581.c tm->tm_year = bcd2bin(date[RX8581_REG_YR]) + 100; tm 130 drivers/rtc/rtc-rx8581.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 131 drivers/rtc/rtc-rx8581.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 136 drivers/rtc/rtc-rx8581.c static int rx8581_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 146 drivers/rtc/rtc-rx8581.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 147 drivers/rtc/rtc-rx8581.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 150 drivers/rtc/rtc-rx8581.c buf[RX8581_REG_SC] = bin2bcd(tm->tm_sec); tm 151 drivers/rtc/rtc-rx8581.c buf[RX8581_REG_MN] = bin2bcd(tm->tm_min); tm 152 drivers/rtc/rtc-rx8581.c buf[RX8581_REG_HR] = bin2bcd(tm->tm_hour); tm 154 drivers/rtc/rtc-rx8581.c buf[RX8581_REG_DM] = bin2bcd(tm->tm_mday); tm 157 drivers/rtc/rtc-rx8581.c buf[RX8581_REG_MO] = bin2bcd(tm->tm_mon + 1); tm 160 drivers/rtc/rtc-rx8581.c buf[RX8581_REG_YR] = bin2bcd(tm->tm_year - 100); tm 161 drivers/rtc/rtc-rx8581.c buf[RX8581_REG_DW] = (0x1 << tm->tm_wday); tm 210 drivers/rtc/rtc-s35390a.c static int s35390a_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 218 drivers/rtc/rtc-s35390a.c "mon=%d, year=%d, wday=%d\n", __func__, tm->tm_sec, tm 219 drivers/rtc/rtc-s35390a.c tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, tm 220 drivers/rtc/rtc-s35390a.c tm->tm_wday); tm 225 drivers/rtc/rtc-s35390a.c buf[S35390A_BYTE_YEAR] = bin2bcd(tm->tm_year - 100); tm 226 drivers/rtc/rtc-s35390a.c buf[S35390A_BYTE_MONTH] = bin2bcd(tm->tm_mon + 1); tm 227 drivers/rtc/rtc-s35390a.c buf[S35390A_BYTE_DAY] = bin2bcd(tm->tm_mday); tm 228 drivers/rtc/rtc-s35390a.c buf[S35390A_BYTE_WDAY] = bin2bcd(tm->tm_wday); tm 229 drivers/rtc/rtc-s35390a.c buf[S35390A_BYTE_HOURS] = s35390a_hr2reg(s35390a, tm->tm_hour); tm 230 drivers/rtc/rtc-s35390a.c buf[S35390A_BYTE_MINS] = bin2bcd(tm->tm_min); tm 231 drivers/rtc/rtc-s35390a.c buf[S35390A_BYTE_SECS] = bin2bcd(tm->tm_sec); tm 242 drivers/rtc/rtc-s35390a.c static int s35390a_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 260 drivers/rtc/rtc-s35390a.c tm->tm_sec = bcd2bin(buf[S35390A_BYTE_SECS]); tm 261 drivers/rtc/rtc-s35390a.c tm->tm_min = bcd2bin(buf[S35390A_BYTE_MINS]); tm 262 drivers/rtc/rtc-s35390a.c tm->tm_hour = s35390a_reg2hr(s35390a, buf[S35390A_BYTE_HOURS]); tm 263 drivers/rtc/rtc-s35390a.c tm->tm_wday = bcd2bin(buf[S35390A_BYTE_WDAY]); tm 264 drivers/rtc/rtc-s35390a.c tm->tm_mday = bcd2bin(buf[S35390A_BYTE_DAY]); tm 265 drivers/rtc/rtc-s35390a.c tm->tm_mon = bcd2bin(buf[S35390A_BYTE_MONTH]) - 1; tm 266 drivers/rtc/rtc-s35390a.c tm->tm_year = bcd2bin(buf[S35390A_BYTE_YEAR]) + 100; tm 269 drivers/rtc/rtc-s35390a.c "mon=%d, year=%d, wday=%d\n", __func__, tm->tm_sec, tm 270 drivers/rtc/rtc-s35390a.c tm->tm_min, tm->tm_hour, tm->tm_mday, tm->tm_mon, tm->tm_year, tm 271 drivers/rtc/rtc-s35390a.c tm->tm_wday); tm 218 drivers/rtc/rtc-s3c.c static int s3c_rtc_settime(struct device *dev, struct rtc_time *tm) tm 221 drivers/rtc/rtc-s3c.c int year = tm->tm_year - 100; tm 224 drivers/rtc/rtc-s3c.c dev_dbg(dev, "set time %ptR\n", tm); tm 237 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_sec), info->base + S3C2410_RTCSEC); tm 238 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_min), info->base + S3C2410_RTCMIN); tm 239 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_hour), info->base + S3C2410_RTCHOUR); tm 240 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_mday), info->base + S3C2410_RTCDATE); tm 241 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_mon + 1), info->base + S3C2410_RTCMON); tm 302 drivers/rtc/rtc-s3c.c struct rtc_time *tm = &alrm->time; tm 306 drivers/rtc/rtc-s3c.c dev_dbg(dev, "s3c_rtc_setalarm: %d, %ptR\n", alrm->enabled, tm); tm 315 drivers/rtc/rtc-s3c.c if (tm->tm_sec < 60 && tm->tm_sec >= 0) { tm 317 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_sec), info->base + S3C2410_ALMSEC); tm 320 drivers/rtc/rtc-s3c.c if (tm->tm_min < 60 && tm->tm_min >= 0) { tm 322 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_min), info->base + S3C2410_ALMMIN); tm 325 drivers/rtc/rtc-s3c.c if (tm->tm_hour < 24 && tm->tm_hour >= 0) { tm 327 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_hour), info->base + S3C2410_ALMHOUR); tm 330 drivers/rtc/rtc-s3c.c if (tm->tm_mon < 12 && tm->tm_mon >= 0) { tm 332 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_mon + 1), info->base + S3C2410_ALMMON); tm 335 drivers/rtc/rtc-s3c.c if (tm->tm_mday <= 31 && tm->tm_mday >= 1) { tm 337 drivers/rtc/rtc-s3c.c writeb(bin2bcd(tm->tm_mday), info->base + S3C2410_ALMDATE); tm 173 drivers/rtc/rtc-s5m.c static void s5m8767_data_to_tm(u8 *data, struct rtc_time *tm, tm 176 drivers/rtc/rtc-s5m.c tm->tm_sec = data[RTC_SEC] & 0x7f; tm 177 drivers/rtc/rtc-s5m.c tm->tm_min = data[RTC_MIN] & 0x7f; tm 179 drivers/rtc/rtc-s5m.c tm->tm_hour = data[RTC_HOUR] & 0x1f; tm 181 drivers/rtc/rtc-s5m.c tm->tm_hour = data[RTC_HOUR] & 0x0f; tm 183 drivers/rtc/rtc-s5m.c tm->tm_hour += 12; tm 186 drivers/rtc/rtc-s5m.c tm->tm_wday = ffs(data[RTC_WEEKDAY] & 0x7f); tm 187 drivers/rtc/rtc-s5m.c tm->tm_mday = data[RTC_DATE] & 0x1f; tm 188 drivers/rtc/rtc-s5m.c tm->tm_mon = (data[RTC_MONTH] & 0x0f) - 1; tm 189 drivers/rtc/rtc-s5m.c tm->tm_year = (data[RTC_YEAR1] & 0x7f) + 100; tm 190 drivers/rtc/rtc-s5m.c tm->tm_yday = 0; tm 191 drivers/rtc/rtc-s5m.c tm->tm_isdst = 0; tm 194 drivers/rtc/rtc-s5m.c static int s5m8767_tm_to_data(struct rtc_time *tm, u8 *data) tm 196 drivers/rtc/rtc-s5m.c data[RTC_SEC] = tm->tm_sec; tm 197 drivers/rtc/rtc-s5m.c data[RTC_MIN] = tm->tm_min; tm 199 drivers/rtc/rtc-s5m.c if (tm->tm_hour >= 12) tm 200 drivers/rtc/rtc-s5m.c data[RTC_HOUR] = tm->tm_hour | HOUR_PM_MASK; tm 202 drivers/rtc/rtc-s5m.c data[RTC_HOUR] = tm->tm_hour & ~HOUR_PM_MASK; tm 204 drivers/rtc/rtc-s5m.c data[RTC_WEEKDAY] = 1 << tm->tm_wday; tm 205 drivers/rtc/rtc-s5m.c data[RTC_DATE] = tm->tm_mday; tm 206 drivers/rtc/rtc-s5m.c data[RTC_MONTH] = tm->tm_mon + 1; tm 207 drivers/rtc/rtc-s5m.c data[RTC_YEAR1] = tm->tm_year > 100 ? (tm->tm_year - 100) : 0; tm 209 drivers/rtc/rtc-s5m.c if (tm->tm_year < 100) { tm 211 drivers/rtc/rtc-s5m.c 1900 + tm->tm_year); tm 338 drivers/rtc/rtc-s5m.c static void s5m8763_data_to_tm(u8 *data, struct rtc_time *tm) tm 340 drivers/rtc/rtc-s5m.c tm->tm_sec = bcd2bin(data[RTC_SEC]); tm 341 drivers/rtc/rtc-s5m.c tm->tm_min = bcd2bin(data[RTC_MIN]); tm 344 drivers/rtc/rtc-s5m.c tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x1f); tm 346 drivers/rtc/rtc-s5m.c tm->tm_hour += 12; tm 348 drivers/rtc/rtc-s5m.c tm->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3f); tm 351 drivers/rtc/rtc-s5m.c tm->tm_wday = data[RTC_WEEKDAY] & 0x07; tm 352 drivers/rtc/rtc-s5m.c tm->tm_mday = bcd2bin(data[RTC_DATE]); tm 353 drivers/rtc/rtc-s5m.c tm->tm_mon = bcd2bin(data[RTC_MONTH]); tm 354 drivers/rtc/rtc-s5m.c tm->tm_year = bcd2bin(data[RTC_YEAR1]) + bcd2bin(data[RTC_YEAR2]) * 100; tm 355 drivers/rtc/rtc-s5m.c tm->tm_year -= 1900; tm 358 drivers/rtc/rtc-s5m.c static void s5m8763_tm_to_data(struct rtc_time *tm, u8 *data) tm 360 drivers/rtc/rtc-s5m.c data[RTC_SEC] = bin2bcd(tm->tm_sec); tm 361 drivers/rtc/rtc-s5m.c data[RTC_MIN] = bin2bcd(tm->tm_min); tm 362 drivers/rtc/rtc-s5m.c data[RTC_HOUR] = bin2bcd(tm->tm_hour); tm 363 drivers/rtc/rtc-s5m.c data[RTC_WEEKDAY] = tm->tm_wday; tm 364 drivers/rtc/rtc-s5m.c data[RTC_DATE] = bin2bcd(tm->tm_mday); tm 365 drivers/rtc/rtc-s5m.c data[RTC_MONTH] = bin2bcd(tm->tm_mon); tm 366 drivers/rtc/rtc-s5m.c data[RTC_YEAR1] = bin2bcd(tm->tm_year % 100); tm 367 drivers/rtc/rtc-s5m.c data[RTC_YEAR2] = bin2bcd((tm->tm_year + 1900) / 100); tm 370 drivers/rtc/rtc-s5m.c static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 395 drivers/rtc/rtc-s5m.c s5m8763_data_to_tm(data, tm); tm 402 drivers/rtc/rtc-s5m.c s5m8767_data_to_tm(data, tm, info->rtc_24hr_mode); tm 409 drivers/rtc/rtc-s5m.c dev_dbg(dev, "%s: %ptR(%d)\n", __func__, tm, tm->tm_wday); tm 414 drivers/rtc/rtc-s5m.c static int s5m_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 422 drivers/rtc/rtc-s5m.c s5m8763_tm_to_data(tm, data); tm 428 drivers/rtc/rtc-s5m.c ret = s5m8767_tm_to_data(tm, data); tm 437 drivers/rtc/rtc-s5m.c dev_dbg(dev, "%s: %ptR(%d)\n", __func__, tm, tm->tm_wday); tm 500 drivers/rtc/rtc-s5m.c struct rtc_time tm; tm 507 drivers/rtc/rtc-s5m.c s5m8767_data_to_tm(data, &tm, info->rtc_24hr_mode); tm 508 drivers/rtc/rtc-s5m.c dev_dbg(info->dev, "%s: %ptR(%d)\n", __func__, &tm, tm.tm_wday); tm 543 drivers/rtc/rtc-s5m.c struct rtc_time tm; tm 550 drivers/rtc/rtc-s5m.c s5m8767_data_to_tm(data, &tm, info->rtc_24hr_mode); tm 551 drivers/rtc/rtc-s5m.c dev_dbg(info->dev, "%s: %ptR(%d)\n", __func__, &tm, tm.tm_wday); tm 110 drivers/rtc/rtc-sa1100.c static int sa1100_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 114 drivers/rtc/rtc-sa1100.c rtc_time_to_tm(readl_relaxed(info->rcnr), tm); tm 118 drivers/rtc/rtc-sa1100.c static int sa1100_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 124 drivers/rtc/rtc-sa1100.c ret = rtc_tm_to_time(tm, &time); tm 359 drivers/rtc/rtc-sc27xx.c static int sprd_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 374 drivers/rtc/rtc-sc27xx.c rtc_time64_to_tm(secs, tm); tm 378 drivers/rtc/rtc-sc27xx.c static int sprd_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 381 drivers/rtc/rtc-sc27xx.c time64_t secs = rtc_tm_to_time64(tm); tm 83 drivers/rtc/rtc-sd3078.c static int sd3078_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 98 drivers/rtc/rtc-sd3078.c tm->tm_sec = bcd2bin(rtc_data[SD3078_REG_SC] & 0x7F); tm 99 drivers/rtc/rtc-sd3078.c tm->tm_min = bcd2bin(rtc_data[SD3078_REG_MN] & 0x7F); tm 108 drivers/rtc/rtc-sd3078.c tm->tm_hour = bcd2bin(rtc_data[SD3078_REG_HR] & 0x3F); tm 110 drivers/rtc/rtc-sd3078.c tm->tm_hour = bcd2bin(rtc_data[SD3078_REG_HR] & 0x1F) + 12; tm 112 drivers/rtc/rtc-sd3078.c tm->tm_hour = bcd2bin(rtc_data[SD3078_REG_HR] & 0x1F); tm 114 drivers/rtc/rtc-sd3078.c tm->tm_mday = bcd2bin(rtc_data[SD3078_REG_DM] & 0x3F); tm 115 drivers/rtc/rtc-sd3078.c tm->tm_wday = rtc_data[SD3078_REG_DW] & 0x07; tm 116 drivers/rtc/rtc-sd3078.c tm->tm_mon = bcd2bin(rtc_data[SD3078_REG_MO] & 0x1F) - 1; tm 117 drivers/rtc/rtc-sd3078.c tm->tm_year = bcd2bin(rtc_data[SD3078_REG_YR]) + 100; tm 122 drivers/rtc/rtc-sd3078.c static int sd3078_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 129 drivers/rtc/rtc-sd3078.c rtc_data[SD3078_REG_SC] = bin2bcd(tm->tm_sec); tm 130 drivers/rtc/rtc-sd3078.c rtc_data[SD3078_REG_MN] = bin2bcd(tm->tm_min); tm 131 drivers/rtc/rtc-sd3078.c rtc_data[SD3078_REG_HR] = bin2bcd(tm->tm_hour) | 0x80; tm 132 drivers/rtc/rtc-sd3078.c rtc_data[SD3078_REG_DM] = bin2bcd(tm->tm_mday); tm 133 drivers/rtc/rtc-sd3078.c rtc_data[SD3078_REG_DW] = tm->tm_wday & 0x07; tm 134 drivers/rtc/rtc-sd3078.c rtc_data[SD3078_REG_MO] = bin2bcd(tm->tm_mon) + 1; tm 135 drivers/rtc/rtc-sd3078.c rtc_data[SD3078_REG_YR] = bin2bcd(tm->tm_year - 100); tm 274 drivers/rtc/rtc-sh.c static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 294 drivers/rtc/rtc-sh.c tm->tm_sec = bcd2bin(readb(rtc->regbase + RSECCNT)); tm 295 drivers/rtc/rtc-sh.c tm->tm_min = bcd2bin(readb(rtc->regbase + RMINCNT)); tm 296 drivers/rtc/rtc-sh.c tm->tm_hour = bcd2bin(readb(rtc->regbase + RHRCNT)); tm 297 drivers/rtc/rtc-sh.c tm->tm_wday = bcd2bin(readb(rtc->regbase + RWKCNT)); tm 298 drivers/rtc/rtc-sh.c tm->tm_mday = bcd2bin(readb(rtc->regbase + RDAYCNT)); tm 299 drivers/rtc/rtc-sh.c tm->tm_mon = bcd2bin(readb(rtc->regbase + RMONCNT)) - 1; tm 310 drivers/rtc/rtc-sh.c tm->tm_year = (yr100 * 100 + bcd2bin(yr)) - 1900; tm 320 drivers/rtc/rtc-sh.c tm->tm_sec--; tm 330 drivers/rtc/rtc-sh.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 331 drivers/rtc/rtc-sh.c tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday); tm 336 drivers/rtc/rtc-sh.c static int sh_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 350 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_sec), rtc->regbase + RSECCNT); tm 351 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_min), rtc->regbase + RMINCNT); tm 352 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_hour), rtc->regbase + RHRCNT); tm 353 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_wday), rtc->regbase + RWKCNT); tm 354 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_mday), rtc->regbase + RDAYCNT); tm 355 drivers/rtc/rtc-sh.c writeb(bin2bcd(tm->tm_mon + 1), rtc->regbase + RMONCNT); tm 358 drivers/rtc/rtc-sh.c year = (bin2bcd((tm->tm_year + 1900) / 100) << 8) | tm 359 drivers/rtc/rtc-sh.c bin2bcd(tm->tm_year % 100); tm 362 drivers/rtc/rtc-sh.c year = tm->tm_year % 100; tm 394 drivers/rtc/rtc-sh.c struct rtc_time *tm = &wkalrm->time; tm 398 drivers/rtc/rtc-sh.c tm->tm_sec = sh_rtc_read_alarm_value(rtc, RSECAR); tm 399 drivers/rtc/rtc-sh.c tm->tm_min = sh_rtc_read_alarm_value(rtc, RMINAR); tm 400 drivers/rtc/rtc-sh.c tm->tm_hour = sh_rtc_read_alarm_value(rtc, RHRAR); tm 401 drivers/rtc/rtc-sh.c tm->tm_wday = sh_rtc_read_alarm_value(rtc, RWKAR); tm 402 drivers/rtc/rtc-sh.c tm->tm_mday = sh_rtc_read_alarm_value(rtc, RDAYAR); tm 403 drivers/rtc/rtc-sh.c tm->tm_mon = sh_rtc_read_alarm_value(rtc, RMONAR); tm 404 drivers/rtc/rtc-sh.c if (tm->tm_mon > 0) tm 405 drivers/rtc/rtc-sh.c tm->tm_mon -= 1; /* RTC is 1-12, tm_mon is 0-11 */ tm 428 drivers/rtc/rtc-sh.c struct rtc_time *tm = &wkalrm->time; tm 439 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_sec, RSECAR); tm 440 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_min, RMINAR); tm 441 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_hour, RHRAR); tm 442 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_wday, RWKAR); tm 443 drivers/rtc/rtc-sh.c sh_rtc_write_alarm_value(rtc, tm->tm_mday, RDAYAR); tm 444 drivers/rtc/rtc-sh.c mon = tm->tm_mon; tm 169 drivers/rtc/rtc-sirfsoc.c struct rtc_time *tm) tm 185 drivers/rtc/rtc-sirfsoc.c tmp_rtc >> RTC_SHIFT, tm); tm 190 drivers/rtc/rtc-sirfsoc.c struct rtc_time *tm) tm 196 drivers/rtc/rtc-sirfsoc.c rtc_tm_to_time(tm, &rtc_time); tm 149 drivers/rtc/rtc-snvs.c static int snvs_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 154 drivers/rtc/rtc-snvs.c rtc_time64_to_tm(time, tm); tm 159 drivers/rtc/rtc-snvs.c static int snvs_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 162 drivers/rtc/rtc-snvs.c unsigned long time = rtc_tm_to_time64(tm); tm 173 drivers/rtc/rtc-spear.c static void tm2bcd(struct rtc_time *tm) tm 175 drivers/rtc/rtc-spear.c tm->tm_sec = bin2bcd(tm->tm_sec); tm 176 drivers/rtc/rtc-spear.c tm->tm_min = bin2bcd(tm->tm_min); tm 177 drivers/rtc/rtc-spear.c tm->tm_hour = bin2bcd(tm->tm_hour); tm 178 drivers/rtc/rtc-spear.c tm->tm_mday = bin2bcd(tm->tm_mday); tm 179 drivers/rtc/rtc-spear.c tm->tm_mon = bin2bcd(tm->tm_mon + 1); tm 180 drivers/rtc/rtc-spear.c tm->tm_year = bin2bcd(tm->tm_year); tm 183 drivers/rtc/rtc-spear.c static void bcd2tm(struct rtc_time *tm) tm 185 drivers/rtc/rtc-spear.c tm->tm_sec = bcd2bin(tm->tm_sec); tm 186 drivers/rtc/rtc-spear.c tm->tm_min = bcd2bin(tm->tm_min); tm 187 drivers/rtc/rtc-spear.c tm->tm_hour = bcd2bin(tm->tm_hour); tm 188 drivers/rtc/rtc-spear.c tm->tm_mday = bcd2bin(tm->tm_mday); tm 189 drivers/rtc/rtc-spear.c tm->tm_mon = bcd2bin(tm->tm_mon) - 1; tm 191 drivers/rtc/rtc-spear.c tm->tm_year = bcd2bin(tm->tm_year); tm 202 drivers/rtc/rtc-spear.c static int spear_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 212 drivers/rtc/rtc-spear.c tm->tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; tm 213 drivers/rtc/rtc-spear.c tm->tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; tm 214 drivers/rtc/rtc-spear.c tm->tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; tm 215 drivers/rtc/rtc-spear.c tm->tm_mday = (date >> MDAY_SHIFT) & DAY_MASK; tm 216 drivers/rtc/rtc-spear.c tm->tm_mon = (date >> MONTH_SHIFT) & MONTH_MASK; tm 217 drivers/rtc/rtc-spear.c tm->tm_year = (date >> YEAR_SHIFT) & YEAR_MASK; tm 219 drivers/rtc/rtc-spear.c bcd2tm(tm); tm 231 drivers/rtc/rtc-spear.c static int spear_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 236 drivers/rtc/rtc-spear.c tm2bcd(tm); tm 239 drivers/rtc/rtc-spear.c time = (tm->tm_sec << SECOND_SHIFT) | (tm->tm_min << MINUTE_SHIFT) | tm 240 drivers/rtc/rtc-spear.c (tm->tm_hour << HOUR_SHIFT); tm 241 drivers/rtc/rtc-spear.c date = (tm->tm_mday << MDAY_SHIFT) | (tm->tm_mon << MONTH_SHIFT) | tm 242 drivers/rtc/rtc-spear.c (tm->tm_year << YEAR_SHIFT); tm 80 drivers/rtc/rtc-st-lpc.c static int st_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 98 drivers/rtc/rtc-st-lpc.c rtc_time64_to_tm(lpt, tm); tm 103 drivers/rtc/rtc-st-lpc.c static int st_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 109 drivers/rtc/rtc-st-lpc.c secs = rtc_tm_to_time64(tm); tm 28 drivers/rtc/rtc-starfire.c static int starfire_read_time(struct device *dev, struct rtc_time *tm) tm 30 drivers/rtc/rtc-starfire.c rtc_time_to_tm(starfire_get_time(), tm); tm 72 drivers/rtc/rtc-stk17ta8.c static int stk17ta8_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 81 drivers/rtc/rtc-stk17ta8.c writeb(bin2bcd(tm->tm_year % 100), ioaddr + RTC_YEAR); tm 82 drivers/rtc/rtc-stk17ta8.c writeb(bin2bcd(tm->tm_mon + 1), ioaddr + RTC_MONTH); tm 83 drivers/rtc/rtc-stk17ta8.c writeb(bin2bcd(tm->tm_wday) & RTC_DAY_MASK, ioaddr + RTC_DAY); tm 84 drivers/rtc/rtc-stk17ta8.c writeb(bin2bcd(tm->tm_mday), ioaddr + RTC_DATE); tm 85 drivers/rtc/rtc-stk17ta8.c writeb(bin2bcd(tm->tm_hour), ioaddr + RTC_HOURS); tm 86 drivers/rtc/rtc-stk17ta8.c writeb(bin2bcd(tm->tm_min), ioaddr + RTC_MINUTES); tm 87 drivers/rtc/rtc-stk17ta8.c writeb(bin2bcd(tm->tm_sec) & RTC_SECONDS_MASK, ioaddr + RTC_SECONDS); tm 88 drivers/rtc/rtc-stk17ta8.c writeb(bin2bcd((tm->tm_year + 1900) / 100), ioaddr + RTC_CENTURY); tm 94 drivers/rtc/rtc-stk17ta8.c static int stk17ta8_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 118 drivers/rtc/rtc-stk17ta8.c tm->tm_sec = bcd2bin(second); tm 119 drivers/rtc/rtc-stk17ta8.c tm->tm_min = bcd2bin(minute); tm 120 drivers/rtc/rtc-stk17ta8.c tm->tm_hour = bcd2bin(hour); tm 121 drivers/rtc/rtc-stk17ta8.c tm->tm_mday = bcd2bin(day); tm 122 drivers/rtc/rtc-stk17ta8.c tm->tm_wday = bcd2bin(week); tm 123 drivers/rtc/rtc-stk17ta8.c tm->tm_mon = bcd2bin(month) - 1; tm 125 drivers/rtc/rtc-stk17ta8.c tm->tm_year = bcd2bin(year) + bcd2bin(century) * 100 - 1900; tm 235 drivers/rtc/rtc-stm32.c static void tm2bcd(struct rtc_time *tm) tm 237 drivers/rtc/rtc-stm32.c tm->tm_sec = bin2bcd(tm->tm_sec); tm 238 drivers/rtc/rtc-stm32.c tm->tm_min = bin2bcd(tm->tm_min); tm 239 drivers/rtc/rtc-stm32.c tm->tm_hour = bin2bcd(tm->tm_hour); tm 241 drivers/rtc/rtc-stm32.c tm->tm_mday = bin2bcd(tm->tm_mday); tm 242 drivers/rtc/rtc-stm32.c tm->tm_mon = bin2bcd(tm->tm_mon + 1); tm 243 drivers/rtc/rtc-stm32.c tm->tm_year = bin2bcd(tm->tm_year - 100); tm 249 drivers/rtc/rtc-stm32.c tm->tm_wday = (!tm->tm_wday) ? 7 : tm->tm_wday; tm 253 drivers/rtc/rtc-stm32.c static void bcd2tm(struct rtc_time *tm) tm 255 drivers/rtc/rtc-stm32.c tm->tm_sec = bcd2bin(tm->tm_sec); tm 256 drivers/rtc/rtc-stm32.c tm->tm_min = bcd2bin(tm->tm_min); tm 257 drivers/rtc/rtc-stm32.c tm->tm_hour = bcd2bin(tm->tm_hour); tm 259 drivers/rtc/rtc-stm32.c tm->tm_mday = bcd2bin(tm->tm_mday); tm 260 drivers/rtc/rtc-stm32.c tm->tm_mon = bcd2bin(tm->tm_mon) - 1; tm 261 drivers/rtc/rtc-stm32.c tm->tm_year = bcd2bin(tm->tm_year) + 100; tm 267 drivers/rtc/rtc-stm32.c tm->tm_wday %= 7; tm 270 drivers/rtc/rtc-stm32.c static int stm32_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 280 drivers/rtc/rtc-stm32.c tm->tm_sec = (tr & STM32_RTC_TR_SEC) >> STM32_RTC_TR_SEC_SHIFT; tm 281 drivers/rtc/rtc-stm32.c tm->tm_min = (tr & STM32_RTC_TR_MIN) >> STM32_RTC_TR_MIN_SHIFT; tm 282 drivers/rtc/rtc-stm32.c tm->tm_hour = (tr & STM32_RTC_TR_HOUR) >> STM32_RTC_TR_HOUR_SHIFT; tm 284 drivers/rtc/rtc-stm32.c tm->tm_mday = (dr & STM32_RTC_DR_DATE) >> STM32_RTC_DR_DATE_SHIFT; tm 285 drivers/rtc/rtc-stm32.c tm->tm_mon = (dr & STM32_RTC_DR_MONTH) >> STM32_RTC_DR_MONTH_SHIFT; tm 286 drivers/rtc/rtc-stm32.c tm->tm_year = (dr & STM32_RTC_DR_YEAR) >> STM32_RTC_DR_YEAR_SHIFT; tm 287 drivers/rtc/rtc-stm32.c tm->tm_wday = (dr & STM32_RTC_DR_WDAY) >> STM32_RTC_DR_WDAY_SHIFT; tm 291 drivers/rtc/rtc-stm32.c bcd2tm(tm); tm 296 drivers/rtc/rtc-stm32.c static int stm32_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 303 drivers/rtc/rtc-stm32.c tm2bcd(tm); tm 306 drivers/rtc/rtc-stm32.c tr = ((tm->tm_sec << STM32_RTC_TR_SEC_SHIFT) & STM32_RTC_TR_SEC) | tm 307 drivers/rtc/rtc-stm32.c ((tm->tm_min << STM32_RTC_TR_MIN_SHIFT) & STM32_RTC_TR_MIN) | tm 308 drivers/rtc/rtc-stm32.c ((tm->tm_hour << STM32_RTC_TR_HOUR_SHIFT) & STM32_RTC_TR_HOUR); tm 311 drivers/rtc/rtc-stm32.c dr = ((tm->tm_mday << STM32_RTC_DR_DATE_SHIFT) & STM32_RTC_DR_DATE) | tm 312 drivers/rtc/rtc-stm32.c ((tm->tm_mon << STM32_RTC_DR_MONTH_SHIFT) & STM32_RTC_DR_MONTH) | tm 313 drivers/rtc/rtc-stm32.c ((tm->tm_year << STM32_RTC_DR_YEAR_SHIFT) & STM32_RTC_DR_YEAR) | tm 314 drivers/rtc/rtc-stm32.c ((tm->tm_wday << STM32_RTC_DR_WDAY_SHIFT) & STM32_RTC_DR_WDAY); tm 341 drivers/rtc/rtc-stm32.c struct rtc_time *tm = &alrm->time; tm 353 drivers/rtc/rtc-stm32.c tm->tm_mday = -1; tm 354 drivers/rtc/rtc-stm32.c tm->tm_wday = -1; tm 358 drivers/rtc/rtc-stm32.c tm->tm_mday = -1; tm 359 drivers/rtc/rtc-stm32.c tm->tm_wday = (alrmar & STM32_RTC_ALRMXR_WDAY) >> tm 361 drivers/rtc/rtc-stm32.c tm->tm_wday %= 7; tm 364 drivers/rtc/rtc-stm32.c tm->tm_wday = -1; tm 365 drivers/rtc/rtc-stm32.c tm->tm_mday = (alrmar & STM32_RTC_ALRMXR_DATE) >> tm 372 drivers/rtc/rtc-stm32.c tm->tm_hour = -1; tm 374 drivers/rtc/rtc-stm32.c tm->tm_hour = (alrmar & STM32_RTC_ALRMXR_HOUR) >> tm 377 drivers/rtc/rtc-stm32.c tm->tm_hour += 12; tm 382 drivers/rtc/rtc-stm32.c tm->tm_min = -1; tm 384 drivers/rtc/rtc-stm32.c tm->tm_min = (alrmar & STM32_RTC_ALRMXR_MIN) >> tm 390 drivers/rtc/rtc-stm32.c tm->tm_sec = -1; tm 392 drivers/rtc/rtc-stm32.c tm->tm_sec = (alrmar & STM32_RTC_ALRMXR_SEC) >> tm 396 drivers/rtc/rtc-stm32.c bcd2tm(tm); tm 430 drivers/rtc/rtc-stm32.c static int stm32_rtc_valid_alrm(struct stm32_rtc *rtc, struct rtc_time *tm) tm 451 drivers/rtc/rtc-stm32.c if ((((tm->tm_year > cur_year) && tm 452 drivers/rtc/rtc-stm32.c (tm->tm_mon == 0x1) && (cur_mon == 0x12)) || tm 453 drivers/rtc/rtc-stm32.c ((tm->tm_year == cur_year) && tm 454 drivers/rtc/rtc-stm32.c (tm->tm_mon <= cur_mon + 1))) && tm 455 drivers/rtc/rtc-stm32.c ((tm->tm_mday > cur_day) || tm 456 drivers/rtc/rtc-stm32.c ((tm->tm_mday == cur_day) && tm 457 drivers/rtc/rtc-stm32.c ((tm->tm_hour > cur_hour) || tm 458 drivers/rtc/rtc-stm32.c ((tm->tm_hour == cur_hour) && (tm->tm_min > cur_min)) || tm 459 drivers/rtc/rtc-stm32.c ((tm->tm_hour == cur_hour) && (tm->tm_min == cur_min) && tm 460 drivers/rtc/rtc-stm32.c (tm->tm_sec >= cur_sec)))))) tm 470 drivers/rtc/rtc-stm32.c struct rtc_time *tm = &alrm->time; tm 474 drivers/rtc/rtc-stm32.c tm2bcd(tm); tm 480 drivers/rtc/rtc-stm32.c if (stm32_rtc_valid_alrm(rtc, tm) < 0) { tm 487 drivers/rtc/rtc-stm32.c alrmar |= (tm->tm_mday << STM32_RTC_ALRMXR_DATE_SHIFT) & tm 491 drivers/rtc/rtc-stm32.c alrmar |= (tm->tm_hour << STM32_RTC_ALRMXR_HOUR_SHIFT) & tm 493 drivers/rtc/rtc-stm32.c alrmar |= (tm->tm_min << STM32_RTC_ALRMXR_MIN_SHIFT) & tm 495 drivers/rtc/rtc-stm32.c alrmar |= (tm->tm_sec << STM32_RTC_ALRMXR_SEC_SHIFT) & tm 40 drivers/rtc/rtc-sun4v.c static int sun4v_read_time(struct device *dev, struct rtc_time *tm) tm 42 drivers/rtc/rtc-sun4v.c rtc_time64_to_tm(hypervisor_get_time(), tm); tm 67 drivers/rtc/rtc-sun4v.c static int sun4v_set_time(struct device *dev, struct rtc_time *tm) tm 69 drivers/rtc/rtc-sun4v.c return hypervisor_set_time(rtc_tm_to_time64(tm)); tm 102 drivers/rtc/rtc-tegra.c static int tegra_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 119 drivers/rtc/rtc-tegra.c rtc_time64_to_tm(sec, tm); tm 121 drivers/rtc/rtc-tegra.c dev_vdbg(dev, "time read as %u, %ptR\n", sec, tm); tm 126 drivers/rtc/rtc-tegra.c static int tegra_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 133 drivers/rtc/rtc-tegra.c sec = rtc_tm_to_time64(tm); tm 135 drivers/rtc/rtc-tegra.c dev_vdbg(dev, "time set to %u, %ptR\n", sec, tm); tm 64 drivers/rtc/rtc-test.c static int test_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 68 drivers/rtc/rtc-test.c rtc_time64_to_tm(ktime_get_real_seconds() + rtd->offset, tm); tm 73 drivers/rtc/rtc-test.c static int test_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 77 drivers/rtc/rtc-test.c rtd->offset = rtc_tm_to_time64(tm) - ktime_get_real_seconds(); tm 68 drivers/rtc/rtc-tps6586x.c static int tps6586x_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 89 drivers/rtc/rtc-tps6586x.c rtc_time64_to_tm(seconds, tm); tm 94 drivers/rtc/rtc-tps6586x.c static int tps6586x_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 102 drivers/rtc/rtc-tps6586x.c seconds = rtc_tm_to_time64(tm); tm 67 drivers/rtc/rtc-tps65910.c static int tps65910_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 88 drivers/rtc/rtc-tps65910.c tm->tm_sec = bcd2bin(rtc_data[0]); tm 89 drivers/rtc/rtc-tps65910.c tm->tm_min = bcd2bin(rtc_data[1]); tm 90 drivers/rtc/rtc-tps65910.c tm->tm_hour = bcd2bin(rtc_data[2]); tm 91 drivers/rtc/rtc-tps65910.c tm->tm_mday = bcd2bin(rtc_data[3]); tm 92 drivers/rtc/rtc-tps65910.c tm->tm_mon = bcd2bin(rtc_data[4]) - 1; tm 93 drivers/rtc/rtc-tps65910.c tm->tm_year = bcd2bin(rtc_data[5]) + 100; tm 98 drivers/rtc/rtc-tps65910.c static int tps65910_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 104 drivers/rtc/rtc-tps65910.c rtc_data[0] = bin2bcd(tm->tm_sec); tm 105 drivers/rtc/rtc-tps65910.c rtc_data[1] = bin2bcd(tm->tm_min); tm 106 drivers/rtc/rtc-tps65910.c rtc_data[2] = bin2bcd(tm->tm_hour); tm 107 drivers/rtc/rtc-tps65910.c rtc_data[3] = bin2bcd(tm->tm_mday); tm 108 drivers/rtc/rtc-tps65910.c rtc_data[4] = bin2bcd(tm->tm_mon + 1); tm 109 drivers/rtc/rtc-tps65910.c rtc_data[5] = bin2bcd(tm->tm_year - 100); tm 67 drivers/rtc/rtc-tps80031.c static int tps80031_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 79 drivers/rtc/rtc-tps80031.c tm->tm_sec = bcd2bin(buff[0]); tm 80 drivers/rtc/rtc-tps80031.c tm->tm_min = bcd2bin(buff[1]); tm 81 drivers/rtc/rtc-tps80031.c tm->tm_hour = bcd2bin(buff[2]); tm 82 drivers/rtc/rtc-tps80031.c tm->tm_mday = bcd2bin(buff[3]); tm 83 drivers/rtc/rtc-tps80031.c tm->tm_mon = bcd2bin(buff[4]) - 1; tm 84 drivers/rtc/rtc-tps80031.c tm->tm_year = bcd2bin(buff[5]) + RTC_YEAR_OFFSET; tm 85 drivers/rtc/rtc-tps80031.c tm->tm_wday = bcd2bin(buff[6]); tm 89 drivers/rtc/rtc-tps80031.c static int tps80031_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 94 drivers/rtc/rtc-tps80031.c buff[0] = bin2bcd(tm->tm_sec); tm 95 drivers/rtc/rtc-tps80031.c buff[1] = bin2bcd(tm->tm_min); tm 96 drivers/rtc/rtc-tps80031.c buff[2] = bin2bcd(tm->tm_hour); tm 97 drivers/rtc/rtc-tps80031.c buff[3] = bin2bcd(tm->tm_mday); tm 98 drivers/rtc/rtc-tps80031.c buff[4] = bin2bcd(tm->tm_mon + 1); tm 99 drivers/rtc/rtc-tps80031.c buff[5] = bin2bcd(tm->tm_year % RTC_YEAR_OFFSET); tm 100 drivers/rtc/rtc-tps80031.c buff[6] = bin2bcd(tm->tm_wday); tm 239 drivers/rtc/rtc-tps80031.c struct rtc_time tm; tm 258 drivers/rtc/rtc-tps80031.c tps80031_rtc_read_time(&pdev->dev, &tm); tm 259 drivers/rtc/rtc-tps80031.c if ((tm.tm_year == RTC_YEAR_OFFSET + TPS80031_RTC_POR_YEAR) && tm 260 drivers/rtc/rtc-tps80031.c (tm.tm_mon == (TPS80031_RTC_POR_MONTH - 1)) && tm 261 drivers/rtc/rtc-tps80031.c (tm.tm_mday == TPS80031_RTC_POR_DAY)) { tm 262 drivers/rtc/rtc-tps80031.c tm.tm_year = 2000; tm 263 drivers/rtc/rtc-tps80031.c tm.tm_mday = 1; tm 264 drivers/rtc/rtc-tps80031.c tm.tm_mon = 1; tm 265 drivers/rtc/rtc-tps80031.c ret = tps80031_rtc_set_time(&pdev->dev, &tm); tm 258 drivers/rtc/rtc-twl.c static int twl_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 316 drivers/rtc/rtc-twl.c tm->tm_sec = bcd2bin(rtc_data[0]); tm 317 drivers/rtc/rtc-twl.c tm->tm_min = bcd2bin(rtc_data[1]); tm 318 drivers/rtc/rtc-twl.c tm->tm_hour = bcd2bin(rtc_data[2]); tm 319 drivers/rtc/rtc-twl.c tm->tm_mday = bcd2bin(rtc_data[3]); tm 320 drivers/rtc/rtc-twl.c tm->tm_mon = bcd2bin(rtc_data[4]) - 1; tm 321 drivers/rtc/rtc-twl.c tm->tm_year = bcd2bin(rtc_data[5]) + 100; tm 326 drivers/rtc/rtc-twl.c static int twl_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 333 drivers/rtc/rtc-twl.c rtc_data[0] = bin2bcd(tm->tm_sec); tm 334 drivers/rtc/rtc-twl.c rtc_data[1] = bin2bcd(tm->tm_min); tm 335 drivers/rtc/rtc-twl.c rtc_data[2] = bin2bcd(tm->tm_hour); tm 336 drivers/rtc/rtc-twl.c rtc_data[3] = bin2bcd(tm->tm_mday); tm 337 drivers/rtc/rtc-twl.c rtc_data[4] = bin2bcd(tm->tm_mon + 1); tm 338 drivers/rtc/rtc-twl.c rtc_data[5] = bin2bcd(tm->tm_year - 100); tm 60 drivers/rtc/rtc-tx4939.c static int tx4939_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 64 drivers/rtc/rtc-tx4939.c unsigned long secs = rtc_tm_to_time64(tm); tm 85 drivers/rtc/rtc-tx4939.c static int tx4939_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 107 drivers/rtc/rtc-tx4939.c rtc_time64_to_tm(sec, tm); tm 101 drivers/rtc/rtc-vt8500.c static int vt8500_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 109 drivers/rtc/rtc-vt8500.c tm->tm_sec = bcd2bin(time & TIME_SEC_MASK); tm 110 drivers/rtc/rtc-vt8500.c tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S); tm 111 drivers/rtc/rtc-vt8500.c tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S); tm 112 drivers/rtc/rtc-vt8500.c tm->tm_mday = bcd2bin(date & DATE_DAY_MASK); tm 113 drivers/rtc/rtc-vt8500.c tm->tm_mon = bcd2bin((date & DATE_MONTH_MASK) >> DATE_MONTH_S) - 1; tm 114 drivers/rtc/rtc-vt8500.c tm->tm_year = bcd2bin((date & DATE_YEAR_MASK) >> DATE_YEAR_S) tm 116 drivers/rtc/rtc-vt8500.c tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S; tm 121 drivers/rtc/rtc-vt8500.c static int vt8500_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 125 drivers/rtc/rtc-vt8500.c if (tm->tm_year < 100) { tm 131 drivers/rtc/rtc-vt8500.c writel((bin2bcd(tm->tm_year % 100) << DATE_YEAR_S) tm 132 drivers/rtc/rtc-vt8500.c | (bin2bcd(tm->tm_mon + 1) << DATE_MONTH_S) tm 133 drivers/rtc/rtc-vt8500.c | (bin2bcd(tm->tm_mday)) tm 134 drivers/rtc/rtc-vt8500.c | ((tm->tm_year >= 200) << DATE_CENTURY_S), tm 136 drivers/rtc/rtc-vt8500.c writel((bin2bcd(tm->tm_wday) << TIME_DOW_S) tm 137 drivers/rtc/rtc-vt8500.c | (bin2bcd(tm->tm_hour) << TIME_HOUR_S) tm 138 drivers/rtc/rtc-vt8500.c | (bin2bcd(tm->tm_min) << TIME_MIN_S) tm 139 drivers/rtc/rtc-vt8500.c | (bin2bcd(tm->tm_sec)), tm 89 drivers/rtc/rtc-wilco-ec.c static int wilco_ec_rtc_read(struct device *dev, struct rtc_time *tm) tm 107 drivers/rtc/rtc-wilco-ec.c tm->tm_sec = rtc.second; tm 108 drivers/rtc/rtc-wilco-ec.c tm->tm_min = rtc.minute; tm 109 drivers/rtc/rtc-wilco-ec.c tm->tm_hour = rtc.hour; tm 110 drivers/rtc/rtc-wilco-ec.c tm->tm_mday = rtc.day; tm 111 drivers/rtc/rtc-wilco-ec.c tm->tm_mon = rtc.month - 1; tm 112 drivers/rtc/rtc-wilco-ec.c tm->tm_year = rtc.year + (rtc.century * 100) - 1900; tm 113 drivers/rtc/rtc-wilco-ec.c tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); tm 116 drivers/rtc/rtc-wilco-ec.c tm->tm_wday = -1; tm 121 drivers/rtc/rtc-wilco-ec.c static int wilco_ec_rtc_write(struct device *dev, struct rtc_time *tm) tm 126 drivers/rtc/rtc-wilco-ec.c int year = tm->tm_year + 1900; tm 132 drivers/rtc/rtc-wilco-ec.c int wday = tm->tm_wday == 6 ? 0 : tm->tm_wday + 1; tm 139 drivers/rtc/rtc-wilco-ec.c rtc.month = bin2bcd(tm->tm_mon + 1); tm 140 drivers/rtc/rtc-wilco-ec.c rtc.day = bin2bcd(tm->tm_mday); tm 141 drivers/rtc/rtc-wilco-ec.c rtc.hour = bin2bcd(tm->tm_hour); tm 142 drivers/rtc/rtc-wilco-ec.c rtc.minute = bin2bcd(tm->tm_min); tm 143 drivers/rtc/rtc-wilco-ec.c rtc.second = bin2bcd(tm->tm_sec); tm 118 drivers/rtc/rtc-wm831x.c static int wm831x_rtc_readtime(struct device *dev, struct rtc_time *tm) tm 154 drivers/rtc/rtc-wm831x.c rtc_time64_to_tm(time, tm); tm 168 drivers/rtc/rtc-wm831x.c static int wm831x_rtc_settime(struct device *dev, struct rtc_time *tm) tm 177 drivers/rtc/rtc-wm831x.c time = rtc_tm_to_time64(tm); tm 31 drivers/rtc/rtc-wm8350.c static int wm8350_rtc_readtime(struct device *dev, struct rtc_time *tm) tm 52 drivers/rtc/rtc-wm8350.c tm->tm_sec = time1[0] & WM8350_RTC_SECS_MASK; tm 54 drivers/rtc/rtc-wm8350.c tm->tm_min = (time1[0] & WM8350_RTC_MINS_MASK) tm 57 drivers/rtc/rtc-wm8350.c tm->tm_hour = time1[1] & WM8350_RTC_HRS_MASK; tm 59 drivers/rtc/rtc-wm8350.c tm->tm_wday = ((time1[1] >> WM8350_RTC_DAY_SHIFT) tm 62 drivers/rtc/rtc-wm8350.c tm->tm_mon = ((time1[2] & WM8350_RTC_MTH_MASK) tm 65 drivers/rtc/rtc-wm8350.c tm->tm_mday = (time1[2] & WM8350_RTC_DATE_MASK); tm 67 drivers/rtc/rtc-wm8350.c tm->tm_year = ((time1[3] & WM8350_RTC_YHUNDREDS_MASK) tm 69 drivers/rtc/rtc-wm8350.c tm->tm_year += time1[3] & WM8350_RTC_YUNITS_MASK; tm 71 drivers/rtc/rtc-wm8350.c tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm 72 drivers/rtc/rtc-wm8350.c tm->tm_year); tm 73 drivers/rtc/rtc-wm8350.c tm->tm_year -= 1900; tm 90 drivers/rtc/rtc-wm8350.c static int wm8350_rtc_settime(struct device *dev, struct rtc_time *tm) tm 97 drivers/rtc/rtc-wm8350.c time[0] = tm->tm_sec; tm 98 drivers/rtc/rtc-wm8350.c time[0] |= tm->tm_min << WM8350_RTC_MINS_SHIFT; tm 99 drivers/rtc/rtc-wm8350.c time[1] = tm->tm_hour; tm 100 drivers/rtc/rtc-wm8350.c time[1] |= (tm->tm_wday + 1) << WM8350_RTC_DAY_SHIFT; tm 101 drivers/rtc/rtc-wm8350.c time[2] = tm->tm_mday; tm 102 drivers/rtc/rtc-wm8350.c time[2] |= (tm->tm_mon + 1) << WM8350_RTC_MTH_SHIFT; tm 103 drivers/rtc/rtc-wm8350.c time[3] = ((tm->tm_year + 1900) / 100) << WM8350_RTC_YHUNDREDS_SHIFT; tm 104 drivers/rtc/rtc-wm8350.c time[3] |= (tm->tm_year + 1900) % 100; tm 142 drivers/rtc/rtc-wm8350.c struct rtc_time *tm = &alrm->time; tm 150 drivers/rtc/rtc-wm8350.c tm->tm_sec = time[0] & WM8350_RTC_ALMSECS_MASK; tm 151 drivers/rtc/rtc-wm8350.c if (tm->tm_sec == WM8350_RTC_ALMSECS_MASK) tm 152 drivers/rtc/rtc-wm8350.c tm->tm_sec = -1; tm 154 drivers/rtc/rtc-wm8350.c tm->tm_min = time[0] & WM8350_RTC_ALMMINS_MASK; tm 155 drivers/rtc/rtc-wm8350.c if (tm->tm_min == WM8350_RTC_ALMMINS_MASK) tm 156 drivers/rtc/rtc-wm8350.c tm->tm_min = -1; tm 158 drivers/rtc/rtc-wm8350.c tm->tm_min >>= WM8350_RTC_ALMMINS_SHIFT; tm 160 drivers/rtc/rtc-wm8350.c tm->tm_hour = time[1] & WM8350_RTC_ALMHRS_MASK; tm 161 drivers/rtc/rtc-wm8350.c if (tm->tm_hour == WM8350_RTC_ALMHRS_MASK) tm 162 drivers/rtc/rtc-wm8350.c tm->tm_hour = -1; tm 164 drivers/rtc/rtc-wm8350.c tm->tm_wday = ((time[1] >> WM8350_RTC_ALMDAY_SHIFT) & 0x7) - 1; tm 165 drivers/rtc/rtc-wm8350.c if (tm->tm_wday > 7) tm 166 drivers/rtc/rtc-wm8350.c tm->tm_wday = -1; tm 168 drivers/rtc/rtc-wm8350.c tm->tm_mon = time[2] & WM8350_RTC_ALMMTH_MASK; tm 169 drivers/rtc/rtc-wm8350.c if (tm->tm_mon == WM8350_RTC_ALMMTH_MASK) tm 170 drivers/rtc/rtc-wm8350.c tm->tm_mon = -1; tm 172 drivers/rtc/rtc-wm8350.c tm->tm_mon = (tm->tm_mon >> WM8350_RTC_ALMMTH_SHIFT) - 1; tm 174 drivers/rtc/rtc-wm8350.c tm->tm_mday = (time[2] & WM8350_RTC_ALMDATE_MASK); tm 175 drivers/rtc/rtc-wm8350.c if (tm->tm_mday == WM8350_RTC_ALMDATE_MASK) tm 176 drivers/rtc/rtc-wm8350.c tm->tm_mday = -1; tm 178 drivers/rtc/rtc-wm8350.c tm->tm_year = -1; tm 246 drivers/rtc/rtc-wm8350.c struct rtc_time *tm = &alrm->time; tm 252 drivers/rtc/rtc-wm8350.c if (tm->tm_sec != -1) tm 253 drivers/rtc/rtc-wm8350.c time[0] |= tm->tm_sec; tm 257 drivers/rtc/rtc-wm8350.c if (tm->tm_min != -1) tm 258 drivers/rtc/rtc-wm8350.c time[0] |= tm->tm_min << WM8350_RTC_ALMMINS_SHIFT; tm 262 drivers/rtc/rtc-wm8350.c if (tm->tm_hour != -1) tm 263 drivers/rtc/rtc-wm8350.c time[1] |= tm->tm_hour; tm 267 drivers/rtc/rtc-wm8350.c if (tm->tm_wday != -1) tm 268 drivers/rtc/rtc-wm8350.c time[1] |= (tm->tm_wday + 1) << WM8350_RTC_ALMDAY_SHIFT; tm 272 drivers/rtc/rtc-wm8350.c if (tm->tm_mday != -1) tm 273 drivers/rtc/rtc-wm8350.c time[2] |= tm->tm_mday; tm 277 drivers/rtc/rtc-wm8350.c if (tm->tm_mon != -1) tm 278 drivers/rtc/rtc-wm8350.c time[2] |= (tm->tm_mon + 1) << WM8350_RTC_ALMMTH_SHIFT; tm 88 drivers/rtc/rtc-x1205.c static int x1205_get_datetime(struct i2c_client *client, struct rtc_time *tm, tm 127 drivers/rtc/rtc-x1205.c tm->tm_sec = bcd2bin(buf[CCR_SEC]); tm 128 drivers/rtc/rtc-x1205.c tm->tm_min = bcd2bin(buf[CCR_MIN]); tm 129 drivers/rtc/rtc-x1205.c tm->tm_hour = bcd2bin(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */ tm 130 drivers/rtc/rtc-x1205.c tm->tm_mday = bcd2bin(buf[CCR_MDAY]); tm 131 drivers/rtc/rtc-x1205.c tm->tm_mon = bcd2bin(buf[CCR_MONTH]) - 1; /* mon is 0-11 */ tm 132 drivers/rtc/rtc-x1205.c tm->tm_year = bcd2bin(buf[CCR_YEAR]) tm 134 drivers/rtc/rtc-x1205.c tm->tm_wday = buf[CCR_WDAY]; tm 139 drivers/rtc/rtc-x1205.c tm->tm_sec, tm->tm_min, tm->tm_hour, tm 140 drivers/rtc/rtc-x1205.c tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); tm 172 drivers/rtc/rtc-x1205.c static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm, tm 189 drivers/rtc/rtc-x1205.c __func__, tm->tm_sec, tm->tm_min, tm->tm_hour, tm->tm_mday, tm 190 drivers/rtc/rtc-x1205.c tm->tm_mon, tm->tm_year, tm->tm_wday); tm 192 drivers/rtc/rtc-x1205.c buf[CCR_SEC] = bin2bcd(tm->tm_sec); tm 193 drivers/rtc/rtc-x1205.c buf[CCR_MIN] = bin2bcd(tm->tm_min); tm 196 drivers/rtc/rtc-x1205.c buf[CCR_HOUR] = bin2bcd(tm->tm_hour) | X1205_HR_MIL; tm 198 drivers/rtc/rtc-x1205.c buf[CCR_MDAY] = bin2bcd(tm->tm_mday); tm 201 drivers/rtc/rtc-x1205.c buf[CCR_MONTH] = bin2bcd(tm->tm_mon + 1); tm 204 drivers/rtc/rtc-x1205.c buf[CCR_YEAR] = bin2bcd(tm->tm_year % 100); tm 205 drivers/rtc/rtc-x1205.c buf[CCR_WDAY] = tm->tm_wday & 0x07; tm 206 drivers/rtc/rtc-x1205.c buf[CCR_Y2K] = bin2bcd((tm->tm_year + 1900) / 100); tm 282 drivers/rtc/rtc-x1205.c struct rtc_time tm; tm 284 drivers/rtc/rtc-x1205.c memset(&tm, 0, sizeof(tm)); tm 286 drivers/rtc/rtc-x1205.c err = x1205_set_datetime(client, &tm, X1205_CCR_BASE, 0); tm 534 drivers/rtc/rtc-x1205.c static int x1205_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 537 drivers/rtc/rtc-x1205.c tm, X1205_CCR_BASE); tm 540 drivers/rtc/rtc-x1205.c static int x1205_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 543 drivers/rtc/rtc-x1205.c tm, X1205_CCR_BASE, 0); tm 44 drivers/rtc/rtc-xgene.c static int xgene_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 48 drivers/rtc/rtc-xgene.c rtc_time64_to_tm(readl(pdata->csr_base + RTC_CCVR), tm); tm 52 drivers/rtc/rtc-xgene.c static int xgene_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 60 drivers/rtc/rtc-xgene.c writel((u32)rtc_tm_to_time64(tm), pdata->csr_base + RTC_CLR); tm 50 drivers/rtc/rtc-zynqmp.c static int xlnx_rtc_set_time(struct device *dev, struct rtc_time *tm) tm 60 drivers/rtc/rtc-zynqmp.c new_time = rtc_tm_to_time64(tm) + 1; tm 84 drivers/rtc/rtc-zynqmp.c static int xlnx_rtc_read_time(struct device *dev, struct rtc_time *tm) tm 97 drivers/rtc/rtc-zynqmp.c rtc_time64_to_tm(readl(xrtcdev->reg_base + RTC_CUR_TM), tm); tm 107 drivers/rtc/rtc-zynqmp.c rtc_time64_to_tm(read_time, tm); tm 35 drivers/rtc/sysfs.c struct rtc_time tm; tm 37 drivers/rtc/sysfs.c retval = rtc_read_time(to_rtc_device(dev), &tm); tm 41 drivers/rtc/sysfs.c return sprintf(buf, "%ptRd\n", &tm); tm 49 drivers/rtc/sysfs.c struct rtc_time tm; tm 51 drivers/rtc/sysfs.c retval = rtc_read_time(to_rtc_device(dev), &tm); tm 55 drivers/rtc/sysfs.c return sprintf(buf, "%ptRt\n", &tm); tm 63 drivers/rtc/sysfs.c struct rtc_time tm; tm 65 drivers/rtc/sysfs.c retval = rtc_read_time(to_rtc_device(dev), &tm); tm 69 drivers/rtc/sysfs.c time = rtc_tm_to_time64(&tm); tm 24 drivers/rtc/systohc.c struct rtc_time tm; tm 53 drivers/rtc/systohc.c rtc_time64_to_tm(to_set.tv_sec, &tm); tm 55 drivers/rtc/systohc.c err = rtc_set_time(rtc, &tm); tm 1638 drivers/s390/block/dasd.c (irb->scsw.tm.sesq == SCSW_SESQ_DEV_NOFCX || tm 1639 drivers/s390/block/dasd.c irb->scsw.tm.sesq == SCSW_SESQ_PATH_NOFCX)); tm 4177 drivers/s390/block/dasd.c if (scsw_is_tm(&irb->scsw) && (irb->scsw.tm.fcxs == 0x01)) { tm 4178 drivers/s390/block/dasd.c if (irb->scsw.tm.tcw) tm 4180 drivers/s390/block/dasd.c irb->scsw.tm.tcw); tm 5576 drivers/s390/block/dasd_eckd.c irb->scsw.tm.fcxs, tm 5577 drivers/s390/block/dasd_eckd.c (irb->scsw.tm.ifob << 7) | irb->scsw.tm.sesq, tm 5582 drivers/s390/block/dasd_eckd.c (void *) (addr_t) irb->scsw.tm.tcw); tm 5586 drivers/s390/block/dasd_eckd.c if (irb->scsw.tm.tcw && (irb->scsw.tm.fcxs & 0x01)) tm 5588 drivers/s390/block/dasd_eckd.c (struct tcw *)(unsigned long)irb->scsw.tm.tcw); tm 6609 drivers/s390/block/dasd_eckd.c if (irb->scsw.tm.sesq == SCSW_SESQ_DEV_NOFCX) { tm 6611 drivers/s390/block/dasd_eckd.c } else if (irb->scsw.tm.sesq == SCSW_SESQ_PATH_NOFCX) { tm 720 drivers/s390/cio/cio.c orb->tm.intparm = (u32) (addr_t) sch; tm 721 drivers/s390/cio/cio.c orb->tm.key = key >> 4; tm 722 drivers/s390/cio/cio.c orb->tm.b = 1; tm 723 drivers/s390/cio/cio.c orb->tm.lpm = lpm ? lpm : sch->lpm; tm 724 drivers/s390/cio/cio.c orb->tm.tcw = (u32) (addr_t) tcw; tm 749 drivers/s390/cio/cio.c if (!to_io_private(sch)->orb.tm.b) tm 62 drivers/s390/cio/device_fsm.c if (orb->tm.b) { tm 66 drivers/s390/cio/device_fsm.c (void *)(addr_t)orb->tm.tcw, tm 475 drivers/s390/cio/device_fsm.c struct tm_scsw *scsw = &irb->scsw.tm; tm 88 drivers/s390/cio/orb.h struct tm_orb tm; tm 259 drivers/s390/cio/vfio_ccw_fsm.c if (orb->tm.b) { tm 2368 drivers/scsi/aacraid/commsup.c struct tm cur_tm; tm 3677 drivers/scsi/arcmsr/arcmsr_hba.c struct tm tm; tm 3694 drivers/scsi/arcmsr/arcmsr_hba.c time64_to_tm(ktime_get_real_seconds(), -sys_tz.tz_minuteswest * 60, &tm); tm 3697 drivers/scsi/arcmsr/arcmsr_hba.c datetime.a.year = tm.tm_year - 100; /* base 2000 instead of 1900 */ tm 3698 drivers/scsi/arcmsr/arcmsr_hba.c datetime.a.month = tm.tm_mon; tm 3699 drivers/scsi/arcmsr/arcmsr_hba.c datetime.a.date = tm.tm_mday; tm 3700 drivers/scsi/arcmsr/arcmsr_hba.c datetime.a.hour = tm.tm_hour; tm 3701 drivers/scsi/arcmsr/arcmsr_hba.c datetime.a.minute = tm.tm_min; tm 3702 drivers/scsi/arcmsr/arcmsr_hba.c datetime.a.second = tm.tm_sec; tm 403 drivers/scsi/bfa/bfa_fcpim.h enum fcp_tm_cmnd tm, u8 t_secs); tm 411 drivers/scsi/esas2r/esas2r_ioctl.c struct atto_csmi_task_mgmt *tm = &ci->data.tsk_mgt; tm 413 drivers/scsi/esas2r/esas2r_ioctl.c path = tm->path_id; tm 414 drivers/scsi/esas2r/esas2r_ioctl.c tid = tm->target_id; tm 415 drivers/scsi/esas2r/esas2r_ioctl.c lun = tm->lun; tm 798 drivers/scsi/fnic/fnic_trace.c struct tm tm; tm 810 drivers/scsi/fnic/fnic_trace.c time64_to_tm(tdata->time_stamp.tv_sec, 0, &tm); tm 816 drivers/scsi/fnic/fnic_trace.c tm.tm_mon + 1, tm.tm_mday, tm.tm_year + 1900, tm 817 drivers/scsi/fnic/fnic_trace.c tm.tm_hour, tm.tm_min, tm.tm_sec, tm 5985 drivers/scsi/ips.c struct tm tm; tm 5989 drivers/scsi/ips.c time64_to_tm(current_time, 0, &tm); tm 5991 drivers/scsi/ips.c scb->cmd.ffdc.hour = tm.tm_hour; tm 5992 drivers/scsi/ips.c scb->cmd.ffdc.minute = tm.tm_min; tm 5993 drivers/scsi/ips.c scb->cmd.ffdc.second = tm.tm_sec; tm 5994 drivers/scsi/ips.c scb->cmd.ffdc.yearH = (tm.tm_year + 1900) / 100; tm 5995 drivers/scsi/ips.c scb->cmd.ffdc.yearL = tm.tm_year % 100; tm 5996 drivers/scsi/ips.c scb->cmd.ffdc.month = tm.tm_mon + 1; tm 5997 drivers/scsi/ips.c scb->cmd.ffdc.day = tm.tm_mday; tm 816 drivers/scsi/smartpqi/smartpqi_init.c struct tm tm; tm 834 drivers/scsi/smartpqi/smartpqi_init.c time64_to_tm(local_time, -sys_tz.tz_minuteswest * 60, &tm); tm 835 drivers/scsi/smartpqi/smartpqi_init.c year = tm.tm_year + 1900; tm 837 drivers/scsi/smartpqi/smartpqi_init.c buffer->time[0] = bin2bcd(tm.tm_hour); tm 838 drivers/scsi/smartpqi/smartpqi_init.c buffer->time[1] = bin2bcd(tm.tm_min); tm 839 drivers/scsi/smartpqi/smartpqi_init.c buffer->time[2] = bin2bcd(tm.tm_sec); tm 841 drivers/scsi/smartpqi/smartpqi_init.c buffer->time[4] = bin2bcd(tm.tm_mon + 1); tm 842 drivers/scsi/smartpqi/smartpqi_init.c buffer->time[5] = bin2bcd(tm.tm_mday); tm 836 drivers/staging/exfat/exfat.h struct timestamp_t *tm_current(struct timestamp_t *tm); tm 1385 drivers/staging/exfat/exfat_core.c struct timestamp_t tm, *tp; tm 1392 drivers/staging/exfat/exfat_core.c tp = tm_current(&tm); tm 1449 drivers/staging/exfat/exfat_core.c struct timestamp_t tm, *tp; tm 1453 drivers/staging/exfat/exfat_core.c tp = tm_current(&tm); tm 72 drivers/staging/exfat/exfat_super.c struct tm tm; tm 74 drivers/staging/exfat/exfat_super.c time64_to_tm(second, 0, &tm); tm 99 drivers/staging/exfat/exfat_super.c tp->Second = tm.tm_sec; tm 100 drivers/staging/exfat/exfat_super.c tp->Minute = tm.tm_min; tm 101 drivers/staging/exfat/exfat_super.c tp->Hour = tm.tm_hour; tm 102 drivers/staging/exfat/exfat_super.c tp->Day = tm.tm_mday; tm 103 drivers/staging/exfat/exfat_super.c tp->Month = tm.tm_mon + 1; tm 104 drivers/staging/exfat/exfat_super.c tp->Year = tm.tm_year + 1900 - 1980; tm 110 drivers/staging/exfat/exfat_super.c struct tm tm; tm 112 drivers/staging/exfat/exfat_super.c time64_to_tm(second, 0, &tm); tm 134 drivers/staging/exfat/exfat_super.c tp->sec = tm.tm_sec; tm 135 drivers/staging/exfat/exfat_super.c tp->min = tm.tm_min; tm 136 drivers/staging/exfat/exfat_super.c tp->hour = tm.tm_hour; tm 137 drivers/staging/exfat/exfat_super.c tp->day = tm.tm_mday; tm 138 drivers/staging/exfat/exfat_super.c tp->mon = tm.tm_mon + 1; tm 139 drivers/staging/exfat/exfat_super.c tp->year = tm.tm_year + 1900 - 1980; tm 820 drivers/staging/exfat/exfat_super.c struct timestamp_t tm; tm 1018 drivers/staging/exfat/exfat_super.c p_fs->fs_func->set_entry_time(ep, tm_current(&tm), TM_MODIFY); tm 1073 drivers/staging/exfat/exfat_super.c struct timestamp_t tm; tm 1153 drivers/staging/exfat/exfat_super.c p_fs->fs_func->set_entry_time(ep, tm_current(&tm), TM_MODIFY); tm 1504 drivers/staging/exfat/exfat_super.c struct timestamp_t tm; tm 1577 drivers/staging/exfat/exfat_super.c p_fs->fs_func->get_entry_time(ep, &tm, TM_CREATE); tm 1578 drivers/staging/exfat/exfat_super.c info->CreateTimestamp.Year = tm.year; tm 1579 drivers/staging/exfat/exfat_super.c info->CreateTimestamp.Month = tm.mon; tm 1580 drivers/staging/exfat/exfat_super.c info->CreateTimestamp.Day = tm.day; tm 1581 drivers/staging/exfat/exfat_super.c info->CreateTimestamp.Hour = tm.hour; tm 1582 drivers/staging/exfat/exfat_super.c info->CreateTimestamp.Minute = tm.min; tm 1583 drivers/staging/exfat/exfat_super.c info->CreateTimestamp.Second = tm.sec; tm 1586 drivers/staging/exfat/exfat_super.c p_fs->fs_func->get_entry_time(ep, &tm, TM_MODIFY); tm 1587 drivers/staging/exfat/exfat_super.c info->ModifyTimestamp.Year = tm.year; tm 1588 drivers/staging/exfat/exfat_super.c info->ModifyTimestamp.Month = tm.mon; tm 1589 drivers/staging/exfat/exfat_super.c info->ModifyTimestamp.Day = tm.day; tm 1590 drivers/staging/exfat/exfat_super.c info->ModifyTimestamp.Hour = tm.hour; tm 1591 drivers/staging/exfat/exfat_super.c info->ModifyTimestamp.Minute = tm.min; tm 1592 drivers/staging/exfat/exfat_super.c info->ModifyTimestamp.Second = tm.sec; tm 1654 drivers/staging/exfat/exfat_super.c struct timestamp_t tm; tm 1701 drivers/staging/exfat/exfat_super.c tm.sec = info->CreateTimestamp.Second; tm 1702 drivers/staging/exfat/exfat_super.c tm.min = info->CreateTimestamp.Minute; tm 1703 drivers/staging/exfat/exfat_super.c tm.hour = info->CreateTimestamp.Hour; tm 1704 drivers/staging/exfat/exfat_super.c tm.day = info->CreateTimestamp.Day; tm 1705 drivers/staging/exfat/exfat_super.c tm.mon = info->CreateTimestamp.Month; tm 1706 drivers/staging/exfat/exfat_super.c tm.year = info->CreateTimestamp.Year; tm 1707 drivers/staging/exfat/exfat_super.c p_fs->fs_func->set_entry_time(ep, &tm, TM_CREATE); tm 1709 drivers/staging/exfat/exfat_super.c tm.sec = info->ModifyTimestamp.Second; tm 1710 drivers/staging/exfat/exfat_super.c tm.min = info->ModifyTimestamp.Minute; tm 1711 drivers/staging/exfat/exfat_super.c tm.hour = info->ModifyTimestamp.Hour; tm 1712 drivers/staging/exfat/exfat_super.c tm.day = info->ModifyTimestamp.Day; tm 1713 drivers/staging/exfat/exfat_super.c tm.mon = info->ModifyTimestamp.Month; tm 1714 drivers/staging/exfat/exfat_super.c tm.year = info->ModifyTimestamp.Year; tm 1715 drivers/staging/exfat/exfat_super.c p_fs->fs_func->set_entry_time(ep, &tm, TM_MODIFY); tm 1943 drivers/staging/exfat/exfat_super.c struct timestamp_t tm; tm 2040 drivers/staging/exfat/exfat_super.c fs_func->get_entry_time(ep, &tm, TM_CREATE); tm 2041 drivers/staging/exfat/exfat_super.c dir_entry->CreateTimestamp.Year = tm.year; tm 2042 drivers/staging/exfat/exfat_super.c dir_entry->CreateTimestamp.Month = tm.mon; tm 2043 drivers/staging/exfat/exfat_super.c dir_entry->CreateTimestamp.Day = tm.day; tm 2044 drivers/staging/exfat/exfat_super.c dir_entry->CreateTimestamp.Hour = tm.hour; tm 2045 drivers/staging/exfat/exfat_super.c dir_entry->CreateTimestamp.Minute = tm.min; tm 2046 drivers/staging/exfat/exfat_super.c dir_entry->CreateTimestamp.Second = tm.sec; tm 2049 drivers/staging/exfat/exfat_super.c fs_func->get_entry_time(ep, &tm, TM_MODIFY); tm 2050 drivers/staging/exfat/exfat_super.c dir_entry->ModifyTimestamp.Year = tm.year; tm 2051 drivers/staging/exfat/exfat_super.c dir_entry->ModifyTimestamp.Month = tm.mon; tm 2052 drivers/staging/exfat/exfat_super.c dir_entry->ModifyTimestamp.Day = tm.day; tm 2053 drivers/staging/exfat/exfat_super.c dir_entry->ModifyTimestamp.Hour = tm.hour; tm 2054 drivers/staging/exfat/exfat_super.c dir_entry->ModifyTimestamp.Minute = tm.min; tm 2055 drivers/staging/exfat/exfat_super.c dir_entry->ModifyTimestamp.Second = tm.sec; tm 420 drivers/staging/greybus/tools/loopback_test.c struct tm *tm) tm 426 drivers/staging/greybus/tools/loopback_test.c tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm 427 drivers/staging/greybus/tools/loopback_test.c tm->tm_hour, tm->tm_min, tm->tm_sec); tm 516 drivers/staging/greybus/tools/loopback_test.c struct tm tm; tm 522 drivers/staging/greybus/tools/loopback_test.c tm = *localtime(&local_time); tm 547 drivers/staging/greybus/tools/loopback_test.c data, sizeof(data), &tm); tm 559 drivers/staging/greybus/tools/loopback_test.c data, sizeof(data), &tm); tm 632 drivers/usb/gadget/udc/fsl_qe_udc.c ep->tm = (u8)(desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK); tm 655 drivers/usb/gadget/udc/fsl_qe_udc.c if ((ep->tm == USBP_TM_CTL) || (ep->dir == USB_DIR_OUT)) { tm 661 drivers/usb/gadget/udc/fsl_qe_udc.c if ((ep->tm == USBP_TM_CTL) || (ep->dir == USB_DIR_IN)) { tm 291 drivers/usb/gadget/udc/fsl_qe_udc.h u8 tm; /* transfer mode */ tm 796 drivers/usb/host/xhci-tegra.c struct tm time; tm 443 drivers/video/fbdev/core/svgalib.c int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node) tm 454 drivers/video/fbdev/core/svgalib.c if (((value / 8) - 5) >= svga_regset_size (tm->h_total_regs)) tm 459 drivers/video/fbdev/core/svgalib.c if (((value / 8) - 1) >= svga_regset_size (tm->h_display_regs)) tm 461 drivers/video/fbdev/core/svgalib.c if (((value / 8) - 1) >= svga_regset_size (tm->h_blank_start_regs)) tm 466 drivers/video/fbdev/core/svgalib.c if (((value / 8) - 1) >= svga_regset_size (tm->h_sync_start_regs)) tm 471 drivers/video/fbdev/core/svgalib.c if ((value == 0) || ((value / 8) >= svga_regset_size (tm->h_blank_end_regs))) tm 476 drivers/video/fbdev/core/svgalib.c if ((value == 0) || ((value / 8) >= svga_regset_size (tm->h_sync_end_regs))) tm 481 drivers/video/fbdev/core/svgalib.c if ((value - 1) >= svga_regset_size(tm->v_total_regs)) tm 486 drivers/video/fbdev/core/svgalib.c if ((value - 1) >= svga_regset_size(tm->v_display_regs)) tm 488 drivers/video/fbdev/core/svgalib.c if ((value - 1) >= svga_regset_size(tm->v_blank_start_regs)) tm 493 drivers/video/fbdev/core/svgalib.c if ((value - 1) >= svga_regset_size(tm->v_sync_start_regs)) tm 498 drivers/video/fbdev/core/svgalib.c if ((value == 0) || (value >= svga_regset_size (tm->v_blank_end_regs))) tm 503 drivers/video/fbdev/core/svgalib.c if ((value == 0) || (value >= svga_regset_size (tm->v_sync_end_regs))) tm 510 drivers/video/fbdev/core/svgalib.c void svga_set_timings(void __iomem *regbase, const struct svga_timing_regs *tm, tm 520 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->h_total_regs, (value / 8) - 5); tm 525 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->h_display_regs, (value / 8) - 1); tm 530 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->h_blank_start_regs, (value / 8) - 1 + hborder); tm 535 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->h_blank_end_regs, (value / 8) - 1 - hborder); tm 540 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->h_sync_start_regs, (value / 8)); tm 545 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->h_sync_end_regs, (value / 8)); tm 550 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->v_total_regs, value - 2); tm 555 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->v_display_regs, value - 1); tm 560 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->v_blank_start_regs, value); tm 565 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->v_blank_end_regs, value - 2); tm 570 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->v_sync_start_regs, value); tm 575 drivers/video/fbdev/core/svgalib.c svga_wcrt_multi(regbase, tm->v_sync_end_regs, value); tm 90 drivers/w1/slaves/w1_ds2438.c unsigned int tm = DS2438_MAX_CONVERSION_TIME; tm 102 drivers/w1/slaves/w1_ds2438.c sleep_rem = msleep_interruptible(tm); tm 192 drivers/w1/slaves/w1_ds2438.c unsigned int tm = DS2438_MAX_CONVERSION_TIME; tm 209 drivers/w1/slaves/w1_ds2438.c sleep_rem = msleep_interruptible(tm); tm 165 drivers/w1/slaves/w1_ds28e04.c unsigned int tm = 10; tm 203 drivers/w1/slaves/w1_ds28e04.c w1_next_pullup(sl->master, tm); tm 209 drivers/w1/slaves/w1_ds28e04.c msleep(tm); tm 273 drivers/w1/slaves/w1_therm.c unsigned int tm = 10; tm 286 drivers/w1/slaves/w1_therm.c w1_next_pullup(dev, tm); tm 293 drivers/w1/slaves/w1_therm.c sleep_rem = msleep_interruptible(tm); tm 303 drivers/w1/slaves/w1_therm.c sleep_rem = msleep_interruptible(tm); tm 502 drivers/w1/slaves/w1_therm.c unsigned int tm = 750; tm 514 drivers/w1/slaves/w1_therm.c w1_next_pullup(dev, tm); tm 521 drivers/w1/slaves/w1_therm.c sleep_rem = msleep_interruptible(tm); tm 531 drivers/w1/slaves/w1_therm.c sleep_rem = msleep_interruptible(tm); tm 39 drivers/w1/w1_io.c static void w1_delay(unsigned long tm) tm 41 drivers/w1/w1_io.c udelay(tm * w1_delay_parm); tm 43 drivers/xen/efi.c static efi_status_t xen_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc) tm 50 drivers/xen/efi.c if (tm) { tm 51 drivers/xen/efi.c BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.get_time.time)); tm 52 drivers/xen/efi.c memcpy(tm, &efi_data(op).u.get_time.time, sizeof(*tm)); tm 65 drivers/xen/efi.c static efi_status_t xen_efi_set_time(efi_time_t *tm) tm 69 drivers/xen/efi.c BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.set_time)); tm 70 drivers/xen/efi.c memcpy(&efi_data(op).u.set_time, tm, sizeof(*tm)); tm 80 drivers/xen/efi.c efi_time_t *tm) tm 87 drivers/xen/efi.c if (tm) { tm 88 drivers/xen/efi.c BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.get_wakeup_time)); tm 89 drivers/xen/efi.c memcpy(tm, &efi_data(op).u.get_wakeup_time, sizeof(*tm)); tm 101 drivers/xen/efi.c static efi_status_t xen_efi_set_wakeup_time(efi_bool_t enabled, efi_time_t *tm) tm 105 drivers/xen/efi.c BUILD_BUG_ON(sizeof(*tm) != sizeof(efi_data(op).u.set_wakeup_time)); tm 108 drivers/xen/efi.c if (tm) tm 109 drivers/xen/efi.c memcpy(&efi_data(op).u.set_wakeup_time, tm, sizeof(*tm)); tm 349 fs/btrfs/ctree.c struct tree_mod_elem *tm; tm 381 fs/btrfs/ctree.c tm = rb_entry(node, struct tree_mod_elem, node); tm 382 fs/btrfs/ctree.c if (tm->seq >= min_seq) tm 385 fs/btrfs/ctree.c kfree(tm); tm 399 fs/btrfs/ctree.c __tree_mod_log_insert(struct btrfs_fs_info *fs_info, struct tree_mod_elem *tm) tm 408 fs/btrfs/ctree.c tm->seq = btrfs_inc_tree_mod_seq(fs_info); tm 415 fs/btrfs/ctree.c if (cur->logical < tm->logical) tm 417 fs/btrfs/ctree.c else if (cur->logical > tm->logical) tm 419 fs/btrfs/ctree.c else if (cur->seq < tm->seq) tm 421 fs/btrfs/ctree.c else if (cur->seq > tm->seq) tm 427 fs/btrfs/ctree.c rb_link_node(&tm->node, parent, new); tm 428 fs/btrfs/ctree.c rb_insert_color(&tm->node, tm_root); tm 472 fs/btrfs/ctree.c struct tree_mod_elem *tm; tm 474 fs/btrfs/ctree.c tm = kzalloc(sizeof(*tm), flags); tm 475 fs/btrfs/ctree.c if (!tm) tm 478 fs/btrfs/ctree.c tm->logical = eb->start; tm 480 fs/btrfs/ctree.c btrfs_node_key(eb, &tm->key, slot); tm 481 fs/btrfs/ctree.c tm->blockptr = btrfs_node_blockptr(eb, slot); tm 483 fs/btrfs/ctree.c tm->op = op; tm 484 fs/btrfs/ctree.c tm->slot = slot; tm 485 fs/btrfs/ctree.c tm->generation = btrfs_node_ptr_generation(eb, slot); tm 486 fs/btrfs/ctree.c RB_CLEAR_NODE(&tm->node); tm 488 fs/btrfs/ctree.c return tm; tm 494 fs/btrfs/ctree.c struct tree_mod_elem *tm; tm 500 fs/btrfs/ctree.c tm = alloc_tree_mod_elem(eb, slot, op, flags); tm 501 fs/btrfs/ctree.c if (!tm) tm 505 fs/btrfs/ctree.c kfree(tm); tm 509 fs/btrfs/ctree.c ret = __tree_mod_log_insert(eb->fs_info, tm); tm 512 fs/btrfs/ctree.c kfree(tm); tm 520 fs/btrfs/ctree.c struct tree_mod_elem *tm = NULL; tm 533 fs/btrfs/ctree.c tm = kzalloc(sizeof(*tm), GFP_NOFS); tm 534 fs/btrfs/ctree.c if (!tm) { tm 539 fs/btrfs/ctree.c tm->logical = eb->start; tm 540 fs/btrfs/ctree.c tm->slot = src_slot; tm 541 fs/btrfs/ctree.c tm->move.dst_slot = dst_slot; tm 542 fs/btrfs/ctree.c tm->move.nr_items = nr_items; tm 543 fs/btrfs/ctree.c tm->op = MOD_LOG_MOVE_KEYS; tm 569 fs/btrfs/ctree.c ret = __tree_mod_log_insert(eb->fs_info, tm); tm 585 fs/btrfs/ctree.c kfree(tm); tm 615 fs/btrfs/ctree.c struct tree_mod_elem *tm = NULL; tm 642 fs/btrfs/ctree.c tm = kzalloc(sizeof(*tm), GFP_NOFS); tm 643 fs/btrfs/ctree.c if (!tm) { tm 648 fs/btrfs/ctree.c tm->logical = new_root->start; tm 649 fs/btrfs/ctree.c tm->old_root.logical = old_root->start; tm 650 fs/btrfs/ctree.c tm->old_root.level = btrfs_header_level(old_root); tm 651 fs/btrfs/ctree.c tm->generation = btrfs_header_generation(old_root); tm 652 fs/btrfs/ctree.c tm->op = MOD_LOG_ROOT_REPLACE; tm 660 fs/btrfs/ctree.c ret = __tree_mod_log_insert(fs_info, tm); tm 675 fs/btrfs/ctree.c kfree(tm); tm 1167 fs/btrfs/ctree.c struct tree_mod_elem *tm; tm 1182 fs/btrfs/ctree.c tm = tree_mod_log_search_oldest(eb_root->fs_info, root_logical, tm 1184 fs/btrfs/ctree.c if (!looped && !tm) tm 1191 fs/btrfs/ctree.c if (!tm) tm 1199 fs/btrfs/ctree.c if (tm->op != MOD_LOG_ROOT_REPLACE) tm 1202 fs/btrfs/ctree.c found = tm; tm 1203 fs/btrfs/ctree.c root_logical = tm->old_root.logical; tm 1209 fs/btrfs/ctree.c found = tm; tm 1225 fs/btrfs/ctree.c struct tree_mod_elem *tm = first_tm; tm 1232 fs/btrfs/ctree.c while (tm && tm->seq >= time_seq) { tm 1238 fs/btrfs/ctree.c switch (tm->op) { tm 1240 fs/btrfs/ctree.c BUG_ON(tm->slot < n); tm 1244 fs/btrfs/ctree.c btrfs_set_node_key(eb, &tm->key, tm->slot); tm 1245 fs/btrfs/ctree.c btrfs_set_node_blockptr(eb, tm->slot, tm->blockptr); tm 1246 fs/btrfs/ctree.c btrfs_set_node_ptr_generation(eb, tm->slot, tm 1247 fs/btrfs/ctree.c tm->generation); tm 1251 fs/btrfs/ctree.c BUG_ON(tm->slot >= n); tm 1252 fs/btrfs/ctree.c btrfs_set_node_key(eb, &tm->key, tm->slot); tm 1253 fs/btrfs/ctree.c btrfs_set_node_blockptr(eb, tm->slot, tm->blockptr); tm 1254 fs/btrfs/ctree.c btrfs_set_node_ptr_generation(eb, tm->slot, tm 1255 fs/btrfs/ctree.c tm->generation); tm 1262 fs/btrfs/ctree.c o_dst = btrfs_node_key_ptr_offset(tm->slot); tm 1263 fs/btrfs/ctree.c o_src = btrfs_node_key_ptr_offset(tm->move.dst_slot); tm 1265 fs/btrfs/ctree.c tm->move.nr_items * p_size); tm 1279 fs/btrfs/ctree.c next = rb_next(&tm->node); tm 1282 fs/btrfs/ctree.c tm = rb_entry(next, struct tree_mod_elem, node); tm 1283 fs/btrfs/ctree.c if (tm->logical != first_tm->logical) tm 1302 fs/btrfs/ctree.c struct tree_mod_elem *tm; tm 1310 fs/btrfs/ctree.c tm = tree_mod_log_search(fs_info, eb->start, time_seq); tm 1311 fs/btrfs/ctree.c if (!tm) tm 1317 fs/btrfs/ctree.c if (tm->op == MOD_LOG_KEY_REMOVE_WHILE_FREEING) { tm 1318 fs/btrfs/ctree.c BUG_ON(tm->slot != 0); tm 1343 fs/btrfs/ctree.c __tree_mod_log_rewind(fs_info, eb_rewin, time_seq, tm); tm 1361 fs/btrfs/ctree.c struct tree_mod_elem *tm; tm 1372 fs/btrfs/ctree.c tm = __tree_mod_log_oldest_root(eb_root, time_seq); tm 1373 fs/btrfs/ctree.c if (!tm) tm 1376 fs/btrfs/ctree.c if (tm->op == MOD_LOG_ROOT_REPLACE) { tm 1377 fs/btrfs/ctree.c old_root = &tm->old_root; tm 1378 fs/btrfs/ctree.c old_generation = tm->generation; tm 1386 fs/btrfs/ctree.c tm = tree_mod_log_search(fs_info, logical, time_seq); tm 1387 fs/btrfs/ctree.c if (old_root && tm && tm->op != MOD_LOG_KEY_REMOVE_WHILE_FREEING) { tm 1423 fs/btrfs/ctree.c if (tm) tm 1424 fs/btrfs/ctree.c __tree_mod_log_rewind(fs_info, eb, time_seq, tm); tm 1434 fs/btrfs/ctree.c struct tree_mod_elem *tm; tm 1438 fs/btrfs/ctree.c tm = __tree_mod_log_oldest_root(eb_root, time_seq); tm 1439 fs/btrfs/ctree.c if (tm && tm->op == MOD_LOG_ROOT_REPLACE) { tm 1440 fs/btrfs/ctree.c level = tm->old_root.level; tm 237 fs/fat/misc.c struct tm tm; tm 238 fs/fat/misc.c time64_to_tm(ts->tv_sec, -fat_tz_offset(sbi), &tm); tm 241 fs/fat/misc.c if (tm.tm_year < 1980 - 1900) { tm 248 fs/fat/misc.c if (tm.tm_year > 2107 - 1900) { tm 257 fs/fat/misc.c tm.tm_year -= 80; tm 259 fs/fat/misc.c tm.tm_mon++; tm 261 fs/fat/misc.c tm.tm_sec >>= 1; tm 263 fs/fat/misc.c *time = cpu_to_le16(tm.tm_hour << 11 | tm.tm_min << 5 | tm.tm_sec); tm 264 fs/fat/misc.c *date = cpu_to_le16(tm.tm_year << 9 | tm.tm_mon << 5 | tm.tm_mday); tm 2477 fs/namespace.c struct tm tm; tm 2479 fs/namespace.c time64_to_tm(sb->s_time_max, 0, &tm); tm 2485 fs/namespace.c tm.tm_year+1900, (unsigned long long)sb->s_time_max); tm 23 fs/nilfs2/sysfs.c struct tm res; \ tm 3038 fs/ntfs/inode.c MFT_RECORD *tm = map_mft_record(tni); tm 3041 fs/ntfs/inode.c if (IS_ERR(tm)) { tm 3043 fs/ntfs/inode.c err = PTR_ERR(tm); tm 3046 fs/ntfs/inode.c ret = write_mft_record(tni, tm, sync); tm 77 fs/udf/udftime.c struct tm tm; tm 84 fs/udf/udftime.c time64_to_tm(seconds, 0, &tm); tm 85 fs/udf/udftime.c dest->year = cpu_to_le16(tm.tm_year + 1900); tm 86 fs/udf/udftime.c dest->month = tm.tm_mon + 1; tm 87 fs/udf/udftime.c dest->day = tm.tm_mday; tm 88 fs/udf/udftime.c dest->hour = tm.tm_hour; tm 89 fs/udf/udftime.c dest->minute = tm.tm_min; tm 90 fs/udf/udftime.c dest->second = tm.tm_sec; tm 21 include/linux/cuda.h extern int cuda_set_rtc_time(struct rtc_time *tm); tm 573 include/linux/efi.h typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc); tm 574 include/linux/efi.h typedef efi_status_t efi_set_time_t (efi_time_t *tm); tm 576 include/linux/efi.h efi_time_t *tm); tm 577 include/linux/efi.h typedef efi_status_t efi_set_wakeup_time_t (efi_bool_t enabled, efi_time_t *tm); tm 41 include/linux/pmu.h extern int pmu_set_rtc_time(struct rtc_time *tm); tm 23 include/linux/rtc.h extern int rtc_valid_tm(struct rtc_time *tm); tm 24 include/linux/rtc.h extern time64_t rtc_tm_to_time64(struct rtc_time *tm); tm 25 include/linux/rtc.h extern void rtc_time64_to_tm(time64_t time, struct rtc_time *tm); tm 26 include/linux/rtc.h ktime_t rtc_tm_to_ktime(struct rtc_time tm); tm 37 include/linux/rtc.h static inline void rtc_time_to_tm(unsigned long time, struct rtc_time *tm) tm 39 include/linux/rtc.h rtc_time64_to_tm(time, tm); tm 42 include/linux/rtc.h static inline int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time) tm 44 include/linux/rtc.h *time = rtc_tm_to_time64(tm); tm 176 include/linux/rtc.h extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); tm 177 include/linux/rtc.h extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); tm 119 include/linux/svga.h int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); tm 120 include/linux/svga.h void svga_set_timings(void __iomem *regbase, const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, u32 hborder, int node); tm 71 include/linux/time.h void time64_to_tm(time64_t totalsecs, int offset, struct tm *result); tm 58 include/net/act_api.h static inline void tcf_lastuse_update(struct tcf_t *tm) tm 62 include/net/act_api.h if (tm->lastuse != now) tm 63 include/net/act_api.h tm->lastuse = now; tm 64 include/net/act_api.h if (unlikely(!tm->firstuse)) tm 65 include/net/act_api.h tm->firstuse = now; tm 2513 kernel/debug/kdb/kdb_main.c struct tm tm; tm 2527 kernel/debug/kdb/kdb_main.c time64_to_tm(now, 0, &tm); tm 2530 kernel/debug/kdb/kdb_main.c 1900+tm.tm_year, tm.tm_mon+1, tm.tm_mday, tm 2531 kernel/debug/kdb/kdb_main.c tm.tm_hour, tm.tm_min, tm.tm_sec, tm 257 kernel/time/alarmtimer.c struct rtc_time tm; tm 301 kernel/time/alarmtimer.c rtc_read_time(rtc, &tm); tm 302 kernel/time/alarmtimer.c now = rtc_tm_to_ktime(tm); tm 78 kernel/time/timeconv.c void time64_to_tm(time64_t totalsecs, int offset, struct tm *result) tm 498 lib/test_printf.c const struct rtc_time tm = { tm 507 lib/test_printf.c test("(%ptR?)", "%pt", &tm); tm 508 lib/test_printf.c test("2018-11-26T05:35:43", "%ptR", &tm); tm 509 lib/test_printf.c test("0118-10-26T05:35:43", "%ptRr", &tm); tm 510 lib/test_printf.c test("05:35:43|2018-11-26", "%ptRt|%ptRd", &tm, &tm); tm 511 lib/test_printf.c test("05:35:43|0118-10-26", "%ptRtr|%ptRdr", &tm, &tm); tm 512 lib/test_printf.c test("05:35:43|2018-11-26", "%ptRttr|%ptRdtr", &tm, &tm); tm 513 lib/test_printf.c test("05:35:43 tr|2018-11-26 tr", "%ptRt tr|%ptRd tr", &tm, &tm); tm 1718 lib/vsprintf.c char *date_str(char *buf, char *end, const struct rtc_time *tm, bool r) tm 1720 lib/vsprintf.c int year = tm->tm_year + (r ? 0 : 1900); tm 1721 lib/vsprintf.c int mon = tm->tm_mon + (r ? 0 : 1); tm 1733 lib/vsprintf.c return number(buf, end, tm->tm_mday, default_dec02_spec); tm 1737 lib/vsprintf.c char *time_str(char *buf, char *end, const struct rtc_time *tm, bool r) tm 1739 lib/vsprintf.c buf = number(buf, end, tm->tm_hour, default_dec02_spec); tm 1744 lib/vsprintf.c buf = number(buf, end, tm->tm_min, default_dec02_spec); tm 1749 lib/vsprintf.c return number(buf, end, tm->tm_sec, default_dec02_spec); tm 1753 lib/vsprintf.c char *rtc_str(char *buf, char *end, const struct rtc_time *tm, tm 1760 lib/vsprintf.c if (check_pointer(&buf, end, tm, spec)) tm 1777 lib/vsprintf.c buf = date_str(buf, end, tm, raw); tm 1785 lib/vsprintf.c buf = time_str(buf, end, tm, raw); tm 1226 net/core/sock.c struct __kernel_old_timeval tm; tm 54 net/ipv4/tcp_metrics.c static inline struct net *tm_net(struct tcp_metrics_block *tm) tm 56 net/ipv4/tcp_metrics.c return read_pnet(&tm->tcpm_net); tm 59 net/ipv4/tcp_metrics.c static bool tcp_metric_locked(struct tcp_metrics_block *tm, tm 62 net/ipv4/tcp_metrics.c return tm->tcpm_lock & (1 << idx); tm 65 net/ipv4/tcp_metrics.c static u32 tcp_metric_get(struct tcp_metrics_block *tm, tm 68 net/ipv4/tcp_metrics.c return tm->tcpm_vals[idx]; tm 71 net/ipv4/tcp_metrics.c static void tcp_metric_set(struct tcp_metrics_block *tm, tm 75 net/ipv4/tcp_metrics.c tm->tcpm_vals[idx] = val; tm 93 net/ipv4/tcp_metrics.c static void tcpm_suck_dst(struct tcp_metrics_block *tm, tm 100 net/ipv4/tcp_metrics.c tm->tcpm_stamp = jiffies; tm 113 net/ipv4/tcp_metrics.c tm->tcpm_lock = val; tm 116 net/ipv4/tcp_metrics.c tm->tcpm_vals[TCP_METRIC_RTT] = msval * USEC_PER_MSEC; tm 119 net/ipv4/tcp_metrics.c tm->tcpm_vals[TCP_METRIC_RTTVAR] = msval * USEC_PER_MSEC; tm 120 net/ipv4/tcp_metrics.c tm->tcpm_vals[TCP_METRIC_SSTHRESH] = dst_metric_raw(dst, RTAX_SSTHRESH); tm 121 net/ipv4/tcp_metrics.c tm->tcpm_vals[TCP_METRIC_CWND] = dst_metric_raw(dst, RTAX_CWND); tm 122 net/ipv4/tcp_metrics.c tm->tcpm_vals[TCP_METRIC_REORDERING] = dst_metric_raw(dst, RTAX_REORDERING); tm 124 net/ipv4/tcp_metrics.c tm->tcpm_fastopen.mss = 0; tm 125 net/ipv4/tcp_metrics.c tm->tcpm_fastopen.syn_loss = 0; tm 126 net/ipv4/tcp_metrics.c tm->tcpm_fastopen.try_exp = 0; tm 127 net/ipv4/tcp_metrics.c tm->tcpm_fastopen.cookie.exp = false; tm 128 net/ipv4/tcp_metrics.c tm->tcpm_fastopen.cookie.len = 0; tm 134 net/ipv4/tcp_metrics.c static void tcpm_check_stamp(struct tcp_metrics_block *tm, struct dst_entry *dst) tm 136 net/ipv4/tcp_metrics.c if (tm && unlikely(time_after(jiffies, tm->tcpm_stamp + TCP_METRICS_TIMEOUT))) tm 137 net/ipv4/tcp_metrics.c tcpm_suck_dst(tm, dst, false); tm 151 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 161 net/ipv4/tcp_metrics.c tm = __tcp_get_metrics(saddr, daddr, net, hash); tm 162 net/ipv4/tcp_metrics.c if (tm == TCP_METRICS_RECLAIM_PTR) { tm 164 net/ipv4/tcp_metrics.c tm = NULL; tm 166 net/ipv4/tcp_metrics.c if (tm) { tm 167 net/ipv4/tcp_metrics.c tcpm_check_stamp(tm, dst); tm 175 net/ipv4/tcp_metrics.c for (tm = deref_locked(oldest->tcpm_next); tm; tm 176 net/ipv4/tcp_metrics.c tm = deref_locked(tm->tcpm_next)) { tm 177 net/ipv4/tcp_metrics.c if (time_before(tm->tcpm_stamp, oldest->tcpm_stamp)) tm 178 net/ipv4/tcp_metrics.c oldest = tm; tm 180 net/ipv4/tcp_metrics.c tm = oldest; tm 182 net/ipv4/tcp_metrics.c tm = kmalloc(sizeof(*tm), GFP_ATOMIC); tm 183 net/ipv4/tcp_metrics.c if (!tm) tm 186 net/ipv4/tcp_metrics.c write_pnet(&tm->tcpm_net, net); tm 187 net/ipv4/tcp_metrics.c tm->tcpm_saddr = *saddr; tm 188 net/ipv4/tcp_metrics.c tm->tcpm_daddr = *daddr; tm 190 net/ipv4/tcp_metrics.c tcpm_suck_dst(tm, dst, true); tm 193 net/ipv4/tcp_metrics.c tm->tcpm_next = tcp_metrics_hash[hash].chain; tm 194 net/ipv4/tcp_metrics.c rcu_assign_pointer(tcp_metrics_hash[hash].chain, tm); tm 199 net/ipv4/tcp_metrics.c return tm; tm 202 net/ipv4/tcp_metrics.c static struct tcp_metrics_block *tcp_get_encode(struct tcp_metrics_block *tm, int depth) tm 204 net/ipv4/tcp_metrics.c if (tm) tm 205 net/ipv4/tcp_metrics.c return tm; tm 215 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 218 net/ipv4/tcp_metrics.c for (tm = rcu_dereference(tcp_metrics_hash[hash].chain); tm; tm 219 net/ipv4/tcp_metrics.c tm = rcu_dereference(tm->tcpm_next)) { tm 220 net/ipv4/tcp_metrics.c if (addr_same(&tm->tcpm_saddr, saddr) && tm 221 net/ipv4/tcp_metrics.c addr_same(&tm->tcpm_daddr, daddr) && tm 222 net/ipv4/tcp_metrics.c net_eq(tm_net(tm), net)) tm 226 net/ipv4/tcp_metrics.c return tcp_get_encode(tm, depth); tm 232 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 260 net/ipv4/tcp_metrics.c for (tm = rcu_dereference(tcp_metrics_hash[hash].chain); tm; tm 261 net/ipv4/tcp_metrics.c tm = rcu_dereference(tm->tcpm_next)) { tm 262 net/ipv4/tcp_metrics.c if (addr_same(&tm->tcpm_saddr, &saddr) && tm 263 net/ipv4/tcp_metrics.c addr_same(&tm->tcpm_daddr, &daddr) && tm 264 net/ipv4/tcp_metrics.c net_eq(tm_net(tm), net)) tm 267 net/ipv4/tcp_metrics.c tcpm_check_stamp(tm, dst); tm 268 net/ipv4/tcp_metrics.c return tm; tm 275 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 305 net/ipv4/tcp_metrics.c tm = __tcp_get_metrics(&saddr, &daddr, net, hash); tm 306 net/ipv4/tcp_metrics.c if (tm == TCP_METRICS_RECLAIM_PTR) tm 307 net/ipv4/tcp_metrics.c tm = NULL; tm 308 net/ipv4/tcp_metrics.c if (!tm && create) tm 309 net/ipv4/tcp_metrics.c tm = tcpm_new(dst, &saddr, &daddr, hash); tm 311 net/ipv4/tcp_metrics.c tcpm_check_stamp(tm, dst); tm 313 net/ipv4/tcp_metrics.c return tm; tm 326 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 341 net/ipv4/tcp_metrics.c tm = tcp_get_metrics(sk, dst, false); tm 342 net/ipv4/tcp_metrics.c if (tm && !tcp_metric_locked(tm, TCP_METRIC_RTT)) tm 343 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_RTT, 0); tm 346 net/ipv4/tcp_metrics.c tm = tcp_get_metrics(sk, dst, true); tm 348 net/ipv4/tcp_metrics.c if (!tm) tm 351 net/ipv4/tcp_metrics.c rtt = tcp_metric_get(tm, TCP_METRIC_RTT); tm 358 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_RTT)) { tm 363 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_RTT, rtt); tm 366 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_RTTVAR)) { tm 377 net/ipv4/tcp_metrics.c var = tcp_metric_get(tm, TCP_METRIC_RTTVAR); tm 383 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_RTTVAR, var); tm 388 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_SSTHRESH)) { tm 389 net/ipv4/tcp_metrics.c val = tcp_metric_get(tm, TCP_METRIC_SSTHRESH); tm 391 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_SSTHRESH, tm 394 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_CWND)) { tm 395 net/ipv4/tcp_metrics.c val = tcp_metric_get(tm, TCP_METRIC_CWND); tm 397 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_CWND, tm 403 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_SSTHRESH)) tm 404 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_SSTHRESH, tm 406 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_CWND)) { tm 407 net/ipv4/tcp_metrics.c val = tcp_metric_get(tm, TCP_METRIC_CWND); tm 408 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_CWND, (val + tp->snd_cwnd) >> 1); tm 414 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_CWND)) { tm 415 net/ipv4/tcp_metrics.c val = tcp_metric_get(tm, TCP_METRIC_CWND); tm 416 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_CWND, tm 419 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_SSTHRESH)) { tm 420 net/ipv4/tcp_metrics.c val = tcp_metric_get(tm, TCP_METRIC_SSTHRESH); tm 422 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_SSTHRESH, tm 425 net/ipv4/tcp_metrics.c if (!tcp_metric_locked(tm, TCP_METRIC_REORDERING)) { tm 426 net/ipv4/tcp_metrics.c val = tcp_metric_get(tm, TCP_METRIC_REORDERING); tm 429 net/ipv4/tcp_metrics.c tcp_metric_set(tm, TCP_METRIC_REORDERING, tm 433 net/ipv4/tcp_metrics.c tm->tcpm_stamp = jiffies; tm 444 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 452 net/ipv4/tcp_metrics.c tm = tcp_get_metrics(sk, dst, true); tm 453 net/ipv4/tcp_metrics.c if (!tm) { tm 458 net/ipv4/tcp_metrics.c if (tcp_metric_locked(tm, TCP_METRIC_CWND)) tm 459 net/ipv4/tcp_metrics.c tp->snd_cwnd_clamp = tcp_metric_get(tm, TCP_METRIC_CWND); tm 461 net/ipv4/tcp_metrics.c val = tcp_metric_get(tm, TCP_METRIC_SSTHRESH); tm 472 net/ipv4/tcp_metrics.c val = tcp_metric_get(tm, TCP_METRIC_REORDERING); tm 476 net/ipv4/tcp_metrics.c crtt = tcp_metric_get(tm, TCP_METRIC_RTT); tm 519 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 526 net/ipv4/tcp_metrics.c tm = __tcp_get_metrics_req(req, dst); tm 527 net/ipv4/tcp_metrics.c if (tm && tcp_metric_get(tm, TCP_METRIC_RTT)) tm 541 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 544 net/ipv4/tcp_metrics.c tm = tcp_get_metrics(sk, __sk_dst_get(sk), false); tm 545 net/ipv4/tcp_metrics.c if (tm) { tm 546 net/ipv4/tcp_metrics.c struct tcp_fastopen_metrics *tfom = &tm->tcpm_fastopen; tm 566 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 571 net/ipv4/tcp_metrics.c tm = tcp_get_metrics(sk, dst, true); tm 572 net/ipv4/tcp_metrics.c if (tm) { tm 573 net/ipv4/tcp_metrics.c struct tcp_fastopen_metrics *tfom = &tm->tcpm_fastopen; tm 617 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm) tm 622 net/ipv4/tcp_metrics.c switch (tm->tcpm_daddr.family) { tm 625 net/ipv4/tcp_metrics.c inetpeer_get_addr_v4(&tm->tcpm_daddr)) < 0) tm 628 net/ipv4/tcp_metrics.c inetpeer_get_addr_v4(&tm->tcpm_saddr)) < 0) tm 633 net/ipv4/tcp_metrics.c inetpeer_get_addr_v6(&tm->tcpm_daddr)) < 0) tm 636 net/ipv4/tcp_metrics.c inetpeer_get_addr_v6(&tm->tcpm_saddr)) < 0) tm 644 net/ipv4/tcp_metrics.c jiffies - tm->tcpm_stamp, tm 655 net/ipv4/tcp_metrics.c u32 val = tm->tcpm_vals[i]; tm 689 net/ipv4/tcp_metrics.c tfom_copy[0] = tm->tcpm_fastopen; tm 718 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm) tm 728 net/ipv4/tcp_metrics.c if (tcp_metrics_fill_info(skb, tm) < 0) tm 748 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 752 net/ipv4/tcp_metrics.c for (col = 0, tm = rcu_dereference(hb->chain); tm; tm 753 net/ipv4/tcp_metrics.c tm = rcu_dereference(tm->tcpm_next), col++) { tm 754 net/ipv4/tcp_metrics.c if (!net_eq(tm_net(tm), net)) tm 758 net/ipv4/tcp_metrics.c if (tcp_metrics_dump_info(skb, cb, tm) < 0) { tm 816 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 846 net/ipv4/tcp_metrics.c for (tm = rcu_dereference(tcp_metrics_hash[hash].chain); tm; tm 847 net/ipv4/tcp_metrics.c tm = rcu_dereference(tm->tcpm_next)) { tm 848 net/ipv4/tcp_metrics.c if (addr_same(&tm->tcpm_daddr, &daddr) && tm 849 net/ipv4/tcp_metrics.c (!src || addr_same(&tm->tcpm_saddr, &saddr)) && tm 850 net/ipv4/tcp_metrics.c net_eq(tm_net(tm), net)) { tm 851 net/ipv4/tcp_metrics.c ret = tcp_metrics_fill_info(msg, tm); tm 874 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 883 net/ipv4/tcp_metrics.c for (tm = deref_locked(*pp); tm; tm = deref_locked(*pp)) { tm 884 net/ipv4/tcp_metrics.c match = net ? net_eq(tm_net(tm), net) : tm 885 net/ipv4/tcp_metrics.c !refcount_read(&tm_net(tm)->count); tm 887 net/ipv4/tcp_metrics.c *pp = tm->tcpm_next; tm 888 net/ipv4/tcp_metrics.c kfree_rcu(tm, rcu_head); tm 890 net/ipv4/tcp_metrics.c pp = &tm->tcpm_next; tm 900 net/ipv4/tcp_metrics.c struct tcp_metrics_block *tm; tm 924 net/ipv4/tcp_metrics.c for (tm = deref_locked(*pp); tm; tm = deref_locked(*pp)) { tm 925 net/ipv4/tcp_metrics.c if (addr_same(&tm->tcpm_daddr, &daddr) && tm 926 net/ipv4/tcp_metrics.c (!src || addr_same(&tm->tcpm_saddr, &saddr)) && tm 927 net/ipv4/tcp_metrics.c net_eq(tm_net(tm), net)) { tm 928 net/ipv4/tcp_metrics.c *pp = tm->tcpm_next; tm 929 net/ipv4/tcp_metrics.c kfree_rcu(tm, rcu_head); tm 932 net/ipv4/tcp_metrics.c pp = &tm->tcpm_next; tm 50 net/netfilter/nft_meta.c struct tm tm; tm 52 net/netfilter/nft_meta.c time64_to_tm(secs, 0, &tm); tm 54 net/netfilter/nft_meta.c return tm.tm_hour * NFT_META_SECS_PER_HOUR tm 55 net/netfilter/nft_meta.c + tm.tm_min * NFT_META_SECS_PER_MINUTE tm 56 net/netfilter/nft_meta.c + tm.tm_sec; tm 144 net/sched/act_bpf.c struct tcf_t tm; tm 159 net/sched/act_bpf.c tcf_tm_dump(&tm, &prog->tcf_tm); tm 160 net/sched/act_bpf.c if (nla_put_64bit(skb, TCA_ACT_BPF_TM, sizeof(tm), &tm, tm 178 net/sched/act_gact.c struct tcf_t *tm = &gact->tcf_tm; tm 189 net/sched/act_gact.c tm->lastuse = max_t(u64, tm->lastuse, lastuse); tm 281 net/sched/act_ipt.c struct tcf_t tm; tm 305 net/sched/act_ipt.c tcf_tm_dump(&tm, &ipt->tcf_tm); tm 306 net/sched/act_ipt.c if (nla_put_64bit(skb, TCA_IPT_TM, sizeof(tm), &tm, TCA_IPT_PAD)) tm 319 net/sched/act_mirred.c struct tcf_t *tm = &m->tcf_tm; tm 325 net/sched/act_mirred.c tm->lastuse = max_t(u64, tm->lastuse, lastuse); tm 295 net/sched/act_police.c struct tcf_t *tm = &police->tcf_tm; tm 301 net/sched/act_police.c tm->lastuse = max_t(u64, tm->lastuse, lastuse); tm 523 net/sched/act_tunnel_key.c struct tcf_t tm; tm 559 net/sched/act_tunnel_key.c tcf_tm_dump(&tm, &t->tcf_tm); tm 560 net/sched/act_tunnel_key.c if (nla_put_64bit(skb, TCA_TUNNEL_KEY_TM, sizeof(tm), tm 561 net/sched/act_tunnel_key.c &tm, TCA_TUNNEL_KEY_PAD)) tm 308 net/sched/act_vlan.c struct tcf_t *tm = &v->tcf_tm; tm 314 net/sched/act_vlan.c tm->lastuse = max_t(u64, tm->lastuse, lastuse); tm 582 net/sched/cls_bpf.c struct sk_buff *skb, struct tcmsg *tm, bool rtnl_held) tm 592 net/sched/cls_bpf.c tm->tcm_handle = prog->handle; tm 31 net/sched/em_text.c struct text_match *tm = EM_TEXT_PRIV(m); tm 34 net/sched/em_text.c from = tcf_get_base_ptr(skb, tm->from_layer) - skb->data; tm 35 net/sched/em_text.c from += tm->from_offset; tm 37 net/sched/em_text.c to = tcf_get_base_ptr(skb, tm->to_layer) - skb->data; tm 38 net/sched/em_text.c to += tm->to_offset; tm 40 net/sched/em_text.c return skb_find_text(skb, from, to, tm->config) != UINT_MAX; tm 46 net/sched/em_text.c struct text_match *tm; tm 80 net/sched/em_text.c tm = kmalloc(sizeof(*tm), GFP_KERNEL); tm 81 net/sched/em_text.c if (tm == NULL) { tm 86 net/sched/em_text.c tm->from_offset = conf->from_offset; tm 87 net/sched/em_text.c tm->to_offset = conf->to_offset; tm 88 net/sched/em_text.c tm->from_layer = conf->from_layer; tm 89 net/sched/em_text.c tm->to_layer = conf->to_layer; tm 90 net/sched/em_text.c tm->config = ts_conf; tm 92 net/sched/em_text.c m->datalen = sizeof(*tm); tm 93 net/sched/em_text.c m->data = (unsigned long) tm; tm 106 net/sched/em_text.c struct text_match *tm = EM_TEXT_PRIV(m); tm 109 net/sched/em_text.c strncpy(conf.algo, tm->config->ops->name, sizeof(conf.algo) - 1); tm 110 net/sched/em_text.c conf.from_offset = tm->from_offset; tm 111 net/sched/em_text.c conf.to_offset = tm->to_offset; tm 112 net/sched/em_text.c conf.from_layer = tm->from_layer; tm 113 net/sched/em_text.c conf.to_layer = tm->to_layer; tm 114 net/sched/em_text.c conf.pattern_len = textsearch_get_pattern_len(tm->config); tm 120 net/sched/em_text.c textsearch_get_pattern(tm->config)) < 0) tm 106 samples/connector/ucon.c time_t tm; tm 224 samples/connector/ucon.c time(&tm); tm 226 samples/connector/ucon.c ctime(&tm), data->id.idx, data->id.val, data->seq, data->ack); tm 48 samples/vfs/test-statx.c struct tm tm; tm 54 samples/vfs/test-statx.c if (!localtime_r(&tim, &tm)) { tm 58 samples/vfs/test-statx.c len = strftime(buffer, 100, "%F %T", &tm); tm 66 samples/vfs/test-statx.c len = strftime(buffer, 100, "%z", &tm); tm 93 security/tomoyo/util.c struct tm tm; tm 95 security/tomoyo/util.c time64_to_tm(time64, 0, &tm); tm 96 security/tomoyo/util.c stamp->sec = tm.tm_sec; tm 97 security/tomoyo/util.c stamp->min = tm.tm_min; tm 98 security/tomoyo/util.c stamp->hour = tm.tm_hour; tm 99 security/tomoyo/util.c stamp->day = tm.tm_mday; tm 100 security/tomoyo/util.c stamp->month = tm.tm_mon + 1; tm 101 security/tomoyo/util.c stamp->year = tm.tm_year + 1900; tm 434 sound/core/seq/seq_timer.c struct timespec64 tm; tm 436 sound/core/seq/seq_timer.c ktime_get_ts64(&tm); tm 437 sound/core/seq/seq_timer.c tm = timespec64_sub(tm, tmr->last_update); tm 438 sound/core/seq/seq_timer.c cur_time.tv_nsec += tm.tv_nsec; tm 439 sound/core/seq/seq_timer.c cur_time.tv_sec += tm.tv_sec; tm 83 sound/core/seq/seq_timer.h static inline void snd_seq_sanity_real_time(snd_seq_real_time_t *tm) tm 85 sound/core/seq/seq_timer.h while (tm->tv_nsec >= 1000000000) { tm 87 sound/core/seq/seq_timer.h tm->tv_nsec -= 1000000000; tm 88 sound/core/seq/seq_timer.h tm->tv_sec++; tm 94 sound/core/seq/seq_timer.h static inline void snd_seq_inc_real_time(snd_seq_real_time_t *tm, snd_seq_real_time_t *inc) tm 96 sound/core/seq/seq_timer.h tm->tv_sec += inc->tv_sec; tm 97 sound/core/seq/seq_timer.h tm->tv_nsec += inc->tv_nsec; tm 98 sound/core/seq/seq_timer.h snd_seq_sanity_real_time(tm); tm 101 sound/core/seq/seq_timer.h static inline void snd_seq_inc_time_nsec(snd_seq_real_time_t *tm, unsigned long nsec) tm 103 sound/core/seq/seq_timer.h tm->tv_nsec += nsec; tm 104 sound/core/seq/seq_timer.h snd_seq_sanity_real_time(tm); tm 140 sound/pci/ice1712/ice1712.c int tm; tm 143 sound/pci/ice1712/ice1712.c for (tm = 0; tm < 0x10000; tm++) { tm 155 sound/pci/ice1712/ice1712.c for (tm = 0; tm < 0x10000; tm++) tm 164 sound/pci/ice1712/ice1712.c int tm; tm 167 sound/pci/ice1712/ice1712.c for (tm = 0; tm < 0x10000; tm++) { tm 177 sound/pci/ice1712/ice1712.c for (tm = 0; tm < 0x10000; tm++) tm 180 sound/pci/ice1712/ice1712.c if (tm >= 0x10000) /* timeout */ tm 194 sound/pci/ice1712/ice1712.c int tm; tm 197 sound/pci/ice1712/ice1712.c for (tm = 0; tm < 0x10000; tm++) { tm 209 sound/pci/ice1712/ice1712.c for (tm = 0; tm < 0x10000; tm++) tm 219 sound/pci/ice1712/ice1712.c int tm; tm 222 sound/pci/ice1712/ice1712.c for (tm = 0; tm < 0x10000; tm++) { tm 232 sound/pci/ice1712/ice1712.c for (tm = 0; tm < 0x10000; tm++) tm 235 sound/pci/ice1712/ice1712.c if (tm >= 0x10000) /* timeout */ tm 126 sound/pci/ice1712/ice1724.c int tm; tm 127 sound/pci/ice1712/ice1724.c for (tm = 0; tm < 0x10000; tm++) { tm 141 sound/pci/ice1712/ice1724.c int tm; tm 142 sound/pci/ice1712/ice1724.c for (tm = 0; tm < 0x10000; tm++) tm 53 tools/bpf/bpftool/prog.c struct tm load_tm; tm 594 tools/perf/builtin-kvm.c struct tm ltime; tm 228 tools/perf/builtin-stat.c static int write_stat_round_event(u64 tm, u64 type) tm 230 tools/perf/builtin-stat.c return perf_event__synthesize_stat_round(NULL, tm, type, tm 1768 tools/perf/builtin-stat.c struct timespec tm; tm 1776 tools/perf/builtin-stat.c clock_gettime(CLOCK_REALTIME, &tm); tm 1777 tools/perf/builtin-stat.c fprintf(output, "# started on %s\n", ctime(&tm.tv_sec)); tm 134 tools/perf/jvmti/jvmti_agent.c struct tm tm; tm 139 tools/perf/jvmti/jvmti_agent.c localtime_r(&t, &tm); tm 147 tools/perf/jvmti/jvmti_agent.c strftime(str, sizeof(str), JIT_LANG"-jit-%Y%m%d", &tm); tm 1848 tools/perf/util/intel-pt.c u64 tm = ptq->timestamp; tm 1850 tools/perf/util/intel-pt.c tm = pt->timeless_decoding ? 0 : tsc_to_perf_time(tm, &pt->tc); tm 1853 tools/perf/util/intel-pt.c ptq->tid, state->from_ip, tm); tm 2953 tools/perf/util/intel-pt.c u64 tsc, tm; tm 2958 tools/perf/util/intel-pt.c tm = tsc_to_perf_time(tsc, &pt->tc); tm 2959 tools/perf/util/intel-pt.c if (tm < ns) tm 2964 tools/perf/util/intel-pt.c while (tm < ns) tm 2965 tools/perf/util/intel-pt.c tm = tsc_to_perf_time(++tsc, &pt->tc); tm 2973 tools/perf/util/intel-pt.c u64 tsc, tm; tm 2978 tools/perf/util/intel-pt.c tm = tsc_to_perf_time(tsc, &pt->tc); tm 2979 tools/perf/util/intel-pt.c if (tm > ns) tm 2984 tools/perf/util/intel-pt.c while (tm > ns) tm 2985 tools/perf/util/intel-pt.c tm = tsc_to_perf_time(--tsc, &pt->tc); tm 636 tools/perf/util/thread-stack.c u64 tm = sample->time; tm 642 tools/perf/util/thread-stack.c tm, ref, true); tm 663 tools/perf/util/thread-stack.c u64 tm = sample->time; tm 676 tools/perf/util/thread-stack.c return thread_stack__push_cp(ts, 0, tm, ref, cp, true, tm 699 tools/perf/util/thread-stack.c tm, ref, false); tm 707 tools/perf/util/thread-stack.c return thread_stack__push_cp(ts, addr, tm, ref, cp, tm 717 tools/perf/util/thread-stack.c err = thread_stack__push_cp(ts, 0, tm, ref, cp, true, false); tm 731 tools/perf/util/thread-stack.c err = thread_stack__push_cp(ts, addr, tm, ref, cp, true, false); tm 737 tools/perf/util/thread-stack.c err = thread_stack__push_cp(ts, ip, tm, ref, cp, true, false); tm 741 tools/perf/util/thread-stack.c return thread_stack__call_return(thread, ts, --ts->cnt, tm, ref, false); tm 547 tools/perf/util/time-utils.c struct tm tm; tm 550 tools/perf/util/time-utils.c if (gettimeofday(&tv, NULL) || !localtime_r(&tv.tv_sec, &tm)) tm 553 tools/perf/util/time-utils.c if (!strftime(dt, sizeof(dt), "%Y%m%d%H%M%S", &tm)) tm 115 tools/testing/selftests/rtc/rtctest.c struct rtc_time tm; tm 120 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_RD_TIME, &tm); tm 123 tools/testing/selftests/rtc/rtctest.c secs = timegm((struct tm *)&tm) + ALARM_DELTA; tm 124 tools/testing/selftests/rtc/rtctest.c gmtime_r(&secs, (struct tm *)&tm); tm 126 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_ALM_SET, &tm); tm 133 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_ALM_READ, &tm); tm 137 tools/testing/selftests/rtc/rtctest.c tm.tm_hour, tm.tm_min, tm.tm_sec); tm 158 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_RD_TIME, &tm); tm 161 tools/testing/selftests/rtc/rtctest.c new = timegm((struct tm *)&tm); tm 168 tools/testing/selftests/rtc/rtctest.c struct rtc_time tm; tm 177 tools/testing/selftests/rtc/rtctest.c secs = timegm((struct tm *)&alarm.time) + ALARM_DELTA; tm 178 tools/testing/selftests/rtc/rtctest.c gmtime_r(&secs, (struct tm *)&alarm.time); tm 207 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_RD_TIME, &tm); tm 210 tools/testing/selftests/rtc/rtctest.c new = timegm((struct tm *)&tm); tm 217 tools/testing/selftests/rtc/rtctest.c struct rtc_time tm; tm 222 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_RD_TIME, &tm); tm 225 tools/testing/selftests/rtc/rtctest.c secs = timegm((struct tm *)&tm) + 60 - tm.tm_sec; tm 226 tools/testing/selftests/rtc/rtctest.c gmtime_r(&secs, (struct tm *)&tm); tm 228 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_ALM_SET, &tm); tm 235 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_ALM_READ, &tm); tm 239 tools/testing/selftests/rtc/rtctest.c tm.tm_hour, tm.tm_min, tm.tm_sec); tm 260 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_RD_TIME, &tm); tm 263 tools/testing/selftests/rtc/rtctest.c new = timegm((struct tm *)&tm); tm 270 tools/testing/selftests/rtc/rtctest.c struct rtc_time tm; tm 279 tools/testing/selftests/rtc/rtctest.c secs = timegm((struct tm *)&alarm.time) + 60 - alarm.time.tm_sec; tm 280 tools/testing/selftests/rtc/rtctest.c gmtime_r(&secs, (struct tm *)&alarm.time); tm 309 tools/testing/selftests/rtc/rtctest.c rc = ioctl(self->fd, RTC_RD_TIME, &tm); tm 312 tools/testing/selftests/rtc/rtctest.c new = timegm((struct tm *)&tm);