Commit 62c35b3b authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

ASoC: wm_adsp: Use adsp_err/warn instead of dev_err/warn

We have defines for adsp messages best to consistently use them.
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent cab27258
...@@ -1543,16 +1543,16 @@ static void wm_adsp2_boot_work(struct work_struct *work) ...@@ -1543,16 +1543,16 @@ static void wm_adsp2_boot_work(struct work_struct *work)
ret = regmap_read(dsp->regmap, ret = regmap_read(dsp->regmap,
dsp->base + ADSP2_CLOCKING, &val); dsp->base + ADSP2_CLOCKING, &val);
if (ret != 0) { if (ret != 0) {
dev_err(dsp->dev, "Failed to read clocking: %d\n", ret); adsp_err(dsp, "Failed to read clocking: %d\n", ret);
return; return;
} }
if ((val & ADSP2_CLK_SEL_MASK) >= 3) { if ((val & ADSP2_CLK_SEL_MASK) >= 3) {
ret = regulator_enable(dsp->dvfs); ret = regulator_enable(dsp->dvfs);
if (ret != 0) { if (ret != 0) {
dev_err(dsp->dev, adsp_err(dsp,
"Failed to enable supply: %d\n", "Failed to enable supply: %d\n",
ret); ret);
return; return;
} }
...@@ -1560,9 +1560,9 @@ static void wm_adsp2_boot_work(struct work_struct *work) ...@@ -1560,9 +1560,9 @@ static void wm_adsp2_boot_work(struct work_struct *work)
1800000, 1800000,
1800000); 1800000);
if (ret != 0) { if (ret != 0) {
dev_err(dsp->dev, adsp_err(dsp,
"Failed to raise supply: %d\n", "Failed to raise supply: %d\n",
ret); ret);
return; return;
} }
} }
...@@ -1672,15 +1672,15 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w, ...@@ -1672,15 +1672,15 @@ int wm_adsp2_event(struct snd_soc_dapm_widget *w,
ret = regulator_set_voltage(dsp->dvfs, 1200000, ret = regulator_set_voltage(dsp->dvfs, 1200000,
1800000); 1800000);
if (ret != 0) if (ret != 0)
dev_warn(dsp->dev, adsp_warn(dsp,
"Failed to lower supply: %d\n", "Failed to lower supply: %d\n",
ret); ret);
ret = regulator_disable(dsp->dvfs); ret = regulator_disable(dsp->dvfs);
if (ret != 0) if (ret != 0)
dev_err(dsp->dev, adsp_err(dsp,
"Failed to enable supply: %d\n", "Failed to enable supply: %d\n",
ret); ret);
} }
list_for_each_entry(ctl, &dsp->ctl_list, list) list_for_each_entry(ctl, &dsp->ctl_list, list)
...@@ -1732,28 +1732,25 @@ int wm_adsp2_init(struct wm_adsp *adsp, bool dvfs) ...@@ -1732,28 +1732,25 @@ int wm_adsp2_init(struct wm_adsp *adsp, bool dvfs)
adsp->dvfs = devm_regulator_get(adsp->dev, "DCVDD"); adsp->dvfs = devm_regulator_get(adsp->dev, "DCVDD");
if (IS_ERR(adsp->dvfs)) { if (IS_ERR(adsp->dvfs)) {
ret = PTR_ERR(adsp->dvfs); ret = PTR_ERR(adsp->dvfs);
dev_err(adsp->dev, "Failed to get DCVDD: %d\n", ret); adsp_err(adsp, "Failed to get DCVDD: %d\n", ret);
return ret; return ret;
} }
ret = regulator_enable(adsp->dvfs); ret = regulator_enable(adsp->dvfs);
if (ret != 0) { if (ret != 0) {
dev_err(adsp->dev, "Failed to enable DCVDD: %d\n", adsp_err(adsp, "Failed to enable DCVDD: %d\n", ret);
ret);
return ret; return ret;
} }
ret = regulator_set_voltage(adsp->dvfs, 1200000, 1800000); ret = regulator_set_voltage(adsp->dvfs, 1200000, 1800000);
if (ret != 0) { if (ret != 0) {
dev_err(adsp->dev, "Failed to initialise DVFS: %d\n", adsp_err(adsp, "Failed to initialise DVFS: %d\n", ret);
ret);
return ret; return ret;
} }
ret = regulator_disable(adsp->dvfs); ret = regulator_disable(adsp->dvfs);
if (ret != 0) { if (ret != 0) {
dev_err(adsp->dev, "Failed to disable DCVDD: %d\n", adsp_err(adsp, "Failed to disable DCVDD: %d\n", ret);
ret);
return ret; return 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