diff --git a/drivers/sensors/taos_tmd3782.c b/drivers/sensors/taos_tmd3782.c index af7a25f7f7d..1021671ec89 100644 --- a/drivers/sensors/taos_tmd3782.c +++ b/drivers/sensors/taos_tmd3782.c @@ -1808,6 +1808,12 @@ static int taos_suspend(struct device *dev) if (taos->power_state == LIGHT_ENABLED) { taos_chip_off(taos); } +#ifdef CONFIG_SEC_RUBENS_PROJECT + if (taos->power_state & PROXIMITY_ENABLED) { + pr_info("%s: disable interrupt to suspend \n", __func__); + disable_irq(taos->irq); + } +#endif return 0; } @@ -1823,7 +1829,12 @@ static int taos_resume(struct device *dev) if (taos->power_state & LIGHT_ENABLED){ taos_light_enable(taos); } - +#ifdef CONFIG_SEC_RUBENS_PROJECT + if (taos->power_state & PROXIMITY_ENABLED) { + pr_info("%s: enable interrupt to resume \n", __func__); + enable_irq(taos->irq); + } +#endif return 0; }