Commit c6685fe8 authored by Peng Fan's avatar Peng Fan
Browse files

MLK-17988-2 power-domain: imx8: check permission before power off

If resource is not owned, no need to power off and report error.
Signed-off-by: default avatarPeng Fan <>
parent 96729b08
......@@ -105,6 +105,10 @@ static int imx8_power_domain_off_node(struct power_domain *power_domain)
if (pdata->resource_id != SC_R_LAST) {
if (!sc_rm_is_resource_owned(ipcHndl, pdata->resource_id)) {
printf("%s not owned by curr partition\n", dev->name);
return 0;
ret = sc_pm_set_resource_power_mode(ipcHndl, pdata->resource_id, SC_PM_PW_MODE_OFF);
if (ret) {
printf("Error: %s Power off failed! (error = %d)\n", dev->name, ret);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment