Lines Matching +full:msm +full:- +full:timer
2 * HP i8042 SDC + MSM-58321 BBRTC driver.
31 * for Part Number 1820-4784 Revision B. Dwg No. A-1820-4784-2
51 MODULE_DESCRIPTION("HP i8042 SDC + MSM-58321 RTC Driver");
90 if (hp_sdc_enqueue_transaction(&t)) return -1; in hp_sdc_rtc_do_read_bbrtc()
94 return -1; in hp_sdc_rtc_do_read_bbrtc()
100 return -1; in hp_sdc_rtc_do_read_bbrtc()
103 rtctm->tm_year = (tseq[83] & 0x0f) + (tseq[90] & 0x0f) * 10; in hp_sdc_rtc_do_read_bbrtc()
104 rtctm->tm_mon = (tseq[69] & 0x0f) + (tseq[76] & 0x0f) * 10; in hp_sdc_rtc_do_read_bbrtc()
105 rtctm->tm_mday = (tseq[55] & 0x0f) + (tseq[62] & 0x0f) * 10; in hp_sdc_rtc_do_read_bbrtc()
106 rtctm->tm_wday = (tseq[48] & 0x0f); in hp_sdc_rtc_do_read_bbrtc()
107 rtctm->tm_hour = (tseq[34] & 0x0f) + (tseq[41] & 0x0f) * 10; in hp_sdc_rtc_do_read_bbrtc()
108 rtctm->tm_min = (tseq[20] & 0x0f) + (tseq[27] & 0x0f) * 10; in hp_sdc_rtc_do_read_bbrtc()
109 rtctm->tm_sec = (tseq[6] & 0x0f) + (tseq[13] & 0x0f) * 10; in hp_sdc_rtc_do_read_bbrtc()
119 /* MSM-58321 has no read latch, so must read twice and compare. */ in hp_sdc_rtc_read_bbrtc()
121 if (hp_sdc_rtc_do_read_bbrtc(&tm_last)) return -1; in hp_sdc_rtc_read_bbrtc()
122 if (hp_sdc_rtc_do_read_bbrtc(&tm)) return -1; in hp_sdc_rtc_read_bbrtc()
125 if (i++ > 4) return -1; in hp_sdc_rtc_read_bbrtc()
127 if (hp_sdc_rtc_do_read_bbrtc(&tm)) return -1; in hp_sdc_rtc_read_bbrtc()
156 tseq[t.endidx - 4] |= HP_SDC_ACT_SEMAPHORE; /* numreg assumed > 1 */ in hp_sdc_rtc_read_i8042timer()
163 return -1; in hp_sdc_rtc_read_i8042timer()
167 return -1; in hp_sdc_rtc_read_i8042timer()
172 return -1; in hp_sdc_rtc_read_i8042timer()
182 /* Read the i8042 real-time clock */
189 if (raw < 0) return -1; in hp_sdc_rtc_read_rt()
194 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_rt()
195 res->tv_sec = (tenms / 100) + (time64_t)days * 86400; in hp_sdc_rtc_read_rt()
201 /* Read the i8042 fast handshake timer */
207 if (raw < 0) return -1; in hp_sdc_rtc_read_fhs()
211 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_fhs()
212 res->tv_sec = (time64_t)(tenms / 100); in hp_sdc_rtc_read_fhs()
218 /* Read the i8042 match timer (a.k.a. alarm) */
224 if (raw < 0) return -1; in hp_sdc_rtc_read_mt()
228 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_mt()
229 res->tv_sec = (time64_t)(tenms / 100); in hp_sdc_rtc_read_mt()
235 /* Read the i8042 delay timer */
241 if (raw < 0) return -1; in hp_sdc_rtc_read_dt()
245 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_dt()
246 res->tv_sec = (time64_t)(tenms / 100); in hp_sdc_rtc_read_dt()
252 /* Read the i8042 cycle timer (a.k.a. periodic) */
258 if (raw < 0) return -1; in hp_sdc_rtc_read_ct()
262 res->tv_nsec = (long)(tenms % 100) * 10000 * 1000; in hp_sdc_rtc_read_ct()
263 res->tv_sec = (time64_t)(tenms / 100); in hp_sdc_rtc_read_ct()
353 return -ENODEV; in hp_sdc_rtc_init()
363 printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support loaded " in hp_sdc_rtc_init()
373 printk(KERN_INFO "HP i8042 SDC + MSM-58321 RTC support unloaded\n"); in hp_sdc_rtc_exit()