mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-07 13:53:24 +00:00
soc: imx: imx8m-blk-ctrl: Defer probe if 'bus' genpd is not yet ready
Depending of the boot sequence 'bus' genpd could be probed after imx8m-blk-ctrl which led driver probe to fail. Change the returned error to allow to defer the probe in this case. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
This commit is contained in:
parent
9abf2313ad
commit
1a1da28544
@ -210,9 +210,14 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
|
||||
if (IS_ERR(bc->bus_power_dev))
|
||||
return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
|
||||
"failed to attach power domain \"bus\"\n");
|
||||
if (IS_ERR(bc->bus_power_dev)) {
|
||||
if (PTR_ERR(bc->bus_power_dev) == -ENODEV)
|
||||
return dev_err_probe(dev, -EPROBE_DEFER,
|
||||
"failed to attach power domain \"bus\"\n");
|
||||
else
|
||||
return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
|
||||
"failed to attach power domain \"bus\"\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < bc_data->num_domains; i++) {
|
||||
const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i];
|
||||
|
Loading…
Reference in New Issue
Block a user