charger: smb345: report wireless online = 0 when OTG is plugged
OTG has higher priority than wireless charging, we need to: 1. bypass wireless irq work when OTG is plugged 2. report wireless online = 0 when using wireless charging then plugging OTG or it will show charging icon even battery status is "Not Charging" Bug: 11073722 Change-Id: I5a807817a5733d043316d2ad04dde50b0b506895 Signed-off-by: Hank_Lee <Hank_Lee@asus.com>
This commit is contained in:
@@ -617,6 +617,11 @@ static void wireless_isr_work_function(struct work_struct *dat)
|
||||
|
||||
SMB_NOTICE("wireless state = %d\n", wireless_is_plugged());
|
||||
|
||||
if (otg_on) {
|
||||
SMB_NOTICE("bypass wireless isr due to otg_on\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (wireless_is_plugged())
|
||||
wireless_set();
|
||||
else
|
||||
@@ -625,6 +630,10 @@ static void wireless_isr_work_function(struct work_struct *dat)
|
||||
|
||||
static void wireless_det_work_function(struct work_struct *dat)
|
||||
{
|
||||
if (otg_on) {
|
||||
SMB_NOTICE("bypass wireless isr due to otg_on\n");
|
||||
return;
|
||||
}
|
||||
if (wireless_is_plugged())
|
||||
wireless_set();
|
||||
}
|
||||
@@ -769,6 +778,9 @@ void smb345_otg_status(bool on)
|
||||
"otg..\n", __func__);
|
||||
return;
|
||||
}
|
||||
if (wireless_is_plugged())
|
||||
wireless_reset();
|
||||
return;
|
||||
} else
|
||||
otg_on = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user