i.MX drivers update for 5.10:
- Use dev_err_probe() to simplify error handling for i.MX GPCv2 driver. - Add a check in i.MX SCU power domain driver to ignore the power domains that are not owned by the current partition. -----BEGIN PGP SIGNATURE----- iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAl9qjugUHHNoYXduZ3Vv QGtlcm5lbC5vcmcACgkQUFdYWoewfM7xwgf+K/yRr+pk2kbfYal+mAVozVPP2vXH fx4e+voMfHW4g25BrFQM4pV882w58Hh69duB+qoVtPjUZtpTes812gmDJf8N1H7r fk/ZQQdrq3pDDe2XEKP/RperIBvzhbRPIu1per4gsLzoBx5Jm71Q0i0bEt/7mPSM rZuS1qAZWPFBKtVRR3+iKrkM8HWLERacpjuXTIEFyav988BjxY27GPwwpG7WFv1v aaO+nVno7xKo24hCVmY+GUrbTxNkYIKH9415iCf38EQx5gKOvKwvp/Jn061p9Vqb 8+0UNMyA+5YWs8fyOIUhWD0qOkWcGUlJCun7vB/3NDFzvgTnAGyyJCEK7g== =tfwW -----END PGP SIGNATURE----- Merge tag 'imx-drivers-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX drivers update for 5.10: - Use dev_err_probe() to simplify error handling for i.MX GPCv2 driver. - Add a check in i.MX SCU power domain driver to ignore the power domains that are not owned by the current partition. * tag 'imx-drivers-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware: imx: scu-pd: ignore power domain not owned soc: imx: gpcv2: Use dev_err_probe() to simplify error handling Link: https://lore.kernel.org/r/20200923073009.23678-1-shawnguo@kernel.org Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
a39c258cc4
@ -46,6 +46,7 @@
|
||||
|
||||
#include <dt-bindings/firmware/imx/rsrc.h>
|
||||
#include <linux/firmware/imx/sci.h>
|
||||
#include <linux/firmware/imx/svc/rm.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
@ -256,6 +257,9 @@ imx_scu_add_pm_domain(struct device *dev, int idx,
|
||||
struct imx_sc_pm_domain *sc_pd;
|
||||
int ret;
|
||||
|
||||
if (!imx_sc_rm_is_resource_owned(pm_ipc_handle, pd_ranges->rsrc + idx))
|
||||
return NULL;
|
||||
|
||||
sc_pd = devm_kzalloc(dev, sizeof(*sc_pd), GFP_KERNEL);
|
||||
if (!sc_pd)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@ -487,22 +487,17 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
|
||||
|
||||
domain->regulator = devm_regulator_get_optional(domain->dev, "power");
|
||||
if (IS_ERR(domain->regulator)) {
|
||||
if (PTR_ERR(domain->regulator) != -ENODEV) {
|
||||
if (PTR_ERR(domain->regulator) != -EPROBE_DEFER)
|
||||
dev_err(domain->dev, "Failed to get domain's regulator\n");
|
||||
return PTR_ERR(domain->regulator);
|
||||
}
|
||||
if (PTR_ERR(domain->regulator) != -ENODEV)
|
||||
return dev_err_probe(domain->dev, PTR_ERR(domain->regulator),
|
||||
"Failed to get domain's regulator\n");
|
||||
} else if (domain->voltage) {
|
||||
regulator_set_voltage(domain->regulator,
|
||||
domain->voltage, domain->voltage);
|
||||
}
|
||||
|
||||
ret = imx_pgc_get_clocks(domain);
|
||||
if (ret) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(domain->dev, "Failed to get domain's clocks\n");
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(domain->dev, ret, "Failed to get domain's clocks\n");
|
||||
|
||||
ret = pm_genpd_init(&domain->genpd, NULL, true);
|
||||
if (ret) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user