[Bugifx][T106BUG-554][AUTOSUSPEND]usb can trigger DTR` callback
Only Configure: No
Affected branch: master
Affected module: autosuspend
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: NO
Change-Id: Ia3f9e873d598327b2715bb77d82de745117c4b0b
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/soc/sc/power_4line/hal_xp2xp.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/soc/sc/power_4line/hal_xp2xp.c
index 7d19f5c..f2f7cb8 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/soc/sc/power_4line/hal_xp2xp.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/soc/sc/power_4line/hal_xp2xp.c
@@ -179,12 +179,17 @@
/*jb.qi add for dtr on 20240202 start*/
wakeup_irq_occurs = 0;
wait_event_interruptible(wakeup_dtr_wqhead,wakeup_irq_occurs);
- if(!strcmp(attr->name, XP2XP_STATE))
+ if(wakeup_irq_occurs)
{
- sprintf(buf, "%s\n",(g_xp2xp.wake_state == 1 ? "work" : "sleep"));
+ if(!strcmp(attr->name, XP2XP_STATE))
+ {
+ sprintf(buf, "%s\n",(g_xp2xp.wake_state == 1 ? "work" : "sleep"));
+ }
+ return strlen(buf);
}
+
+ return 0;
/*jb.qi add for dtr on 20240202 end*/
- return strlen(buf);
}
ssize_t xp2xp_obj_store(struct kobject *kobject,struct attribute *attr, const char *buf,size_t size)