/linux/tools/testing/selftests/rtc/ |
H A D | setdate.c | 47 sscanf(date, "%d-%d-%d", &new.tm_mday, &new.tm_mon, &new.tm_year); in main() 48 new.tm_mon -= 1; in main() 53 new.tm_mday, new.tm_mon + 1, new.tm_year + 1900, in main() 72 current.tm_mday, current.tm_mon + 1, current.tm_year + 1900, in main()
|
/linux/drivers/rtc/ |
H A D | rtc-wm8350.c | 62 tm->tm_mon = ((time1[2] & WM8350_RTC_MTH_MASK) in wm8350_rtc_readtime() 71 tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, in wm8350_rtc_readtime() 102 time[2] |= (tm->tm_mon + 1) << WM8350_RTC_MTH_SHIFT; in wm8350_rtc_settime() 168 tm->tm_mon = time[2] & WM8350_RTC_ALMMTH_MASK; in wm8350_rtc_readalarm() 169 if (tm->tm_mon == WM8350_RTC_ALMMTH_MASK) in wm8350_rtc_readalarm() 170 tm->tm_mon = -1; in wm8350_rtc_readalarm() 172 tm->tm_mon = (tm->tm_mon >> WM8350_RTC_ALMMTH_SHIFT) - 1; in wm8350_rtc_readalarm() 277 if (tm->tm_mon != -1) in wm8350_rtc_setalarm() 278 time[2] |= (tm->tm_mon + 1) << WM8350_RTC_ALMMTH_SHIFT; in wm8350_rtc_setalarm()
|
H A D | rtc-ma35d1.c | 133 tm->tm_mon = bcd2bin(cal >> 8); in ma35d1_rtc_read_time() 134 tm->tm_mon = tm->tm_mon - 1; in ma35d1_rtc_read_time() 149 val = bin2bcd(tm->tm_mday) << 0 | bin2bcd(tm->tm_mon + 1) << 8 | in ma35d1_rtc_set_time() 172 alrm->time.tm_mon = bcd2bin(calm >> 8); in ma35d1_rtc_read_alarm() 173 alrm->time.tm_mon = alrm->time.tm_mon - 1; in ma35d1_rtc_read_alarm() 189 val = bin2bcd(alrm->time.tm_mday) << 0 | bin2bcd(alrm->time.tm_mon + 1) << 8 | in ma35d1_rtc_set_alarm()
|
H A D | rtc-s3c.c | 143 tm->tm_mon = readb(info->base + S3C2410_RTCMON); in s3c_rtc_read_time() 163 tm->tm_mon = bcd2bin(tm->tm_mon); in s3c_rtc_read_time() 182 writeb(bin2bcd(tm->tm_mon), info->base + S3C2410_RTCMON); in s3c_rtc_write_time() 201 tm->tm_mon -= 1; in s3c_rtc_gettime() 219 rtc_tm.tm_mon += 1; in s3c_rtc_settime() 238 alm_tm->tm_mon = readb(info->base + S3C2410_ALMMON); in s3c_rtc_getalarm() 264 alm_tm->tm_mon = bcd2bin(alm_tm->tm_mon); in s3c_rtc_getalarm() 265 alm_tm->tm_mon -= 1; in s3c_rtc_getalarm() 305 if (tm->tm_mon < 12 && tm->tm_mon >= 0) { in s3c_rtc_setalarm() 307 writeb(bin2bcd(tm->tm_mon + 1), info->base + S3C2410_ALMMON); in s3c_rtc_setalarm()
|
H A D | rtc-moxart.c | 154 (((tm->tm_mon + 1) / 10) << 4) | in moxart_rtc_set_time() 155 ((tm->tm_mon + 1) % 10)); in moxart_rtc_set_time() 179 __func__, tm->tm_year, tm->tm_mon, tm->tm_mday, in moxart_rtc_set_time() 214 tm->tm_mon = (((v & 0x10) >> 4) * 10) + (v & 0x0F); in moxart_rtc_read_time() 215 tm->tm_mon--; in moxart_rtc_read_time() 225 tm->tm_yday = day_of_year[tm->tm_mon]; in moxart_rtc_read_time() 227 if (tm->tm_mon >= 2) { in moxart_rtc_read_time()
|
H A D | rtc-mt6397.c | 78 tm->tm_mon = data[RTC_OFFSET_MTH] & RTC_TC_MTH_MASK; in __mtk_rtc_read_time() 106 tm->tm_mon--; in mtk_rtc_read_time() 126 tm->tm_mon++; in mtk_rtc_set_time() 132 data[RTC_OFFSET_MTH] = tm->tm_mon; in mtk_rtc_set_time() 178 tm->tm_mon = data[RTC_OFFSET_MTH] & RTC_AL_MTH_MASK; in mtk_rtc_read_alarm() 182 tm->tm_mon--; in mtk_rtc_read_alarm() 198 tm->tm_mon++; in mtk_rtc_set_alarm() 215 (tm->tm_mon & RTC_AL_MTH_MASK)); in mtk_rtc_set_alarm()
|
H A D | rtc-optee.c | 27 u32 tm_mon; member 87 tm->tm_mon = optee_tm->tm_mon; in optee_rtc_readtime() 90 tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); in optee_rtc_readtime() 108 optee_tm.tm_mon = tm->tm_mon; in optee_rtc_settime() 224 rtc->range_min = mktime64(tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, in optee_rtc_read_info() 227 rtc->range_max = mktime64(tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, in optee_rtc_read_info()
|
H A D | rtc-fm3130.c | 124 t->tm_mon = bcd2bin(tmp) - 1; in fm3130_get_time() 133 t->tm_mon, t->tm_year, t->tm_wday); in fm3130_get_time() 149 t->tm_mon, t->tm_year, t->tm_wday); in fm3130_set_time() 157 buf[FM3130_RTC_MONTHS] = bin2bcd(t->tm_mon + 1); in fm3130_set_time() 215 tm->tm_mon = bcd2bin(fm3130->regs[FM3130_ALARM_MONTHS] & 0x1F); in fm3130_read_alarm() 217 if (tm->tm_mon > 0) in fm3130_read_alarm() 218 tm->tm_mon -= 1; /* RTC is 1-12, tm_mon is 0-11 */ in fm3130_read_alarm() 224 tm->tm_mon, tm->tm_year, tm->tm_wday); in fm3130_read_alarm() 249 tm->tm_mon, tm->tm_year, tm->tm_wday); in fm3130_set_alarm() 264 (tm->tm_mon != -1) ? bin2bcd(tm->tm_mon + 1) : 0x80; in fm3130_set_alarm()
|
H A D | lib.c | 131 tm->tm_mon = (int) month; in rtc_time64_to_tm() 151 ((unsigned int)tm->tm_mon) >= 12 || in rtc_valid_tm() 153 tm->tm_mday > rtc_month_days(tm->tm_mon, in rtc_valid_tm() 170 return mktime64(((unsigned int)tm->tm_year + 1900), tm->tm_mon + 1, in rtc_tm_to_time64()
|
H A D | rtc-m48t35.c | 73 tm->tm_mon = readb(&priv->reg->month); in m48t35_read_time() 82 tm->tm_mon = bcd2bin(tm->tm_mon); in m48t35_read_time() 93 tm->tm_mon--; in m48t35_read_time() 105 mon = tm->tm_mon + 1; /* tm_mon starts at zero */ in m48t35_set_time()
|
H A D | rtc-spear.c | 176 tm->tm_mon = bin2bcd(tm->tm_mon + 1); in tm2bcd() 186 tm->tm_mon = bcd2bin(tm->tm_mon) - 1; in bcd2tm() 215 tm->tm_mon = (date >> MONTH_SHIFT) & MONTH_MASK; in spear_rtc_read_time() 240 date = (tm->tm_mday << MDAY_SHIFT) | (tm->tm_mon << MONTH_SHIFT) | in spear_rtc_set_time() 269 alm->time.tm_mon = (date >> MONTH_SHIFT) & MONTH_MASK; in spear_rtc_read_alarm() 298 date = (alm->time.tm_mday << MDAY_SHIFT) | (alm->time.tm_mon << in spear_rtc_set_alarm()
|
H A D | rtc-m41t94.c | 38 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t94_set_time() 46 buf[M41T94_REG_MONTH] = bin2bcd(tm->tm_mon + 1); in m41t94_set_time() 88 tm->tm_mon = bcd2bin(spi_w8r8(spi, M41T94_REG_MONTH)) - 1; in m41t94_read_time() 97 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t94_read_time()
|
H A D | rtc-bq4802.c | 66 tm->tm_mon = p->read(p, 0x09); in bq4802_read_time() 79 tm->tm_mon = bcd2bin(tm->tm_mon); in bq4802_read_time() 87 tm->tm_mon--; in bq4802_read_time() 103 mon = tm->tm_mon + 1; /* tm_mon starts at zero */ in bq4802_set_time()
|
H A D | rtc-mc146818-lib.c | 125 p->time->tm_mon = CMOS_READ(RTC_MONTH); in mc146818_get_time_callback() 171 time->tm_mon = bcd2bin(time->tm_mon); in mc146818_get_time() 194 time->tm_mon--; in mc146818_get_time() 224 mon = time->tm_mon + 1; /* tm_mon starts at zero */ in mc146818_set_time()
|
H A D | rtc-pic32.c | 143 rtc_tm->tm_mon = readb(base + PIC32_RTCMON); in pic32_rtc_gettime() 160 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon) - 1; in pic32_rtc_gettime() 183 writeb(bin2bcd(tm->tm_mon + 1), base + PIC32_RTCMON); in pic32_rtc_settime() 201 alm_tm->tm_mon = readb(base + PIC32_ALRMMON); in pic32_rtc_getalarm() 215 alm_tm->tm_mon = bcd2bin(alm_tm->tm_mon) - 1; in pic32_rtc_getalarm()
|
H A D | rtc-m41t93.c | 56 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t93_set_time() 94 data[M41T93_REG_MON] = bin2bcd(tm->tm_mon + 1); in m41t93_set_time() 147 tm->tm_mon = bcd2bin(buf[M41T93_REG_MON]) - 1; in m41t93_get_time() 157 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t93_get_time()
|
H A D | rtc-ab-b5ze-s3.c | 242 tm->tm_mon = bcd2bin(regs[ABB5ZES3_REG_RTC_MO]) - 1; /* starts at 1 */ in _abb5zes3_rtc_read_time() 259 regs[ABB5ZES3_REG_RTC_MO] = bin2bcd(tm->tm_mon + 1); in abb5zes3_rtc_set_time() 384 alarm_tm->tm_mon = rtc_tm.tm_mon; in _abb5zes3_rtc_read_alarm() 390 if (alarm_tm->tm_mon == 11) { in _abb5zes3_rtc_read_alarm() 391 alarm_tm->tm_mon = 0; in _abb5zes3_rtc_read_alarm() 394 alarm_tm->tm_mon += 1; in _abb5zes3_rtc_read_alarm() 460 if (rtc_tm.tm_mon == 11) { /* handle year wrapping */ in _abb5zes3_rtc_set_alarm() 461 rtc_tm.tm_mon = 0; in _abb5zes3_rtc_set_alarm() 464 rtc_tm.tm_mon += 1; in _abb5zes3_rtc_set_alarm()
|
H A D | rtc-rx4581.c | 155 tm->tm_mon = bcd2bin(date[RX4581_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */ in rx4581_get_datetime() 165 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); in rx4581_get_datetime() 180 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); in rx4581_set_datetime() 191 buf[RX4581_REG_MO+1] = bin2bcd(tm->tm_mon + 1); in rx4581_set_datetime()
|
H A D | rtc-da9052.c | 79 rtc_tm->tm_mon = (v[0][3] & DA9052_RTC_MONTH) - 1; in da9052_read_alarm() 115 rtc_tm->tm_mon += 1; in da9052_set_alarm() 126 v[2] = rtc_tm->tm_mon; in da9052_set_alarm() 177 rtc_tm->tm_mon = (v[0][4] & DA9052_RTC_MONTH) - 1; in da9052_rtc_read_time() 212 v[4] = tm->tm_mon + 1; in da9052_rtc_set_time()
|
H A D | rtc-rk808.c | 70 return (tm->tm_year + 1900) - 2016 + (tm->tm_mon + 1 > 11 ? 1 : 0); in nov2dec_transitions() 88 if (tm->tm_mon + 1 == 11) in gregorian_to_rockchip() 136 tm->tm_mon = (bcd2bin(rtc_data[4] & MONTHS_REG_MSK)) - 1; in rk808_rtc_readtime() 158 rtc_data[4] = bin2bcd(tm->tm_mon + 1); in rk808_rtc_set_time() 207 alrm->time.tm_mon = (bcd2bin(alrm_data[4] & MONTHS_REG_MSK)) - 1; in rk808_rtc_readalarm() 265 alrm_data[4] = bin2bcd(alrm->time.tm_mon + 1); in rk808_rtc_setalarm()
|
/linux/arch/powerpc/platforms/chrp/ |
H A D | time.c | 105 tm.tm_mon = bin2bcd(tm.tm_mon); in chrp_set_rtc_time() 112 chrp_cmos_clock_write(tm.tm_mon,RTC_MONTH); in chrp_set_rtc_time() 157 tm->tm_mon = mon; in chrp_get_rtc_time()
|
/linux/arch/powerpc/platforms/maple/ |
H A D | time.c | 58 tm->tm_mon = maple_clock_read(RTC_MONTH); in maple_get_rtc_time() 68 tm->tm_mon = bcd2bin(tm->tm_mon); in maple_get_rtc_time() 95 mon = tm->tm_mon; in maple_set_rtc_time()
|
/linux/arch/mips/sibyte/swarm/ |
H A D | rtc_m41t81.c | 173 tm.tm_mon ++; in m41t81_set_time() 174 tm.tm_mon = bin2bcd(tm.tm_mon); in m41t81_set_time() 175 m41t81_write(M41T81REG_MO, tm.tm_mon); in m41t81_set_time()
|
H A D | rtc_xicor1241.c | 133 tm.tm_mon ++; in xicor_set_time() 134 tm.tm_mon = bin2bcd(tm.tm_mon); in xicor_set_time() 135 xicor_write(X1241REG_MO, tm.tm_mon); in xicor_set_time()
|
/linux/arch/m68k/atari/ |
H A D | time.c | 170 val.mon_ones = (t->tm_mon+1) % 10; in atari_mste_hwclk() 171 val.mon_tens = (t->tm_mon+1) / 10; in atari_mste_hwclk() 194 t->tm_mon = val.mon_ones + val.mon_tens * 10 - 1; in atari_mste_hwclk() 218 mon = t->tm_mon + 1; in atari_tt_hwclk() 315 t->tm_mon = mon - 1; in atari_tt_hwclk()
|