#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_address.h>
+#include <linux/pm_runtime.h>
#include <linux/qcom_scm.h>
#include <linux/soc/qcom/mdt_loader.h>
goto err_table_exit;
/* The clock needs to be active for config and setup */
- ret = ipa_clock_get(ipa);
+ ret = pm_runtime_get_sync(dev);
if (WARN_ON(ret < 0))
- goto err_clock_put;
+ goto err_power_put;
ret = ipa_config(ipa, data);
if (ret)
- goto err_clock_put;
+ goto err_power_put;
dev_info(dev, "IPA driver initialized");
if (ret)
goto err_deconfig;
done:
- (void)ipa_clock_put(ipa);
+ (void)pm_runtime_put(dev);
return 0;
err_deconfig:
ipa_deconfig(ipa);
-err_clock_put:
- (void)ipa_clock_put(ipa);
+err_power_put:
+ (void)pm_runtime_put(dev);
ipa_modem_exit(ipa);
err_table_exit:
ipa_table_exit(ipa);
struct ipa_clock *clock = ipa->clock;
int ret;
- ret = ipa_clock_get(ipa);
+ ret = pm_runtime_get_sync(&pdev->dev);
if (WARN_ON(ret < 0))
- goto out_clock_put;
+ goto out_power_put;
if (ipa->setup_complete) {
ret = ipa_modem_stop(ipa);
}
ipa_deconfig(ipa);
-out_clock_put:
- (void)ipa_clock_put(ipa);
+out_power_put:
+ (void)pm_runtime_put(&pdev->dev);
ipa_modem_exit(ipa);
ipa_table_exit(ipa);