sx9310: When system suspend,disable hardware irq scan.

the current driver only disable system irq,
and not disable hardware irq,maybe cause irq imbalances.

Change-Id: I95bbad30e4940fb9665f8c02de8e7a75a9f54191
Signed-off-by: Wen Xie <xiewen3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1233341
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Wen Xie 2018-08-27 16:31:08 +08:00
commit e5ac8247cd

View file

@ -1703,15 +1703,27 @@ static void sx93XX_worker_func(struct work_struct *work)
void sx93XX_suspend(psx93XX_t this)
{
if (this) {
LOG_INFO("sx9310 suspend: disable irq!\n");
write_register(this,0x41,0x00);
if (sx9310_debug_enable)
LOG_INFO("sx9310 suspend: disable irq!\n");
disable_irq(this->irq);
}
}
void sx93XX_resume(psx93XX_t this)
{
if (this) {
LOG_INFO("sx9310 resume: enable irq!\n");
if (sx9310_debug_enable)
LOG_INFO("sx9310 resume: enable irq!\n");
#ifdef USE_THREADED_IRQ
mutex_lock(&this->mutex);
/* Just in case need to reset any uncaught interrupts */
sx93XX_process_interrupt(this, 0);
mutex_unlock(&this->mutex);
#else
sx93XX_schedule_work(this, 0);
#endif
enable_irq(this->irq);
write_register(this,0x41,0x01);
}
}