| /linux/drivers/rtc/ |
| H A D | lib.c | 28 * The number of days in the month. 30 int rtc_month_days(unsigned int month, unsigned int year) in rtc_month_days() argument 32 return rtc_days_in_month[month] + (is_leap_year(year) && month == 1); in rtc_month_days() 39 int rtc_year_days(unsigned int day, unsigned int month, unsigned int year) in rtc_year_days() argument 41 return rtc_ydays[is_leap_year(year)][month] + day - 1; in rtc_year_days() 58 day_of_year, month, day; in rtc_time64_to_tm() local 83 * (fictitious) calendar where the year starts in March, month = 2 in rtc_time64_to_tm() 84 * (*), and finishes in February, month = 13. This calendar is in rtc_time64_to_tm() 124 month = u32tmp >> 16; in rtc_time64_to_tm() 135 month = is_Jan_or_Feb ? month - 12 : month; in rtc_time64_to_tm() [all …]
|
| H A D | test_rtc_lib.c | 9 static void advance_date(int *year, int *month, int *mday, int *yday, int *wday) in advance_date() argument 13 if (*mday != rtc_month_days(*month - 1, *year)) { in advance_date() 20 if (*month != 12) { in advance_date() 21 ++*month; in advance_date() 26 *month = 1; in advance_date() 45 int month = 1; in rtc_time64_to_tm_test_date_range() local 59 year, month, mday, yday, wday, secs + sec_offset in rtc_time64_to_tm_test_date_range() 62 KUNIT_ASSERT_EQ_MSG(test, month - 1, result.tm_mon, FAIL_MSG); in rtc_time64_to_tm_test_date_range() 70 advance_date(&year, &month, &mday, &yday, &wday); in rtc_time64_to_tm_test_date_range()
|
| H A D | rtc-wilco-ec.c | 42 * @month: Month value (1..12) 54 u8 month; member 66 * @month: Month value (1..12) 81 u8 month; member 111 tm->tm_mon = rtc.month - 1; in wilco_ec_rtc_read() 141 rtc.month = bin2bcd(tm->tm_mon + 1); in wilco_ec_rtc_write()
|
| H A D | rtc-efi.c | 29 /* efi_time_t.month is in the [1-12] so, we need -1 */ in compute_yday() 30 return rtc_year_days(eft->day, eft->month - 1, eft->year); in compute_yday() 56 eft->month = wtime->tm_mon + 1; in convert_to_efi_time() 87 if (!eft->month || eft->month > 12) in convert_from_efi_time() 89 wtime->tm_mon = eft->month - 1; in convert_from_efi_time() 162 eft.year, eft.month, eft.day, in efi_procfs()
|
| H A D | rtc-m48t35.c | 29 u8 month; member 39 u8 month; member 73 tm->tm_mon = readb(&priv->reg->month); in m48t35_read_time() 135 writeb(mon, &priv->reg->month); in m48t35_set_time()
|
| H A D | rtc-ds1216.c | 22 u8 month; member 97 tm->tm_mon = bcd2bin(regs.month & 0x1f); in ds1216_rtc_read_time() 125 regs.month = bin2bcd(tm->tm_mon); in ds1216_rtc_set_time()
|
| H A D | rtc-ds1685.c | 135 * ds1685_rtc_check_mday - check validity of the day of month. 137 * @mday: day of month. 139 * Returns -EDOM if the day of month is not within 1..31 range. 265 u8 seconds, minutes, hours, wday, mday, month, years; in ds1685_rtc_read_time() local 274 month = rtc->read(rtc, RTC_MONTH); in ds1685_rtc_read_time() 294 tm->tm_mon = (ds1685_rtc_bcd2bin(rtc, month, RTC_MONTH_BCD_MASK, in ds1685_rtc_read_time() 312 u8 ctrlb, seconds, minutes, hours, wday, mday, month, years, century; in ds1685_rtc_set_time() local 325 month = ds1685_rtc_bin2bcd(rtc, (tm->tm_mon + 1), RTC_MONTH_BIN_MASK, in ds1685_rtc_set_time() 334 * - Months: !> 12, Month Day != 0. in ds1685_rtc_set_time() 335 * - Month Day !> Max days in current month. in ds1685_rtc_set_time() [all …]
|
| H A D | rtc-ds1742.c | 83 unsigned int year, month, day, hour, minute, second, week; in ds1742_rtc_read_time() local 96 month = readb(ioaddr + RTC_MONTH); in ds1742_rtc_read_time() 105 tm->tm_mon = bcd2bin(month) - 1; in ds1742_rtc_read_time()
|
| H A D | rtc-rx4581.c | 38 #define RX4581_REG_DM 0x04 /* Day of Month in BCD */ 39 #define RX4581_REG_MO 0x05 /* Month in BCD */ 92 * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch. 190 /* month, 1 - 12 */ in rx4581_set_datetime()
|
| H A D | rtc-ds1286.c | 95 unsigned char month, cmd, amode; in ds1286_proc() local 98 month = ds1286_rtc_read(priv, RTC_MONTH); in ds1286_proc() 102 (month & RTC_EOSC) ? "disabled" : "enabled", in ds1286_proc() 103 (month & RTC_ESQW) ? "disabled" : "enabled"); in ds1286_proc()
|
| H A D | rtc-bd70528.c | 38 u8 month; member 71 r->month &= ~BD70528_MASK_RTC_MONTH; in tm2rtc() 85 r->month |= bin2bcd(t->tm_mon + 1); in tm2rtc() 104 t->tm_mon = bcd2bin(r->month & BD70528_MASK_RTC_MONTH) - 1; in rtc2tm()
|
| H A D | rtc-rx8581.c | 24 #define RX8581_REG_DM 0x04 /* Day of Month in BCD */ 25 #define RX8581_REG_MO 0x05 /* Month in BCD */ 62 * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch. 150 /* month, 1 - 12 */ in rx8581_rtc_set_time()
|
| H A D | rtc-ds3232.c | 102 unsigned int year, month, day, hour, minute, second; in ds3232_read_time() local 115 month = buf[5]; in ds3232_read_time() 122 century = month & 0x80; in ds3232_read_time() 141 /* linux tm_mon range:0~11, while month range is 1~12 in RTC chip */ in ds3232_read_time() 142 time->tm_mon = bcd2bin(month & 0x7F) - 1; in ds3232_read_time() 164 /* linux tm_mon range:0~11, while month range is 1~12 in RTC chip */ in ds3232_set_time()
|
| H A D | interface.c | 218 enum { none, day, month, year } missing = none; in __rtc_read_alarm() enumerator 226 * day/month/year calendar data. in __rtc_read_alarm() 310 missing = month; in __rtc_read_alarm() 334 * could also be in the next month or year. This is a common in __rtc_read_alarm() 343 /* Month rollover ... if it's the 31th, an alarm on the 3rd will in __rtc_read_alarm() 344 * be next month. An alarm matching on the 30th, 29th, or 28th in __rtc_read_alarm() 345 * may end up in the month after that! Many newer PCs support in __rtc_read_alarm() 348 case month: in __rtc_read_alarm() 349 dev_dbg(&rtc->dev, "alarm rollover: %s\n", "month"); in __rtc_read_alarm()
|
| H A D | rtc-da9063.c | 24 #define MONTHS_TO_DA9063(month) ((month) + 1) argument 26 #define MONTHS_FROM_DA9063(month) ((month) - 1) argument
|
| H A D | rtc-bq32k.c | 48 uint8_t month; member 120 tm->tm_mon = bcd2bin(regs.month) - 1; in bq32k_rtc_read_time() 136 regs.month = bin2bcd(tm->tm_mon + 1); in bq32k_rtc_set_time()
|
| /linux/kernel/time/ |
| H A D | timeconv.c | 49 u32 u32tmp, day_of_century, year_of_century, day_of_year, month, day; in time64_to_tm() local 80 * (fictitious) calendar where the year starts in March, month = 2 in time64_to_tm() 81 * (*), and finishes in February, month = 13. This calendar is in time64_to_tm() 120 month = u32tmp >> 16; in time64_to_tm() 131 month = is_Jan_or_Feb ? month - 12 : month; in time64_to_tm() 137 result->tm_mon = (int) month; in time64_to_tm()
|
| /linux/fs/isofs/ |
| H A D | util.c | 21 int year, month, day, hour, minute, second, tz; in iso_date() local 29 month = ((p[4] - '0') * 10 + (p[5] - '0')); in iso_date() 38 month = p[1]; in iso_date() 51 ts.tv_sec = mktime64(year+1900, month, day, hour, minute, second); in iso_date()
|
| /linux/net/netfilter/ |
| H A D | xt_time.c | 23 u_int8_t month; /* (1-12) */ member 125 * On to finding the month (like above). In each month, a certain in localtime_3() 131 * Concludes i == 2, i.e. 3rd month => March. in localtime_3() 149 r->month = i + 1; in localtime_3()
|
| /linux/arch/m68k/sun3/ |
| H A D | intersil.c | 45 todintersil->month = t->tm_mon + 1; in sun3_hwclk() 55 t->tm_mon = todintersil->month - 1; in sun3_hwclk()
|
| /linux/arch/m68k/sun3x/ |
| H A D | time.c | 55 h->month = bin2bcd(t->tm_mon + 1); in sun3x_hwclk() 65 t->tm_mon = bcd2bin(h->month) - 1; in sun3x_hwclk()
|
| /linux/drivers/acpi/ |
| H A D | acpi_tad.c | 68 u8 month; /* 1 - 12 */ member 83 rt->month < 1 || rt->month > 12 || in acpi_tad_rt_is_invalid() 269 rt.month = val; in time_store() 324 rt.year, rt.month, rt.day, rt.hour, rt.minute, rt.second, in time_show() 631 tm->tm_mon = rt->month - 1; in acpi_tad_rt_to_tm() 644 rt.month = tm->tm_mon + 1; in acpi_tad_rtc_set_time()
|
| /linux/arch/mips/sibyte/swarm/ |
| H A D | rtc_m41t81.c | 66 #define M41T81REG_DT 0x05 /* date of month */ 67 #define M41T81REG_MO 0x06 /* month */ 71 #define M41T81REG_AMO 0x0A /* alarm: month */
|
| /linux/drivers/net/can/usb/peak_usb/ |
| H A D | pcan_usb_pro.h | 39 u8 month; member 53 u8 month; member
|
| /linux/drivers/mmc/core/ |
| H A D | quirks.h | 271 if (f->month != CID_MONTH_ANY && f->month != card->cid.month) in mmc_fixup_device()
|