/drivers/rtc/ |
H A D | rtc-dm355evm.c | 39 union evm_time time; local 52 if (tries && time.bytes[0] == status) 54 time.bytes[0] = status; 59 if (tries && time.bytes[1] == status) 61 time.bytes[1] = status; 66 if (tries && time.bytes[2] == status) 68 time.bytes[2] = status; 73 if (tries && time.bytes[3] == status) 75 time.bytes[3] = status; 79 dev_dbg(dev, "read timestamp %08x\n", time 87 union evm_time time; local [all...] |
H A D | rtc-lib.c | 2 * rtc and date/time utility functions 51 void rtc_time_to_tm(unsigned long time, struct rtc_time *tm) argument 56 days = time / 86400; 57 time -= (unsigned int) days * 86400; 84 tm->tm_hour = time / 3600; 85 time -= tm->tm_hour * 3600; 86 tm->tm_min = time / 60; 87 tm->tm_sec = time - tm->tm_min * 60; 94 * Does the rtc_time represent a valid date/time? 114 int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time) argument 127 time_t time; local [all...] |
H A D | rtc-pcf50633.c | 56 u_int8_t time[PCF50633_TI_EXTENT]; member in struct:pcf50633_time 69 rtc->tm_sec = bcd2bin(pcf->time[PCF50633_TI_SEC]); 70 rtc->tm_min = bcd2bin(pcf->time[PCF50633_TI_MIN]); 71 rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); 72 rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); 73 rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); 74 rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]) - 1; 75 rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; 80 pcf->time[PCF50633_TI_SEC] = bin2bcd(rtc->tm_sec); 81 pcf->time[PCF50633_TI_MI [all...] |
H A D | rtc-wm8350.c | 18 #include <linux/time.h> 36 * Read current time and date in RTC 45 * Read the time twice and compare. 46 * If time1 == time2, then time is valid else retry. 90 dev_err(dev, "timed out reading RTC time\n"); 95 * Set current time and date in RTC 100 u16 time[4]; local 104 time[0] = tm->tm_sec; 105 time[0] |= tm->tm_min << WM8350_RTC_MINS_SHIFT; 106 time[ 150 u16 time[4]; local 254 u16 time[3]; local [all...] |
H A D | rtc-proc.c | 62 if ((unsigned int)alrm.time.tm_hour <= 24) 63 seq_printf(seq, "%02d:", alrm.time.tm_hour); 66 if ((unsigned int)alrm.time.tm_min <= 59) 67 seq_printf(seq, "%02d:", alrm.time.tm_min); 70 if ((unsigned int)alrm.time.tm_sec <= 59) 71 seq_printf(seq, "%02d\n", alrm.time.tm_sec); 76 if ((unsigned int)alrm.time.tm_year <= 200) 77 seq_printf(seq, "%04d-", alrm.time.tm_year + 1900); 80 if ((unsigned int)alrm.time.tm_mon <= 11) 81 seq_printf(seq, "%02d-", alrm.time [all...] |
H A D | rtc-ds3232.c | 78 "time unreliable\n"); 101 static int ds3232_read_time(struct device *dev, struct rtc_time *time) argument 133 time->tm_sec = bcd2bin(second); 134 time->tm_min = bcd2bin(minute); 138 time->tm_hour = bcd2bin(hour & 0x1F) + 12; 140 time->tm_hour = bcd2bin(hour & 0x1F); 142 time->tm_hour = bcd2bin(hour); 146 time->tm_wday = bcd2bin(week) - 1; 147 time->tm_mday = bcd2bin(day); 149 time 158 ds3232_set_time(struct device *dev, struct rtc_time *time) argument [all...] |
H A D | rtc-ds1305.c | 30 /* RTC date/time ... the main special cases are that we: 171 * Get/set of date and time is pretty normal. 174 static int ds1305_get_time(struct device *dev, struct rtc_time *time) argument 181 /* Use write-then-read to get all the date/time registers 194 time->tm_sec = bcd2bin(buf[DS1305_SEC]); 195 time->tm_min = bcd2bin(buf[DS1305_MIN]); 196 time->tm_hour = bcd2hour(buf[DS1305_HOUR]); 197 time->tm_wday = buf[DS1305_WDAY] - 1; 198 time->tm_mday = bcd2bin(buf[DS1305_MDAY]); 199 time 212 ds1305_set_time(struct device *dev, struct rtc_time *time) argument [all...] |
H A D | rtc-spear.c | 66 /* date reg equal to time reg, for debug only */ 199 * spear_rtc_read_time - set the time 201 * @tm: holds date and time 203 * This function read time and date. On success it will return 0 209 unsigned int time, date; local 214 time = readl(config->ioaddr + TIME_REG); 216 tm->tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; 217 tm->tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; 218 tm->tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; 228 * spear_rtc_set_time - set the time 238 unsigned int time, date; local 265 unsigned int time, date; local 295 unsigned int time, date; local [all...] |
H A D | rtc-mv.c | 118 alm->time.tm_sec = bcd2bin(second); 119 alm->time.tm_min = bcd2bin(minute); 120 alm->time.tm_hour = bcd2bin(hour); 121 alm->time.tm_mday = bcd2bin(day); 122 alm->time.tm_wday = bcd2bin(wday); 123 alm->time.tm_mon = bcd2bin(month) - 1; 125 alm->time.tm_year = bcd2bin(year) + 100; 127 if (rtc_valid_tm(&alm->time) < 0) { 128 dev_err(dev, "retrieved alarm date/time is not valid.\n"); 129 rtc_time_to_tm(0, &alm->time); [all...] |
H A D | rtc-vr41xx.c | 139 static int vr41xx_rtc_read_time(struct device *dev, struct rtc_time *time) argument 146 rtc_time_to_tm(epoch_sec + elapsed_sec, time); 151 static int vr41xx_rtc_set_time(struct device *dev, struct rtc_time *time) argument 156 current_sec = mktime(time->tm_year + 1900, time->tm_mon + 1, time->tm_mday, 157 time->tm_hour, time->tm_min, time->tm_sec); 167 struct rtc_time *time local 186 struct rtc_time *time = &wkalrm->time; local [all...] |
H A D | rtc-pl031.c | 56 /* Common bit definations for ST v2 for reading/writing time */ 129 unsigned long time; local 132 rtc_tm_to_time(tm, &time); 133 rtc_time_to_tm(time, &calc_tm); 181 unsigned long time; local 186 ret = pl031_stv2_tm_to_time(dev, tm, &time, &bcd_year); 189 writel(time, ldata->base + RTC_LR); 201 readl(ldata->base + RTC_YMR), &alarm->time); 212 unsigned long time; local 217 ret = rtc_valid_tm(&alarm->time); 261 unsigned long time; local 288 unsigned long time; local 323 unsigned long time, data; local [all...] |
H A D | rtc-vt8500.c | 73 #define VT8500_RTC_CR_12H (1 << 1) /* 12h time format */ 112 u32 date, time; local 115 time = readl(vt8500_rtc->regbase + VT8500_RTC_TR); 117 tm->tm_sec = bcd2bin(time & TIME_SEC_MASK); 118 tm->tm_min = bcd2bin((time & TIME_MIN_MASK) >> TIME_MIN_S); 119 tm->tm_hour = bcd2bin((time & TIME_HOUR_MASK) >> TIME_HOUR_S); 124 tm->tm_wday = (time & TIME_DOW_MASK) >> TIME_DOW_S; 161 alrm->time.tm_mday = bcd2bin((alarm & ALARM_DAY_MASK) >> ALARM_DAY_S); 162 alrm->time.tm_hour = bcd2bin((alarm & TIME_HOUR_MASK) >> TIME_HOUR_S); 163 alrm->time [all...] |
H A D | rtc-mrst.c | 79 * driver chose to use 1972 (1970 is UNIX time start point) as the base, 80 * and does the translation at read/write time. 86 * year will be parsed as 1960 which is not a valid UNIX time and will 89 static int mrst_read_time(struct device *dev, struct rtc_time *time) argument 97 time->tm_sec = vrtc_cmos_read(RTC_SECONDS); 98 time->tm_min = vrtc_cmos_read(RTC_MINUTES); 99 time->tm_hour = vrtc_cmos_read(RTC_HOURS); 100 time->tm_mday = vrtc_cmos_read(RTC_DAY_OF_MONTH); 101 time->tm_mon = vrtc_cmos_read(RTC_MONTH); 102 time 111 mrst_set_time(struct device *dev, struct rtc_time *time) argument [all...] |
H A D | rtc-rk808.c | 30 /* RK808 has a shadowed register for saving a "frozen" RTC time. 31 * When user setting "GET_TIME" to 1, the time will save in this shadowed 32 * register. If set "READSEL" to 1, user read rtc time register, actually 33 * get the time of that moment. If we need the real time, clr this bit. 59 /* Read current time and date in RTC */ 98 dev_dbg(dev, "RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n", 105 /* Set current time and date in RTC */ 120 dev_dbg(dev, "set RTC date/time %4d-%02d-%02d(%d) %02d:%02d:%02d\n", 149 /* Read alarm time an [all...] |
H A D | rtc-pl030.c | 42 rtc_time_to_tm(readl(rtc->base + RTC_MR), &alrm->time); 49 unsigned long time; local 55 ret = rtc_valid_tm(&alrm->time); 57 ret = rtc_tm_to_time(&alrm->time, &time); 59 writel(time, rtc->base + RTC_MR); 73 * Set the RTC time. Unfortunately, we can't accurately set 77 * edge of the 1Hz clock, we must write the time one second 83 unsigned long time; local 86 ret = rtc_tm_to_time(tm, &time); [all...] |
/drivers/cpufreq/ |
H A D | ppc_cbe_cpufreq_pervasive.c | 28 #include <linux/time.h> 60 long time; local 69 time = jiffies; 94 time = jiffies - time; 95 time = jiffies_to_msecs(time); 97 "pervasive unit\n", time);
|
H A D | ppc_cbe_cpufreq_pmi.c | 35 #include <asm/time.h> 54 long time; local 61 time = jiffies; 66 time = jiffies - time; 67 time = jiffies_to_msecs(time); 69 "PMI\n", time);
|
/drivers/base/power/ |
H A D | trace.c | 28 * can just use the few bytes of actual time data, which means that 32 * (since the time between the hang and the boot might be more 84 static struct rtc_time time = { local 96 time.tm_year = (n % 100); 98 time.tm_mon = (n % 12); 100 time.tm_mday = (n % 28) + 1; 102 time.tm_hour = (n % 24); 104 time.tm_min = (n % 20) * 3; 106 set_rtc_time(&time); 112 struct rtc_time time; local [all...] |
/drivers/net/fddi/skfp/ |
H A D | hwt.c | 52 * u_long time) ; 56 * time - The time in units of 16us to load the timer with. 63 void hwt_start(struct s_smc *smc, u_long time) argument 67 if (time > HWT_MAX) 68 time = HWT_MAX ; 70 smc->hw.t_start = time ; 73 cnt = (u_short)time ; 75 * if time < 16 us 76 * time 202 u_long time ; local 207 outpd(ADDR(B2_TI_INI),time) ; local [all...] |
H A D | smttimer.c | 62 void smt_timer_start(struct s_smc *smc, struct smt_timer *timer, u_long time, argument 69 time /= 16 ; /* input is uS, clock ticks are 16uS */ 70 if (!time) 71 time = 1 ; 79 timer->tm_delta = time ; 80 hwt_start(smc,time) ; 93 if (delta + tm->tm_delta > time) { 101 timer->tm_delta = time - delta ;
|
/drivers/gpu/drm/radeon/ |
H A D | radeon_benchmark.c | 75 unsigned int time, 79 unsigned int throughput = (n * (size >> 10)) / time; 82 kind, n, size >> 10, sdomain, ddomain, time, 93 int time; local 122 time = radeon_benchmark_do_move(rdev, size, saddr, daddr, 124 if (time < 0) 126 if (time > 0) 127 radeon_benchmark_log_results(n, size, time, 132 time = radeon_benchmark_do_move(rdev, size, saddr, daddr, 134 if (time < 74 radeon_benchmark_log_results(int n, unsigned size, unsigned int time, unsigned sdomain, unsigned ddomain, char *kind) argument [all...] |
/drivers/input/ |
H A D | input-compat.c | 27 event->time.tv_sec = compat_event.time.tv_sec; 28 event->time.tv_usec = compat_event.time.tv_usec; 47 compat_event.time.tv_sec = event->time.tv_sec; 48 compat_event.time.tv_usec = event->time.tv_usec;
|
/drivers/staging/gs_fpgaboot/ |
H A D | gs_fpgaboot.h | 53 char time[MAX_STR]; member in struct:fpgaimage
|
/drivers/staging/lustre/lustre/include/linux/ |
H A D | obd.h | 63 unsigned long time; member in struct:__anon6535 79 lock->time = jiffies; 84 time_before(lock->time + 5 * HZ, jiffies)) { 95 (jiffies - lock->time) / HZ); 113 lock->time = jiffies;
|
/drivers/usb/host/ |
H A D | xhci-rcar.c | 83 int retval, index, j, time; local 108 for (time = 0; time < timeout; time++) { 114 if (time == timeout) { 124 for (time = 0; time < timeout; time++) { 132 if (time == timeout)
|