Skip to contentSkip to conversation

usb: typec: tps6598x: Fix broken polling mode after system suspend/resume

PATCH In review Roger Quadros 2 participants 2 messages May 30, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: typec: tps6598x: Fix broken polling mode after system suspend/resume

During system resume we need to resume the polling workqueue if client->irq is not set else polling will no longer work.

Fixes 0d6a119cecd7 ("usb: typec: tps6598x: Add support for polling interrupts status")
---
 drivers/usb/typec/tipd/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tipd/core.c +1 -1
index 438cc40660a1..603dbd44deba 100644
@@ -920,7 +920,7 @@ static int __maybe_unused tps6598x_resume(struct device *dev)
 		enable_irq(client->irq);
 	}
 
-	if (client->irq)
+	if (!client->irq)
 		queue_delayed_work(system_power_efficient_wq, &tps->wq_poll,
 				   msecs_to_jiffies(POLL_INTERVAL));
 
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Roger Quadros

During system resume we need to resume the polling workqueue if client->irq is not set else polling will no longer work.

Fixes 0d6a119cecd7 ("usb: typec: tps6598x: Add support for polling interrupts status")
Quoted 19 lines
---
 drivers/usb/typec/tipd/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/tipd/core.c +1 -1
index 438cc40660a1..603dbd44deba 100644
@@ -920,7 +920,7 @@ static int __maybe_unused tps6598x_resume(struct device *dev)
 		enable_irq(client->irq);
 	}
 
-	if (client->irq)
+	if (!client->irq)
 		queue_delayed_work(system_power_efficient_wq, &tps->wq_poll,
 				   msecs_to_jiffies(POLL_INTERVAL));
 
Signature · 1 line
2.34.1
Signature · 1 line
heikki