static void keypad_timer_handler(unsigned long data) { struct s3c_keypad *s3c_keypad = (struct s3c_keypad *)data; u32 keymask_low = 0, keymask_high = 0; keypad_scan(&keymask_low, &keymask_high); process_special_key(s3c_keypad, keymask_low, keymask_high); if (keymask_low != prevmask_low) { process_input_report (s3c_keypad, prevmask_low, keymask_low, 0); prevmask_low = keymask_low; } #if (KEYPAD_COLUMNS>4) if (keymask_high != prevmask_high) { process_input_report (s3c_keypad, prevmask_high, keymask_high, 32); prevmask_high = keymask_high; } #endif if (keymask_low | keymask_high) { mod_timer(&keypad_timer,jiffies + SCAN_INTERVAL); } else { writel(KEYIFCON_INIT, key_base+S3C_KEYIFCON); is_timer_on = FALSE; } }
static void keypad_timer_handler(unsigned long data) { struct s3c_keypad *s3c_keypad = (struct s3c_keypad *)data; u32 keymask_low = 0, keymask_high = 0; keypad_scan(&keymask_low, &keymask_high); process_special_key(s3c_keypad, keymask_low, keymask_high); #ifdef CONFIG_KERNEL_DEBUG_SEC // DPRINTK("%s L(0x%x) H(0x%x)\n", __func__, keymask_low, keymask_high); #if defined (CONFIG_MACH_MAX) if(keymask_low == 0x10202) // vol down key + ok key + camera Key #elif defined (CONFIG_MACH_VITAL) if(keymask_high == 0x1000100) // vol down key (0x1000000) + voice key (0x100) #else /* CONFIG_MACH_VINSQ */ if((keymask_low == 0x1) && (keymask_high == 0x100)) // vol down key + ok key #endif { #if defined (DEVELOPE_RELEASE) if (kernel_sec_viraddr_wdt_reset_reg) { kernel_sec_save_final_context(); // Save the final context. kernel_sec_set_upload_cause(UPLOAD_CAUSE_FORCED_UPLOAD); kernel_sec_hw_reset(FALSE); // Reboot. } #endif } else #endif #if defined (CONFIG_MACH_MAX) // Requested by QA // CAM_FULL : keymask_low = 0x30000 // VOLUME_UP : keymask_low = 0x100 // VOLUME_DOWN : keymask_low = 0x200 if((keymask_low == 0x30300) && power_key_pressed) #elif defined (CONFIG_MACH_VITAL) // CAM_FULL : keymask_low = 0x1010000 // VOLUME_UP : keymask_low = 0x1 if((keymask_low == 0x1010001) && power_key_pressed) #else /* CONFIG_MACH_VINSQ */ // CAM_FULL : keymask_low = 0x1010000 // VOLUME_UP : keymask_high = 0x1000000 if((keymask_low == 0x1010000) && (keymask_high == 0x1000000) && power_key_pressed) #endif { kernel_sec_set_upload_cause(UPLOAD_CAUSE_INIT); kernel_sec_hw_reset(FALSE); // Reboot. } if (keymask_low != prevmask_low) { process_input_report (s3c_keypad, prevmask_low, keymask_low, 0); prevmask_low = keymask_low; } #if (KEYPAD_COLUMNS>4) if (keymask_high != prevmask_high) { process_input_report (s3c_keypad, prevmask_high, keymask_high, 32); prevmask_high = keymask_high; } #endif if (keymask_low | keymask_high) { mod_timer(&keypad_timer,jiffies + SCAN_INTERVAL); } else { writel(KEYIFCON_INIT, key_base+S3C_KEYIFCON); } }