struct regmap *regmap;
unsigned long offset;
+ struct platform_device *clk;
};
static const struct regmap_config apcs_regmap_config = {
return ret;
}
+ if (of_device_is_compatible(np, "qcom,msm8916-apcs-kpss-global")) {
+ apcs->clk = platform_device_register_data(&pdev->dev,
+ "qcom-apcs-msm8916-clk",
+ -1, NULL, 0);
+ if (IS_ERR(apcs->clk))
+ dev_err(&pdev->dev, "failed to register APCS clk\n");
+ }
+
platform_set_drvdata(pdev, apcs);
return 0;
static int qcom_apcs_ipc_remove(struct platform_device *pdev)
{
struct qcom_apcs_ipc *apcs = platform_get_drvdata(pdev);
+ struct platform_device *clk = apcs->clk;
mbox_controller_unregister(&apcs->mbox);
+ platform_device_unregister(clk);
return 0;
}