diff options
| author | Mark Brown <broonie@kernel.org> | 2026-03-16 01:11:23 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-16 01:11:23 +0000 |
| commit | 3e9cda2f4a33c6becc99f8a78946cbd02983852f (patch) | |
| tree | b07c29745fc1253262804258f9af581c7e834ebb /sound/soc/amd | |
| parent | 5e2f19ce90d5601f4250b510ed2f41160e5692e9 (diff) | |
| parent | c43988dfe25ba358b1df72201327ca719e8a369d (diff) | |
| download | linux-next-3e9cda2f4a33c6becc99f8a78946cbd02983852f.tar.gz linux-next-3e9cda2f4a33c6becc99f8a78946cbd02983852f.zip | |
ASoC: amd: Move to GPIO descriptors
Linus Walleij <linusw@kernel.org> says:
After a quick look and test-compile I can determine that
all of these drivers include <linux/gpio.h> for no reason
whatsoever, so fixing it is low hanging fruit.
Link: https://patch.msgid.link/20260314-asoc-amd-v1-0-31afed06e022@kernel.org
Diffstat (limited to 'sound/soc/amd')
| -rw-r--r-- | sound/soc/amd/acp-da7219-max98357a.c | 1 | ||||
| -rw-r--r-- | sound/soc/amd/acp-es8336.c | 1 | ||||
| -rw-r--r-- | sound/soc/amd/acp-rt5645.c | 1 | ||||
| -rw-r--r-- | sound/soc/amd/acp/acp-mach-common.c | 18 | ||||
| -rw-r--r-- | sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c | 1 | ||||
| -rw-r--r-- | sound/soc/amd/acp3x-rt5682-max9836.c | 10 |
6 files changed, 21 insertions, 11 deletions
diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index 42aa009c4e13..3c08e6e17e41 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -11,7 +11,6 @@ #include <sound/soc-dapm.h> #include <sound/jack.h> #include <linux/clk.h> -#include <linux/gpio.h> #include <linux/module.h> #include <linux/regulator/machine.h> #include <linux/regulator/driver.h> diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c index b16dde0e2987..9f3f11256788 100644 --- a/sound/soc/amd/acp-es8336.c +++ b/sound/soc/amd/acp-es8336.c @@ -11,7 +11,6 @@ #include <sound/pcm_params.h> #include <sound/soc-dapm.h> #include <sound/jack.h> -#include <linux/gpio.h> #include <linux/device.h> #include <linux/dmi.h> #include <linux/gpio/consumer.h> diff --git a/sound/soc/amd/acp-rt5645.c b/sound/soc/amd/acp-rt5645.c index d545516760b9..5c38fa11db7a 100644 --- a/sound/soc/amd/acp-rt5645.c +++ b/sound/soc/amd/acp-rt5645.c @@ -13,7 +13,6 @@ #include <sound/pcm_params.h> #include <sound/soc-dapm.h> #include <sound/jack.h> -#include <linux/gpio.h> #include <linux/module.h> #include <linux/i2c.h> #include <linux/acpi.h> diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-common.c index 4d99472c75ba..09f6c9a2c041 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -127,8 +127,13 @@ static int acp_card_rt5682_init(struct snd_soc_pcm_runtime *rtd) if (drvdata->hs_codec_id != RT5682) return -EINVAL; - drvdata->wclk = clk_get(component->dev, "rt5682-dai-wclk"); - drvdata->bclk = clk_get(component->dev, "rt5682-dai-bclk"); + drvdata->wclk = devm_clk_get(component->dev, "rt5682-dai-wclk"); + if (IS_ERR(drvdata->wclk)) + return PTR_ERR(drvdata->wclk); + + drvdata->bclk = devm_clk_get(component->dev, "rt5682-dai-bclk"); + if (IS_ERR(drvdata->bclk)) + return PTR_ERR(drvdata->bclk); ret = snd_soc_dapm_new_controls(dapm, rt5682_widgets, ARRAY_SIZE(rt5682_widgets)); @@ -370,8 +375,13 @@ static int acp_card_rt5682s_init(struct snd_soc_pcm_runtime *rtd) return -EINVAL; if (!drvdata->soc_mclk) { - drvdata->wclk = clk_get(component->dev, "rt5682-dai-wclk"); - drvdata->bclk = clk_get(component->dev, "rt5682-dai-bclk"); + drvdata->wclk = devm_clk_get(component->dev, "rt5682-dai-wclk"); + if (IS_ERR(drvdata->wclk)) + return PTR_ERR(drvdata->wclk); + + drvdata->bclk = devm_clk_get(component->dev, "rt5682-dai-bclk"); + if (IS_ERR(drvdata->bclk)) + return PTR_ERR(drvdata->bclk); } ret = snd_soc_dapm_new_controls(dapm, rt5682s_widgets, diff --git a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c index 141ea4787d99..46fff565d732 100644 --- a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c +++ b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c @@ -11,7 +11,6 @@ #include <sound/jack.h> #include <sound/soc-acpi.h> #include <linux/clk.h> -#include <linux/gpio.h> #include <linux/gpio/consumer.h> #include <linux/module.h> #include <linux/i2c.h> diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c index 4ca1978020a9..4affb00bdc95 100644 --- a/sound/soc/amd/acp3x-rt5682-max9836.c +++ b/sound/soc/amd/acp3x-rt5682-max9836.c @@ -11,7 +11,6 @@ #include <sound/soc-dapm.h> #include <sound/jack.h> #include <linux/clk.h> -#include <linux/gpio.h> #include <linux/gpio/consumer.h> #include <linux/module.h> #include <linux/i2c.h> @@ -94,8 +93,13 @@ static int acp3x_5682_init(struct snd_soc_pcm_runtime *rtd) return ret; } - rt5682_dai_wclk = clk_get(component->dev, "rt5682-dai-wclk"); - rt5682_dai_bclk = clk_get(component->dev, "rt5682-dai-bclk"); + rt5682_dai_wclk = devm_clk_get(component->dev, "rt5682-dai-wclk"); + if (IS_ERR(rt5682_dai_wclk)) + return PTR_ERR(rt5682_dai_wclk); + + rt5682_dai_bclk = devm_clk_get(component->dev, "rt5682-dai-bclk"); + if (IS_ERR(rt5682_dai_bclk)) + return PTR_ERR(rt5682_dai_bclk); ret = snd_soc_card_jack_new_pins(card, "Headset Jack", SND_JACK_HEADSET | |
