dev_err(&i2s->pdev->dev, "failed to set clock hierachy.\n");
return ret;
}
+ } else {
+ i2s->bus_clk = devm_clk_get(&i2s->pdev->dev, "iis");
+ if (IS_ERR(i2s->bus_clk)) {
+ dev_err(&i2s->pdev->dev, "failed to get i2s0_bus gate\n");
+ return PTR_ERR(i2s->bus_clk);
+ }
+
+ clk_prepare_enable(i2s->bus_clk);
}
if (other) {
clk_put(i2s->op_clk);
}
+ if (!IS_ERR(i2s->bus_clk)) {
+ clk_disable_unprepare(i2s->bus_clk);
+ clk_put(i2s->bus_clk);
+ }
+
iounmap(i2s->addr);
}
i2s->op_clk = ERR_PTR(-EINVAL);
+ i2s->bus_clk = ERR_PTR(-EINVAL);
return 0;
}
if (!IS_ERR(i2s->op_clk))
clk_disable_unprepare(i2s->op_clk);
+ if (!IS_ERR(i2s->bus_clk))
+ clk_disable_unprepare(i2s->bus_clk);
+
return 0;
}
if (!IS_ERR(i2s->op_clk))
clk_prepare_enable(i2s->op_clk);
+ if (!IS_ERR(i2s->bus_clk))
+ clk_prepare_enable(i2s->bus_clk);
+
return 0;
}
#endif /* CONFIG_PM_RUNTIME */
}
}
- pri_dai->bus_clk = devm_clk_get(&pdev->dev, "iis");
- if (!IS_ERR(pri_dai->bus_clk))
- clk_prepare_enable(pri_dai->bus_clk);
-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "Unable to get I2S SFR address\n");
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res)
release_mem_region(res->start, resource_size(res));
-
- if (!IS_ERR(i2s->bus_clk))
- clk_disable_unprepare(i2s->bus_clk);
}
i2s->pri_dai = NULL;