Lines Matching defs:setto
278 static int hp_sdc_rtc_set_rt (struct timeval *setto)
292 if (0xffff < setto->tv_sec / 86400) return -1;
293 days = setto->tv_sec / 86400;
294 if (0xffff < setto->tv_usec / 1000000 / 86400) return -1;
295 days += ((setto->tv_sec % 86400) + setto->tv_usec / 1000000) / 86400;
298 if (0xffffff < setto->tv_sec) return -1;
299 tenms = setto->tv_sec * 100;
300 if (0xffffff < setto->tv_usec / 10000) return -1;
301 tenms += setto->tv_usec / 10000;
318 static int hp_sdc_rtc_set_fhs (struct timeval *setto)
329 if (0xffff < setto->tv_sec) return -1;
330 tenms = setto->tv_sec * 100;
331 if (0xffff < setto->tv_usec / 10000) return -1;
332 tenms += setto->tv_usec / 10000;
346 #define hp_sdc_rtc_set_mt (setto) \
347 hp_sdc_rtc_set_i8042timer(setto, HP_SDC_CMD_SET_MT)
350 #define hp_sdc_rtc_set_dt (setto) \
351 hp_sdc_rtc_set_i8042timer(setto, HP_SDC_CMD_SET_DT)
354 #define hp_sdc_rtc_set_ct (setto) \
355 hp_sdc_rtc_set_i8042timer(setto, HP_SDC_CMD_SET_CT)
358 static int hp_sdc_rtc_set_i8042timer (struct timeval *setto, uint8_t setcmd)
369 if (0xffffff < setto->tv_sec) return -1;
370 tenms = setto->tv_sec * 100;
371 if (0xffffff < setto->tv_usec / 10000) return -1;
372 tenms += setto->tv_usec / 10000;