public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present
@ 2025-06-10 15:40 Tomasz Michalec
  2025-06-11 10:21 ` Heikki Krogerus
  0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Michalec @ 2025-06-10 15:40 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman
  Cc: Konrad Adamczyk, linux-usb, linux-kernel,
	chromeos-krk-upstreaming, 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.

Signed-off-by: Tomasz Michalec <tmichalec@google.com>
---
 drivers/usb/typec/mux/intel_pmc_mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c
index 65dda9183e6f..1698428654ab 100644
--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -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;
 
-- 
2.50.0.rc0.604.gd4ff7b7c86-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present
  2025-06-10 15:40 [PATCH] usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present Tomasz Michalec
@ 2025-06-11 10:21 ` Heikki Krogerus
  0 siblings, 0 replies; 2+ messages in thread
From: Heikki Krogerus @ 2025-06-11 10:21 UTC (permalink / raw)
  To: Tomasz Michalec
  Cc: Greg Kroah-Hartman, Konrad Adamczyk, linux-usb, linux-kernel,
	chromeos-krk-upstreaming

On Tue, Jun 10, 2025 at 05:40:58PM +0200, Tomasz Michalec wrote:
> 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.
> 
> Signed-off-by: Tomasz Michalec <tmichalec@google.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/mux/intel_pmc_mux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c
> index 65dda9183e6f..1698428654ab 100644
> --- a/drivers/usb/typec/mux/intel_pmc_mux.c
> +++ b/drivers/usb/typec/mux/intel_pmc_mux.c
> @@ -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;
>  
> -- 
> 2.50.0.rc0.604.gd4ff7b7c86-goog

-- 
heikki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-11 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10 15:40 [PATCH] usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present Tomasz Michalec
2025-06-11 10:21 ` Heikki Krogerus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox