void gpio_hall_irq_set(int state, bool auth_changed) { if (auth_changed) drv_data->cover_state = state; if (drv_data->gsm_area) { pr_info("%s: cover state = %d\n", __func__, drv_data->cover_state); mutex_lock(&drv_data->irq_lock); if (state) enable_hall_irq(); else disable_hall_irq(); mutex_unlock(&drv_data->irq_lock); } }
void hall_irq_set(int state, bool auth_changed) { if (auth_changed) g_drvdata->cover_state = state; pr_info("%s: gsm: %d, cover: %d, irq: %d, state: %d, auth: %d\n", __func__, g_drvdata->gsm_area, g_drvdata->cover_state, g_drvdata->irq_state, state, auth_changed); if (g_drvdata->gsm_area) { mutex_lock(&g_drvdata->irq_lock); if (state) enable_hall_irq(); else disable_hall_irq(); mutex_unlock(&g_drvdata->irq_lock); } }