Lines Matching refs:reg_val
82 unsigned short reg_val; in imx_keypad_scan_matrix() local
93 reg_val = readw(keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
94 reg_val |= 0xff00; in imx_keypad_scan_matrix()
95 writew(reg_val, keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
97 reg_val = readw(keypad->mmio_base + KPCR); in imx_keypad_scan_matrix()
98 reg_val &= ~((keypad->cols_en_mask & 0xff) << 8); in imx_keypad_scan_matrix()
99 writew(reg_val, keypad->mmio_base + KPCR); in imx_keypad_scan_matrix()
103 reg_val = readw(keypad->mmio_base + KPCR); in imx_keypad_scan_matrix()
104 reg_val |= (keypad->cols_en_mask & 0xff) << 8; in imx_keypad_scan_matrix()
105 writew(reg_val, keypad->mmio_base + KPCR); in imx_keypad_scan_matrix()
112 reg_val = readw(keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
113 reg_val &= ~(1 << (8 + col)); in imx_keypad_scan_matrix()
114 writew(reg_val, keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
126 reg_val = readw(keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
127 matrix_volatile_state[col] = (~reg_val) & keypad->rows_en_mask; in imx_keypad_scan_matrix()
134 reg_val = readw(keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
135 reg_val &= 0x00ff; in imx_keypad_scan_matrix()
136 writew(reg_val, keypad->mmio_base + KPDR); in imx_keypad_scan_matrix()
187 unsigned short reg_val; in imx_keypad_check_for_events() local
258 reg_val = readw(keypad->mmio_base + KPSR); in imx_keypad_check_for_events()
259 reg_val |= KBD_STAT_KPKD | KBD_STAT_KDSC; in imx_keypad_check_for_events()
260 writew(reg_val, keypad->mmio_base + KPSR); in imx_keypad_check_for_events()
262 reg_val = readw(keypad->mmio_base + KPSR); in imx_keypad_check_for_events()
263 reg_val |= KBD_STAT_KDIE; in imx_keypad_check_for_events()
264 reg_val &= ~KBD_STAT_KRIE; in imx_keypad_check_for_events()
265 writew(reg_val, keypad->mmio_base + KPSR); in imx_keypad_check_for_events()
276 reg_val = readw(keypad->mmio_base + KPSR); in imx_keypad_check_for_events()
277 reg_val |= KBD_STAT_KPKR | KBD_STAT_KRSS; in imx_keypad_check_for_events()
278 writew(reg_val, keypad->mmio_base + KPSR); in imx_keypad_check_for_events()
280 reg_val = readw(keypad->mmio_base + KPSR); in imx_keypad_check_for_events()
281 reg_val |= KBD_STAT_KRIE; in imx_keypad_check_for_events()
282 reg_val &= ~KBD_STAT_KDIE; in imx_keypad_check_for_events()
283 writew(reg_val, keypad->mmio_base + KPSR); in imx_keypad_check_for_events()
290 unsigned short reg_val; in imx_keypad_irq_handler() local
292 reg_val = readw(keypad->mmio_base + KPSR); in imx_keypad_irq_handler()
295 reg_val &= ~(KBD_STAT_KRIE | KBD_STAT_KDIE); in imx_keypad_irq_handler()
297 reg_val |= KBD_STAT_KPKR | KBD_STAT_KPKD; in imx_keypad_irq_handler()
298 writew(reg_val, keypad->mmio_base + KPSR); in imx_keypad_irq_handler()
314 unsigned short reg_val; in imx_keypad_config() local
320 reg_val = readw(keypad->mmio_base + KPCR); in imx_keypad_config()
321 reg_val |= keypad->rows_en_mask & 0xff; /* rows */ in imx_keypad_config()
322 reg_val |= (keypad->cols_en_mask & 0xff) << 8; /* cols */ in imx_keypad_config()
323 writew(reg_val, keypad->mmio_base + KPCR); in imx_keypad_config()
326 reg_val = readw(keypad->mmio_base + KPDR); in imx_keypad_config()
327 reg_val &= 0x00ff; in imx_keypad_config()
328 writew(reg_val, keypad->mmio_base + KPDR); in imx_keypad_config()
337 reg_val = readw(keypad->mmio_base + KPSR); in imx_keypad_config()
338 reg_val |= KBD_STAT_KPKR | KBD_STAT_KPKD | in imx_keypad_config()
340 writew(reg_val, keypad->mmio_base + KPSR); in imx_keypad_config()
343 reg_val |= KBD_STAT_KDIE; in imx_keypad_config()
344 reg_val &= ~KBD_STAT_KRIE; in imx_keypad_config()
345 writew(reg_val, keypad->mmio_base + KPSR); in imx_keypad_config()
350 unsigned short reg_val; in imx_keypad_inhibit() local
353 reg_val = readw(keypad->mmio_base + KPSR); in imx_keypad_inhibit()
354 reg_val &= ~(KBD_STAT_KRIE | KBD_STAT_KDIE); in imx_keypad_inhibit()
355 reg_val |= KBD_STAT_KPKR | KBD_STAT_KPKD; in imx_keypad_inhibit()
356 writew(reg_val, keypad->mmio_base + KPSR); in imx_keypad_inhibit()
359 reg_val = (keypad->cols_en_mask & 0xff) << 8; in imx_keypad_inhibit()
360 writew(reg_val, keypad->mmio_base + KPCR); in imx_keypad_inhibit()
530 unsigned short reg_val = readw(kbd->mmio_base + KPSR); in imx_kbd_noirq_suspend() local
541 if (reg_val & KBD_STAT_KPKD) in imx_kbd_noirq_suspend()
542 reg_val |= KBD_STAT_KRIE; in imx_kbd_noirq_suspend()
543 if (reg_val & KBD_STAT_KPKR) in imx_kbd_noirq_suspend()
544 reg_val |= KBD_STAT_KDIE; in imx_kbd_noirq_suspend()
545 writew(reg_val, kbd->mmio_base + KPSR); in imx_kbd_noirq_suspend()