/linux/drivers/rtc/ |
A D | rtc-rtd119x.c | 85 s32 day; in rtd119x_rtc_read_time() local 109 while (day >= rtd119x_rtc_days_in_year(year)) { in rtd119x_rtc_read_time() 110 day -= rtd119x_rtc_days_in_year(year); in rtd119x_rtc_read_time() 114 tm->tm_yday = day; in rtd119x_rtc_read_time() 118 day -= rtc_month_days(tm->tm_mon, year); in rtd119x_rtc_read_time() 121 tm->tm_mday = day + 1; in rtd119x_rtc_read_time() 129 unsigned int day; in rtd119x_rtc_set_time() local 135 day = 0; in rtd119x_rtc_set_time() 137 day += rtd119x_rtc_days_in_year(i); in rtd119x_rtc_set_time() 139 day += tm->tm_yday; in rtd119x_rtc_set_time() [all …]
|
A D | lib.c | 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() 59 day_of_year, month, day; in rtc_time64_to_tm() local 113 day = ((u16) u32tmp) / 2141; in rtc_time64_to_tm() 124 day = day + 1; in rtc_time64_to_tm() 132 tm->tm_mday = (int) day; in rtc_time64_to_tm()
|
A D | rtc-cpcap.c | 36 int day; member 57 time = tod + ((cpcap->day & DAY_MASK) * SECS_PER_DAY); in cpcap2rtc_time() 68 cpcap->day = time / SECS_PER_DAY; in rtc2cpcap_time() 101 ret |= regmap_read(rtc->regmap, CPCAP_REG_DAY, &cpcap_tm.day); in cpcap_rtc_read_time() 106 ret |= regmap_read(rtc->regmap, CPCAP_REG_DAY, &cpcap_tm.day); in cpcap_rtc_read_time() 142 DAY_MASK, cpcap_tm.day); in cpcap_rtc_set_time() 154 DAY_MASK, cpcap_tm.day); in cpcap_rtc_set_time() 179 ret = regmap_read(rtc->regmap, CPCAP_REG_DAYA, &cpcap_tm.day); in cpcap_rtc_read_alarm() 206 cpcap_tm.day); in cpcap_rtc_set_alarm()
|
A D | rtc-m48t35.c | 31 u8 day; member 37 u8 day; member 100 unsigned char mon, day, hrs, min, sec; in m48t35_set_time() local 106 day = tm->tm_mday; in m48t35_set_time() 127 day = bin2bcd(day); in m48t35_set_time() 136 writeb(day, &priv->reg->date); in m48t35_set_time()
|
A D | rtc-efi.c | 30 return rtc_year_days(eft->day, eft->month - 1, eft->year); in compute_yday() 57 eft->day = wtime->tm_mday; in convert_to_efi_time() 83 if (!eft->day || eft->day > 31) in convert_from_efi_time() 85 wtime->tm_mday = eft->day; in convert_from_efi_time() 207 eft.year, eft.month, eft.day, in efi_procfs() 223 alm.year, alm.month, alm.day, in efi_procfs()
|
A D | rtc-mxc.c | 93 u32 day = 0, hr = 0, min = 0, sec = 0, hr_min = 0; in get_alarm_or_time() local 97 day = readw(ioaddr + RTC_DAYR); in get_alarm_or_time() 102 day = readw(ioaddr + RTC_DAYALARM); in get_alarm_or_time() 111 return ((((time64_t)day * 24 + hr) * 60) + min) * 60 + sec; in get_alarm_or_time() 119 u32 tod, day, hr, min, sec, temp; in set_alarm_or_time() local 123 day = div_s64_rem(time, 86400, &tod); in set_alarm_or_time() 137 writew(day, ioaddr + RTC_DAYR); in set_alarm_or_time() 142 writew(day, ioaddr + RTC_DAYALARM); in set_alarm_or_time()
|
A D | rtc-mc146818-lib.c | 127 unsigned char mon, day, hrs, min, sec; in mc146818_set_time() local 137 day = time->tm_mday; in mc146818_set_time() 184 day = bin2bcd(day); in mc146818_set_time() 201 CMOS_WRITE(day, RTC_DAY_OF_MONTH); in mc146818_set_time()
|
A D | rtc-bq4802.c | 95 u8 sec, min, hrs, day, mon, yrs, century, val; in bq4802_set_time() local 104 day = tm->tm_mday; in bq4802_set_time() 112 day = bin2bcd(day); in bq4802_set_time() 125 p->write(p, 0x06, day); in bq4802_set_time()
|
A D | rtc-wilco-ec.c | 53 u8 day; member 82 u8 day; member 110 tm->tm_mday = rtc.day; in wilco_ec_rtc_read() 142 rtc.day = bin2bcd(tm->tm_mday); in wilco_ec_rtc_write()
|
A D | rtc-ds1511.c | 176 u8 mon, day, dow, hrs, min, sec, yrs, cen; in ds1511_rtc_set_time() local 191 day = rtc_tm->tm_mday; in ds1511_rtc_set_time() 197 if ((mon > 12) || (day == 0)) in ds1511_rtc_set_time() 200 if (day > rtc_month_days(rtc_tm->tm_mon, rtc_tm->tm_year)) in ds1511_rtc_set_time() 212 day = bin2bcd(day) & 0x3f; in ds1511_rtc_set_time() 222 rtc_write(day, RTC_DOM); in ds1511_rtc_set_time()
|
A D | rtc-mv.c | 71 unsigned int year, month, day, hour, minute, second, wday; in mv_rtc_read_time() local 81 day = rtc_date & 0x3f; in mv_rtc_read_time() 88 tm->tm_mday = bcd2bin(day); in mv_rtc_read_time() 102 unsigned int year, month, day, hour, minute, second, wday; in mv_rtc_read_alarm() local 112 day = rtc_date & 0x3f; in mv_rtc_read_alarm() 119 alm->time.tm_mday = bcd2bin(day); in mv_rtc_read_alarm()
|
/linux/kernel/time/ |
A D | timeconv.c | 49 u32 u32tmp, day_of_century, year_of_century, day_of_year, month, day; in time64_to_tm() local 121 day = ((u16) u32tmp) / 2141; in time64_to_tm() 132 day = day + 1; in time64_to_tm() 138 result->tm_mday = (int) day; in time64_to_tm()
|
/linux/arch/mips/include/asm/ |
A D | mc146818-time.h | 91 unsigned int year, mon, day, hour, min, sec; in mc146818_get_cmos_time() local 100 day = CMOS_READ(RTC_DAY_OF_MONTH); in mc146818_get_cmos_time() 109 day = bcd2bin(day); in mc146818_get_cmos_time() 116 return mktime64(year, mon, day, hour, min, sec); in mc146818_get_cmos_time()
|
/linux/arch/sh/boards/mach-sh03/ |
A D | rtc.c | 43 unsigned int year, mon, day, hour, min, sec; in sh03_rtc_gettimeofday() local 51 day = (__raw_readb(RTC_DAY1) & 0xf) + (__raw_readb(RTC_DAY10) & 0xf) * 10; in sh03_rtc_gettimeofday() 57 if (year == 0 || mon < 1 || mon > 12 || day > 31 || day < 1 || in sh03_rtc_gettimeofday() 62 year, mon, day, hour, min, sec); in sh03_rtc_gettimeofday() 82 tm->tm_mday = day; in sh03_rtc_gettimeofday()
|
/linux/arch/m68k/atari/ |
A D | time.c | 201 int sec=0, min=0, hour=0, day=0, mon=0, year=0, wday=0; in atari_tt_hwclk() local 215 day = t->tm_mday; in atari_tt_hwclk() 234 day = bin2bcd(day); in atari_tt_hwclk() 267 day = RTC_READ( RTC_DAY_OF_MONTH ); in atari_tt_hwclk() 276 RTC_WRITE( RTC_DAY_OF_MONTH, day ); in atari_tt_hwclk() 296 day = bcd2bin(day); in atari_tt_hwclk() 312 t->tm_mday = day; in atari_tt_hwclk()
|
/linux/arch/mips/dec/ |
A D | time.c | 24 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock64() local 33 day = CMOS_READ(RTC_DAY_OF_MONTH); in read_persistent_clock64() 50 day = bcd2bin(day); in read_persistent_clock64() 57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec); in read_persistent_clock64()
|
/linux/arch/m68k/mvme16x/ |
A D | rtc.c | 69 unsigned char mon, day, hrs, min, sec, leap_yr; in rtc_ioctl() local 82 day = rtc_tm.tm_mday; in rtc_ioctl() 89 if ((mon > 12) || (day == 0)) in rtc_ioctl() 92 if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr))) in rtc_ioctl() 107 rtc->bcd_dom = bin2bcd(day); in rtc_ioctl()
|
/linux/arch/powerpc/platforms/chrp/ |
A D | time.c | 134 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local 140 day = chrp_cmos_clock_read(RTC_DAY_OF_MONTH); in chrp_get_rtc_time() 149 day = bcd2bin(day); in chrp_get_rtc_time() 158 tm->tm_mday = day; in chrp_get_rtc_time()
|
/linux/arch/x86/kernel/ |
A D | rtc.c | 65 unsigned int status, year, mon, day, hour, min, sec, century = 0; in mach_get_cmos_time() local 91 day = CMOS_READ(RTC_DAY_OF_MONTH); in mach_get_cmos_time() 110 day = bcd2bin(day); in mach_get_cmos_time() 121 now->tv_sec = mktime64(year, mon, day, hour, min, sec); in mach_get_cmos_time()
|
/linux/arch/m68k/bvme6000/ |
A D | rtc.c | 74 unsigned char mon, day, hrs, min, sec, leap_yr; in rtc_ioctl() local 87 day = rtc_tm.tm_mday; in rtc_ioctl() 94 if ((mon > 12) || (mon < 1) || (day == 0)) in rtc_ioctl() 97 if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr))) in rtc_ioctl() 116 rtc->bcd_dom = bin2bcd(day); in rtc_ioctl()
|
/linux/fs/isofs/ |
A D | util.c | 21 int year, month, day, hour, minute, second, tz; in iso_date() local 26 day = p[2]; in iso_date() 36 crtime = mktime64(year+1900, month, day, hour, minute, second); in iso_date()
|
/linux/arch/mips/sibyte/swarm/ |
A D | rtc_m41t81.c | 188 unsigned int year, mon, day, hour, min, sec; in m41t81_get_time() local 202 day = m41t81_read(M41T81REG_DT); in m41t81_get_time() 210 day = bcd2bin(day); in m41t81_get_time() 216 return mktime64(year, mon, day, hour, min, sec); in m41t81_get_time()
|
A D | rtc_xicor1241.c | 169 unsigned int year, mon, day, hour, min, sec, y2k; in xicor_get_time() local 184 day = xicor_read(X1241REG_DT); in xicor_get_time() 193 day = bcd2bin(day); in xicor_get_time() 200 return mktime64(year, mon, day, hour, min, sec); in xicor_get_time()
|
/linux/drivers/md/bcache/ |
A D | stats.c | 102 ret = ret ?: kobject_add(&acc->day.kobj, parent, in bch_cache_accounting_add_kobjs() 122 kobject_put(&acc->day.kobj); in bch_cache_accounting_destroy() 158 acc->day.name += t; \ in scale_accounting() 170 scale_stats(&acc->day, DAY_RESCALE); in scale_accounting() 227 kobject_init(&acc->day.kobj, &bch_stats_ktype); in bch_cache_accounting_init()
|
/linux/include/uapi/linux/ |
A D | cec-funcs.h | 435 __u8 day, in cec_msg_clear_analogue_timer() argument 448 msg->msg[2] = day; in cec_msg_clear_analogue_timer() 464 __u8 *day, in cec_ops_clear_analogue_timer() argument 490 __u8 day, in cec_msg_clear_digital_timer() argument 514 __u8 *day, in cec_ops_clear_digital_timer() argument 536 __u8 day, in cec_msg_clear_ext_timer() argument 565 __u8 *day, in cec_ops_clear_ext_timer() argument 646 __u8 day, in cec_msg_set_digital_timer() argument 670 __u8 *day, in cec_ops_set_digital_timer() argument 692 __u8 day, in cec_msg_set_ext_timer() argument [all …]
|