imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
Subsystems (4)
RFC PATCH 1/1 imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
If the ssi or codec drivers are not loaded (for instance, because spi or i2c bus drivers are not loaded), returning -EINVAL will for people to unload and then reload the module to get sound working. Returning E_PROBE_DEFER will mitigate this.
sound/soc/fsl/imx-sgtl5000.c +2 -2
@@ -113,13 +113,13 @@ static int imx_sgtl5000_probe(struct pla ssi_pdev =of_find_device_by_node (ssi_np);if (!ssi_pdev) {dev_err (&pdev->dev,"failed to find SSI platform device\n" ); - ret = -EINVAL ; + ret = -EPROBE_DEFER ; goto fail; } codec_dev =of_find_i2c_device_by_node (codec_np);if (!codec_dev) {dev_err (&pdev->dev,"failed to find codec platform device\n" ); -return -EINVAL ; +return -EPROBE_DEFER ; } data =devm_kzalloc (&pdev->dev,sizeof (*data),GFP_KERNEL );
Fabio Estevam
reviewerQuoted 6 lines · Arnaud Patard
If the ssi or codec drivers are not loaded (for instance, because spi or i2c bus drivers are not loaded), returning
-EINVALwill for people to unload and then reload the module to get sound working. ReturningE_PROBE_DEFERwill mitigate this.Signed-off-by Arnaud Patard <[email protected]>
Which board you are using that fails to probe sgtl5000?
I have fixed this problem for some boards recently.
Quoted 11 lines · Fabio Estevam
Quoted 6 lines · Arnaud Patard
If the ssi or codec drivers are not loaded (for instance, because spi or i2c bus drivers are not loaded), returning
-EINVALwill for people to unload and then reload the module to get sound working. ReturningE_PROBE_DEFERwill mitigate this.Signed-off-by Arnaud Patard <[email protected]>Which board you are using that fails to probe sgtl5000?
It was on imx53-qsb, nearly everything in module and boot with DT.
Quoted 1 line
I have fixed this problem for some boards recently.
I'm curious to know how to fix that with modules on a per board basis. Please, explain.
Thanks,
Arnaud
Fabio Estevam
reviewerQuoted 2 lines · Arnaud Patard
I'm curious to know how to fix that with modules on a per board basis. Please, explain.
Ok, looks like a different problem than the one I handled before.
Quoted 4 lines · Arnaud Patard
If the ssi or codec drivers are not loaded (for instance, because spi or i2c bus drivers are not loaded), returning
-EINVALwill for people to unload and then reload the module to get sound working. ReturningE_PROBE_DEFERwill mitigate this.
Applied, thanks.