static irqreturn_t s3c_keygpio_ok_isr(int irq, void *dev_id) { unsigned int key_status; static unsigned int prev_key_status = (1 << 5); struct s3c_keypad *pdata = (struct s3c_keypad *)dev_id; struct input_dev *dev = pdata->dev; #ifdef CONFIG_CPU_FREQ set_dvfs_target_level(LEV_800MHZ); #endif // Beware that we may not obtain exact key up/down status at // this point. key_status = (readl(S5PV210_GPH3DAT)) & ((1 << 5)); // If ISR is called and up/down status remains the same, we // must have lost one and should report that first with // upside/down. if (in_sleep) { if (key_status == prev_key_status) { INPUT_REPORT_KEY(dev, 50, key_status ? 1 : 0); } in_sleep = 0; } INPUT_REPORT_KEY(dev, 50, key_status ? 0 : 1); if (key_status) TSP_forced_release_forOKkey(); prev_key_status = key_status; printk(KERN_DEBUG "s3c_keygpio_ok_isr key_status =%d\n", key_status); return IRQ_HANDLED; }
static irqreturn_t s3c_keygpio_ok_isr(int irq, void *dev_id) { unsigned int key_status; static unsigned int prev_key_status = (1 << 5); struct s3c_keypad *pdata = (struct s3c_keypad *)dev_id; struct input_dev *dev = pdata->dev; #ifdef CONFIG_CPU_FREQ set_dvfs_target_level(LEV_800MHZ); #endif // Beware that we may not obtain exact key up/down status at // this point. #if defined(CONFIG_HAWK_VER_B1_REAL_ADDED_FEATURE) //NAGSM_Android_HQ_KERNEL_CLEE_20100908 : Setup Hawk Real Board Rev 0.1 key_status = (readl(S5PV210_GPH3DAT)) & ((1 << 0)); #else key_status = (readl(S5PV210_GPH3DAT)) & ((1 << 5)); #endif // If ISR is called and up/down status remains the same, we // must have lost one and should report that first with // upside/down. if(s3ckeypad_evt_enable_status) //NAGSM_Android_SEL_Kernel_Aakash_20100319 { if(in_sleep) { if (key_status == prev_key_status) { #ifdef CONFIG_S5PC110_FLEMING_BOARD INPUT_REPORT_KEY(dev, 28, key_status ? 1 : 0); #else INPUT_REPORT_KEY(dev, 50, key_status ? 1 : 0); #endif } in_sleep = 0; } #ifdef CONFIG_S5PC110_FLEMING_BOARD INPUT_REPORT_KEY(dev, 28, key_status ? 0 : 1); #else INPUT_REPORT_KEY(dev, 50, key_status ? 0 : 1); #endif } if(key_status) TSP_forced_release_forOKkey(); prev_key_status = key_status; printk(KERN_DEBUG "s3c_keygpio_ok_isr key_status =%d\n", key_status); return IRQ_HANDLED; }
/* Not Referenced */ static irqreturn_t s3c_keygpio_ok_isr(int irq, void *dev_id) { unsigned int key_status; struct s3c_keypad *pdata = (struct s3c_keypad *)dev_id; struct input_dev *dev = pdata->dev; //we cannot check HWREV 0xb and 0xc, we check 2 hw key key_status = (readl(S5PC11X_GPH3DAT)) & ((1 << 5)); if(key_status == ((1 << 5))){ TSP_forced_release_forOKkey(); input_report_key(dev,50,0); } else input_report_key(dev,50,1); printk(KERN_DEBUG "s3c_keygpio_ok_isr key_status =%d,\n", key_status); return IRQ_HANDLED; }
static irqreturn_t s3c_keygpio_ok_isr(int irq, void *dev_id) { unsigned int key_status; static unsigned int prev_key_status = (1 << 5); struct s3c_keypad *pdata = (struct s3c_keypad *)dev_id; struct input_dev *dev = pdata->dev; #ifdef CONFIG_CPU_FREQ set_dvfs_target_level(LEV_800MHZ); #endif // Beware that we may not obtain exact key up/down status at // this point. #if defined(CONFIG_S5PC110_SIDEKICK_BOARD) key_status = (readl(S5PV210_GPH3DAT)) & ((1 << 7)); // If ISR is called and up/down status remains the same, we // must have lost one and should report that first with // upside/down. #if 0 if(key_status == 0){ if(prev_key_status != 0){ last_okkey_jiffies = jiffies; } prev_key_status = key_status; is_ok_key_pressed = 1; //printk("s3c_keygpio_ok_isr key_status =%d, but not send it.\n", key_status); return IRQ_HANDLED; } if((jiffies - last_okkey_jiffies) < (HZ/100)){ prev_key_status = key_status; printk("s3c_keygpio_ok_isr key_status =%d, but ignored.\n", key_status); return IRQ_HANDLED; }else{ input_report_key(dev,50,1); is_ok_key_pressed = 0; printk("s3c_keygpio_ok_isr key_status =%d\n", prev_key_status); } #endif if(s3ckeypad_evt_enable_status) //NAGSM_Android_SEL_Kernel_Aakash_20100319 { if(in_sleep) { if (key_status == prev_key_status) { if(key_status == ((1 << 7))) input_report_key(dev,50,0); else input_report_key(dev,50,1); } in_sleep = 0; } if(key_status == ((1 << 7))) input_report_key(dev,50,0); else input_report_key(dev,50,1); } #else key_status = (readl(S5PV210_GPH3DAT)) & ((1 << 5)); // If ISR is called and up/down status remains the same, we // must have lost one and should report that first with // upside/down. if(s3ckeypad_evt_enable_status) //NAGSM_Android_SEL_Kernel_Aakash_20100319 { if(in_sleep) { if (key_status == prev_key_status) { #ifdef CONFIG_S5PC110_FLEMING_BOARD INPUT_REPORT_KEY(dev, 28, key_status ? 1 : 0); #else INPUT_REPORT_KEY(dev, 50, key_status ? 1 : 0); #endif } in_sleep = 0; } #ifdef CONFIG_S5PC110_FLEMING_BOARD INPUT_REPORT_KEY(dev, 28, key_status ? 0 : 1); #else INPUT_REPORT_KEY(dev, 50, key_status ? 0 : 1); #endif } #endif if(key_status) TSP_forced_release_forOKkey(); prev_key_status = key_status; printk("s3c_keygpio_ok_isr key_status =%d\n", key_status); return IRQ_HANDLED; }