static int felica_rfs_init(void) { int rc; #ifdef FEATURE_DEBUG_LOW FELICA_DEBUG_MSG("[FELICA_RFS] felica_rfs_init - start \n"); #endif /* register the device file */ rc = misc_register(&felica_rfs_device); if (rc < 0) { FELICA_DEBUG_MSG("[FELICA_RFS] FAIL!! can not register felica_rfs \n"); return rc; } #ifdef FELICA_LED_SUPPORT FELICA_DEBUG_MSG("[FELICA_RFS] FELICA LED NEW SUPPORT !!\n"); rc= request_irq(gpio_to_irq(GPIO_FELICA_RFS), felica_rfs_detect_interrupt, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING|IRQF_NO_SUSPEND , FELICA_RFS_NAME, NULL); if (rc) { FELICA_DEBUG_MSG("[FELICA_RFS] FAIL!! can not request_irq \n"); return rc; } irq_set_irq_wake(gpio_to_irq(GPIO_FELICA_RFS),1); init_felica_rfs_wake_lock(); #else FELICA_DEBUG_MSG("[FELICA_RFS] FELICA LED NOT SUPPORT !! \n"); #endif #ifdef FEATURE_DEBUG_LOW FELICA_DEBUG_MSG("[FELICA_RFS] felica_rfs_init - end \n"); #endif return 0; }
static int felica_rfs_init(void) { int rc; #ifdef FEATURE_DEBUG_LOW FELICA_DEBUG_MSG("[FELICA_RFS] felica_rfs_init - start \n"); #endif /* register the device file */ rc = misc_register(&felica_rfs_device); if (rc < 0) { #ifdef FEATURE_DEBUG_HIGH FELICA_DEBUG_MSG("[FELICA_RFS] FAIL!! can not register felica_rfs \n"); #endif return rc; } #ifdef FELICA_LED_SUPPORT #ifdef FEATURE_DEBUG_LOW FELICA_DEBUG_MSG("[FELICA_RFS] FELICA LED NEW SUPPORT !!\n"); #endif rc= request_irq(gpio_to_irq(felica_get_rfs_gpio_num()), felica_rfs_detect_interrupt, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING|IRQF_NO_SUSPEND , FELICA_RFS_NAME, NULL); if (rc) { #ifdef FEATURE_DEBUG_HIGH FELICA_DEBUG_MSG("[FELICA_RFS] FAIL!! can not request_irq rc =%d\n",rc); #endif return rc; } irq_set_irq_wake(gpio_to_irq(felica_get_rfs_gpio_num()),1); init_felica_rfs_wake_lock(); #else #ifdef FEATURE_DEBUG_LOW FELICA_DEBUG_MSG("[FELICA_RFS] FELICA LED NOT SUPPORT !! \n"); #endif #endif #ifdef FEATURE_DEBUG_LOW FELICA_DEBUG_MSG("[FELICA_RFS] felica_rfs_init - end \n"); #endif #if defined(FELICA_LED_SUPPORT) && defined(CONFIG_LGE_FELICA_DCM) schedule_delayed_work(&felica_rfs_open_after_boot, 3000); #endif return 0; }