/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-proc.c | 42 if ((unsigned int)alrm.time.tm_hour <= 24) 43 seq_printf(seq, "%02d:", alrm.time.tm_hour); 46 if ((unsigned int)alrm.time.tm_min <= 59) 47 seq_printf(seq, "%02d:", alrm.time.tm_min); 50 if ((unsigned int)alrm.time.tm_sec <= 59) 51 seq_printf(seq, "%02d\n", alrm.time.tm_sec); 56 if ((unsigned int)alrm.time.tm_year <= 200) 57 seq_printf(seq, "%04d-", alrm.time.tm_year + 1900); 60 if ((unsigned int)alrm.time.tm_mon <= 11) 61 seq_printf(seq, "%02d-", alrm.time [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-ds3232.c | 77 "time unreliable\n"); 100 static int ds3232_read_time(struct device *dev, struct rtc_time *time) argument 132 time->tm_sec = bcd2bin(second); 133 time->tm_min = bcd2bin(minute); 137 time->tm_hour = bcd2bin(hour & 0x1F) + 12; 139 time->tm_hour = bcd2bin(hour & 0x1F); 141 time->tm_hour = bcd2bin(hour); 145 time->tm_wday = bcd2bin(week) - 1; 146 time->tm_mday = bcd2bin(day); 148 time 157 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 | 65 /* date reg equal to time reg, for debug only */ 198 * spear_rtc_read_time - set the time 200 * @tm: holds date and time 202 * This function read time and date. On success it will return 0 208 unsigned int time, date; local 213 time = readl(config->ioaddr + TIME_REG); 215 tm->tm_sec = (time >> SECOND_SHIFT) & SECOND_MASK; 216 tm->tm_min = (time >> MINUTE_SHIFT) & MIN_MASK; 217 tm->tm_hour = (time >> HOUR_SHIFT) & HOUR_MASK; 227 * spear_rtc_set_time - set the time 237 unsigned int time, date, err = 0; local 267 unsigned int time, date; local 297 unsigned int time, date, err = 0; local [all...] |
H A D | rtc-mv.c | 116 alm->time.tm_sec = bcd2bin(second); 117 alm->time.tm_min = bcd2bin(minute); 118 alm->time.tm_hour = bcd2bin(hour); 119 alm->time.tm_mday = bcd2bin(day); 120 alm->time.tm_wday = bcd2bin(wday); 121 alm->time.tm_mon = bcd2bin(month) - 1; 123 alm->time.tm_year = bcd2bin(year) + 100; 125 if (rtc_valid_tm(&alm->time) < 0) { 126 dev_err(dev, "retrieved alarm date/time is not valid.\n"); 127 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 | 55 /* Common bit definations for ST v2 for reading/writing time */ 113 unsigned long time; local 116 rtc_tm_to_time(tm, &time); 117 rtc_time_to_tm(time, &calc_tm); 165 unsigned long time; local 170 ret = pl031_stv2_tm_to_time(dev, tm, &time, &bcd_year); 173 writel(time, ldata->base + RTC_LR); 185 readl(ldata->base + RTC_YMR), &alarm->time); 196 unsigned long time; local 201 ret = rtc_valid_tm(&alarm->time); 253 unsigned long time; local 280 unsigned long time; local 315 unsigned long time; local [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-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...] |
H A D | rtc-wm831x.c | 17 #include <linux/time.h> 100 * Read current time and date in RTC 136 u32 time = (time1[0] << 16) | time1[1]; local 138 rtc_time_to_tm(time, tm); 144 dev_err(dev, "Timed out reading current time\n"); 150 * Set current time and date in RTC 152 static int wm831x_rtc_set_mmss(struct device *dev, unsigned long time) argument 162 (time >> 16) & 0xffff); 168 ret = wm831x_reg_write(wm831x, WM831X_RTC_TIME_2, time & 0xffff); 174 /* Wait for the update to complete - should happen first time 221 u32 time; local 269 unsigned long time; local [all...] |
H A D | rtc-vt8500.c | 72 #define VT8500_RTC_CR_24H (1 << 1) /* 24h 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; 160 alrm->time.tm_mday = bcd2bin((alarm & ALARM_DAY_MASK) >> ALARM_DAY_S); 161 alrm->time.tm_hour = bcd2bin((alarm & TIME_HOUR_MASK) >> TIME_HOUR_S); 162 alrm->time [all...] |
H A D | rtc-cmos.c | 220 t->time.tm_mday = -1; 221 t->time.tm_mon = -1; 224 t->time.tm_sec = CMOS_READ(RTC_SECONDS_ALARM); 225 t->time.tm_min = CMOS_READ(RTC_MINUTES_ALARM); 226 t->time.tm_hour = CMOS_READ(RTC_HOURS_ALARM); 230 t->time.tm_mday = CMOS_READ(cmos->day_alrm) & 0x3f; 231 if (!t->time.tm_mday) 232 t->time.tm_mday = -1; 235 t->time.tm_mon = CMOS_READ(cmos->mon_alrm); 236 if (!t->time 1074 struct rtc_time time; local [all...] |
/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 | 85 unsigned int time, 89 unsigned int throughput = (n * (size >> 10)) / time; 92 kind, n, size >> 10, sdomain, ddomain, time, 103 int time; local 135 time = radeon_benchmark_do_move(rdev, size, saddr, daddr, 137 if (time < 0) 139 if (time > 0) 140 radeon_benchmark_log_results(n, size, time, 144 time = radeon_benchmark_do_move(rdev, size, saddr, daddr, 146 if (time < 84 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/oprofile/ |
H A D | oprof.h | 49 int oprofile_set_timeout(unsigned long time);
|
/drivers/staging/rtl8192e/rtl8192e/ |
H A D | rtl_ps.h | 36 void rtl8192_hw_to_sleep(struct net_device *dev, u64 time);
|
/drivers/input/joystick/ |
H A D | joydump.c | 46 unsigned int time; member in struct:joydump 98 dump->time = t; 109 dump->time = t; 135 i, dump->time - prev->time);
|
/drivers/watchdog/ |
H A D | sa1100_wdt.c | 98 int time; local 122 ret = get_user(time, p); 126 if (time <= 0 || (oscr_freq * (long long)time >= 0xffffffff)) { 131 pre_margin = oscr_freq * time;
|