Skip to contentSkip to conversation

usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present

PATCH In review Tomasz Michalec 2 participants 2 messages Jun 10, 2025 – Jun 11, 2025

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

PATCH 1/1 usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present

If pmc_usb_probe is called before SCU IPC is registered, pmc_usb_probe will fail.

Return -EPROBE_DEFER when pmc_usb_probe doesn't get SCU IPC device, so the probe function can be called again after SCU IPC is initialized.

---
 drivers/usb/typec/mux/intel_pmc_mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/mux/intel_pmc_mux.c +1 -1
index 65dda9183e6f..1698428654ab 100644
@@ -754,7 +754,7 @@ static int pmc_usb_probe(struct platform_device *pdev)
 
 	pmc->ipc = devm_intel_scu_ipc_dev_get(&pdev->dev);
 	if (!pmc->ipc)
-		return -ENODEV;
+		return -EPROBE_DEFER;
 
 	pmc->dev = &pdev->dev;
 
Signature · 1 line
2.50.0.rc0.604.gd4ff7b7c86-goog
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Tomasz Michalec

If pmc_usb_probe is called before SCU IPC is registered, pmc_usb_probe will fail.

Return -EPROBE_DEFER when pmc_usb_probe doesn't get SCU IPC device, so the probe function can be called again after SCU IPC is initialized.

Quoted 19 lines
---
 drivers/usb/typec/mux/intel_pmc_mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/mux/intel_pmc_mux.c +1 -1
index 65dda9183e6f..1698428654ab 100644
@@ -754,7 +754,7 @@ static int pmc_usb_probe(struct platform_device *pdev)
 
 	pmc->ipc = devm_intel_scu_ipc_dev_get(&pdev->dev);
 	if (!pmc->ipc)
-		return -ENODEV;
+		return -EPROBE_DEFER;
 
 	pmc->dev = &pdev->dev;
 
Signature · 1 line
2.50.0.rc0.604.gd4ff7b7c86-goog
Signature · 1 line
heikki