Merge "power: smb-lib: Disable USB IRQs during high duty cycle"
This commit is contained in:
commit
f468a5a27d
1 changed files with 10 additions and 0 deletions
|
@ -4057,6 +4057,14 @@ irqreturn_t smblib_handle_high_duty_cycle(int irq, void *data)
|
|||
struct smb_charger *chg = irq_data->parent_data;
|
||||
|
||||
chg->is_hdc = true;
|
||||
/*
|
||||
* Disable usb IRQs after the flag set and re-enable IRQs after
|
||||
* the flag cleared in the delayed work queue, to avoid any IRQ
|
||||
* storming during the delays
|
||||
*/
|
||||
if (chg->irq_info[HIGH_DUTY_CYCLE_IRQ].irq)
|
||||
disable_irq_nosync(chg->irq_info[HIGH_DUTY_CYCLE_IRQ].irq);
|
||||
|
||||
schedule_delayed_work(&chg->clear_hdc_work, msecs_to_jiffies(60));
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
@ -4234,6 +4242,8 @@ static void clear_hdc_work(struct work_struct *work)
|
|||
clear_hdc_work.work);
|
||||
|
||||
chg->is_hdc = 0;
|
||||
if (chg->irq_info[HIGH_DUTY_CYCLE_IRQ].irq)
|
||||
enable_irq(chg->irq_info[HIGH_DUTY_CYCLE_IRQ].irq);
|
||||
}
|
||||
|
||||
static void rdstd_cc2_detach_work(struct work_struct *work)
|
||||
|
|
Loading…
Add table
Reference in a new issue