/linux-6.1.9/tools/testing/selftests/rtc/ |
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-6.1.9/drivers/rtc/ |
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()
|
D | rtc-s3c.c | 144 tm->tm_mon = readb(info->base + S3C2410_RTCMON); in s3c_rtc_read_time() 164 tm->tm_mon = bcd2bin(tm->tm_mon); in s3c_rtc_read_time() 183 writeb(bin2bcd(tm->tm_mon), info->base + S3C2410_RTCMON); in s3c_rtc_write_time() 202 tm->tm_mon -= 1; in s3c_rtc_gettime() 220 rtc_tm.tm_mon += 1; in s3c_rtc_settime() 239 alm_tm->tm_mon = readb(info->base + S3C2410_ALMMON); in s3c_rtc_getalarm() 265 alm_tm->tm_mon = bcd2bin(alm_tm->tm_mon); in s3c_rtc_getalarm() 266 alm_tm->tm_mon -= 1; in s3c_rtc_getalarm() 306 if (tm->tm_mon < 12 && tm->tm_mon >= 0) { in s3c_rtc_setalarm() 308 writeb(bin2bcd(tm->tm_mon + 1), info->base + S3C2410_ALMMON); in s3c_rtc_setalarm()
|
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()
|
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()
|
D | rtc-moxart.c | 151 (((tm->tm_mon + 1) / 10) << 4) | in moxart_rtc_set_time() 152 ((tm->tm_mon + 1) % 10)); in moxart_rtc_set_time() 176 __func__, tm->tm_year, tm->tm_mon, tm->tm_mday, in moxart_rtc_set_time() 211 tm->tm_mon = (((v & 0x10) >> 4) * 10) + (v & 0x0F); in moxart_rtc_read_time() 212 tm->tm_mon--; in moxart_rtc_read_time() 222 tm->tm_yday = day_of_year[tm->tm_mon]; in moxart_rtc_read_time() 224 if (tm->tm_mon >= 2) { in moxart_rtc_read_time()
|
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()
|
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()
|
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()
|
D | rtc-mc146818-lib.c | 116 p->time->tm_mon = CMOS_READ(RTC_MONTH); in mc146818_get_time_callback() 150 time->tm_mon = bcd2bin(time->tm_mon); in mc146818_get_time() 173 time->tm_mon--; in mc146818_get_time() 203 mon = time->tm_mon + 1; /* tm_mon starts at zero */ in mc146818_set_time()
|
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()
|
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()
|
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()
|
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()
|
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()
|
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()
|
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()
|
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()
|
D | rtc-ds1511.c | 190 mon = rtc_tm->tm_mon + 1; /* tm_mon starts at zero */ in ds1511_rtc_set_time() 200 if (day > rtc_month_days(rtc_tm->tm_mon, rtc_tm->tm_year)) in ds1511_rtc_set_time() 246 rtc_tm->tm_mon = rtc_read(RTC_MON) & 0x1f; in ds1511_rtc_read_time() 258 rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon); in ds1511_rtc_read_time() 269 rtc_tm->tm_mon--; in ds1511_rtc_read_time()
|
D | rtc-rtd119x.c | 116 tm->tm_mon = 0; in rtd119x_rtc_read_time() 117 while (day >= rtc_month_days(tm->tm_mon, year)) { in rtd119x_rtc_read_time() 118 day -= rtc_month_days(tm->tm_mon, year); in rtd119x_rtc_read_time() 119 tm->tm_mon++; in rtd119x_rtc_read_time()
|
/linux-6.1.9/arch/powerpc/platforms/chrp/ |
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-6.1.9/arch/powerpc/platforms/maple/ |
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-6.1.9/arch/mips/sibyte/swarm/ |
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()
|
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-6.1.9/arch/m68k/atari/ |
D | time.c | 168 val.mon_ones = (t->tm_mon+1) % 10; in atari_mste_hwclk() 169 val.mon_tens = (t->tm_mon+1) / 10; in atari_mste_hwclk() 192 t->tm_mon = val.mon_ones + val.mon_tens * 10 - 1; in atari_mste_hwclk() 216 mon = t->tm_mon + 1; in atari_tt_hwclk() 313 t->tm_mon = mon - 1; in atari_tt_hwclk()
|