diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 17:39:57 +0000 |
commit | dc50eab76b709d68175a358d6e23a5a3890764d3 (patch) | |
tree | c754d0390db060af0213ff994f0ac310e4cfd6e9 /sound/soc/codecs/cs35l41.c | |
parent | Adding debian version 6.6.15-2. (diff) | |
download | linux-dc50eab76b709d68175a358d6e23a5a3890764d3.tar.xz linux-dc50eab76b709d68175a358d6e23a5a3890764d3.zip |
Merging upstream version 6.7.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sound/soc/codecs/cs35l41.c')
-rw-r--r-- | sound/soc/codecs/cs35l41.c | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c index 5456e6bfa2..dfb4ce5349 100644 --- a/sound/soc/codecs/cs35l41.c +++ b/sound/soc/codecs/cs35l41.c @@ -13,7 +13,6 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/of_device.h> #include <linux/pm_runtime.h> #include <linux/property.h> #include <sound/initval.h> @@ -520,11 +519,11 @@ static int cs35l41_main_amp_event(struct snd_soc_dapm_widget *w, ARRAY_SIZE(cs35l41_pup_patch)); ret = cs35l41_global_enable(cs35l41->dev, cs35l41->regmap, cs35l41->hw_cfg.bst_type, - 1, cs35l41->dsp.cs_dsp.running); + 1, &cs35l41->dsp.cs_dsp); break; case SND_SOC_DAPM_POST_PMD: ret = cs35l41_global_enable(cs35l41->dev, cs35l41->regmap, cs35l41->hw_cfg.bst_type, - 0, cs35l41->dsp.cs_dsp.running); + 0, &cs35l41->dsp.cs_dsp); regmap_multi_reg_write_bypassed(cs35l41->regmap, cs35l41_pdn_patch, @@ -1190,16 +1189,14 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * ret = devm_regulator_bulk_get(cs35l41->dev, CS35L41_NUM_SUPPLIES, cs35l41->supplies); - if (ret != 0) { - dev_err(cs35l41->dev, "Failed to request core supplies: %d\n", ret); - return ret; - } + if (ret != 0) + return dev_err_probe(cs35l41->dev, ret, + "Failed to request core supplies\n"); ret = regulator_bulk_enable(CS35L41_NUM_SUPPLIES, cs35l41->supplies); - if (ret != 0) { - dev_err(cs35l41->dev, "Failed to enable core supplies: %d\n", ret); - return ret; - } + if (ret != 0) + return dev_err_probe(cs35l41->dev, ret, + "Failed to enable core supplies\n"); /* returning NULL can be an option if in stereo mode */ cs35l41->reset_gpio = devm_gpiod_get_optional(cs35l41->dev, "reset", @@ -1211,8 +1208,8 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * dev_info(cs35l41->dev, "Reset line busy, assuming shared reset\n"); } else { - dev_err(cs35l41->dev, - "Failed to get reset GPIO: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, + "Failed to get reset GPIO\n"); goto err; } } @@ -1228,8 +1225,8 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * int_status, int_status & CS35L41_OTP_BOOT_DONE, 1000, 100000); if (ret) { - dev_err(cs35l41->dev, - "Failed waiting for OTP_BOOT_DONE: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, + "Failed waiting for OTP_BOOT_DONE\n"); goto err; } @@ -1242,13 +1239,13 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * ret = regmap_read(cs35l41->regmap, CS35L41_DEVID, ®id); if (ret < 0) { - dev_err(cs35l41->dev, "Get Device ID failed: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, "Get Device ID failed\n"); goto err; } ret = regmap_read(cs35l41->regmap, CS35L41_REVID, ®_revid); if (ret < 0) { - dev_err(cs35l41->dev, "Get Revision ID failed: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, "Get Revision ID failed\n"); goto err; } @@ -1273,7 +1270,7 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * ret = cs35l41_otp_unpack(cs35l41->dev, cs35l41->regmap); if (ret < 0) { - dev_err(cs35l41->dev, "OTP Unpack failed: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, "OTP Unpack failed\n"); goto err; } @@ -1293,13 +1290,13 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * IRQF_ONESHOT | IRQF_SHARED | irq_pol, "cs35l41", cs35l41); if (ret != 0) { - dev_err(cs35l41->dev, "Failed to request IRQ: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, "Failed to request IRQ\n"); goto err; } ret = cs35l41_set_pdata(cs35l41); if (ret < 0) { - dev_err(cs35l41->dev, "Set pdata failed: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, "Set pdata failed\n"); goto err; } @@ -1322,7 +1319,7 @@ int cs35l41_probe(struct cs35l41_private *cs35l41, const struct cs35l41_hw_cfg * &soc_component_dev_cs35l41, cs35l41_dai, ARRAY_SIZE(cs35l41_dai)); if (ret < 0) { - dev_err(cs35l41->dev, "Register codec failed: %d\n", ret); + dev_err_probe(cs35l41->dev, ret, "Register codec failed\n"); goto err_pm; } @@ -1370,7 +1367,7 @@ void cs35l41_remove(struct cs35l41_private *cs35l41) } EXPORT_SYMBOL_GPL(cs35l41_remove); -static int __maybe_unused cs35l41_runtime_suspend(struct device *dev) +static int cs35l41_runtime_suspend(struct device *dev) { struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); @@ -1387,7 +1384,7 @@ static int __maybe_unused cs35l41_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused cs35l41_runtime_resume(struct device *dev) +static int cs35l41_runtime_resume(struct device *dev) { struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); int ret; @@ -1416,7 +1413,7 @@ static int __maybe_unused cs35l41_runtime_resume(struct device *dev) return 0; } -static int __maybe_unused cs35l41_sys_suspend(struct device *dev) +static int cs35l41_sys_suspend(struct device *dev) { struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); @@ -1426,7 +1423,7 @@ static int __maybe_unused cs35l41_sys_suspend(struct device *dev) return 0; } -static int __maybe_unused cs35l41_sys_suspend_noirq(struct device *dev) +static int cs35l41_sys_suspend_noirq(struct device *dev) { struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); @@ -1436,7 +1433,7 @@ static int __maybe_unused cs35l41_sys_suspend_noirq(struct device *dev) return 0; } -static int __maybe_unused cs35l41_sys_resume_noirq(struct device *dev) +static int cs35l41_sys_resume_noirq(struct device *dev) { struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); @@ -1446,7 +1443,7 @@ static int __maybe_unused cs35l41_sys_resume_noirq(struct device *dev) return 0; } -static int __maybe_unused cs35l41_sys_resume(struct device *dev) +static int cs35l41_sys_resume(struct device *dev) { struct cs35l41_private *cs35l41 = dev_get_drvdata(dev); @@ -1456,13 +1453,12 @@ static int __maybe_unused cs35l41_sys_resume(struct device *dev) return 0; } -const struct dev_pm_ops cs35l41_pm_ops = { - SET_RUNTIME_PM_OPS(cs35l41_runtime_suspend, cs35l41_runtime_resume, NULL) +EXPORT_GPL_DEV_PM_OPS(cs35l41_pm_ops) = { + RUNTIME_PM_OPS(cs35l41_runtime_suspend, cs35l41_runtime_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(cs35l41_sys_suspend, cs35l41_sys_resume) - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(cs35l41_sys_suspend_noirq, cs35l41_sys_resume_noirq) + SYSTEM_SLEEP_PM_OPS(cs35l41_sys_suspend, cs35l41_sys_resume) + NOIRQ_SYSTEM_SLEEP_PM_OPS(cs35l41_sys_suspend_noirq, cs35l41_sys_resume_noirq) }; -EXPORT_SYMBOL_GPL(cs35l41_pm_ops); MODULE_DESCRIPTION("ASoC CS35L41 driver"); MODULE_AUTHOR("David Rhodes, Cirrus Logic Inc, <david.rhodes@cirrus.com>"); |