summaryrefslogtreecommitdiff
path: root/sound/soc/samsung/smdk_wm8994.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-10-21 10:49:15 +0300
committerTakashi Iwai <tiwai@suse.de>2023-10-21 10:49:15 +0300
commit39cd06e3f7b75b629f2987aa51ab26fb820d167b (patch)
treec7215f6a63b2227584108043c623ff69c45cb236 /sound/soc/samsung/smdk_wm8994.c
parente6d0c13e9f46f9cf83f2f4946b0a2954599552a7 (diff)
parent45f1b12e0366a750d65e92307685964488a3b6f4 (diff)
downloadlinux-39cd06e3f7b75b629f2987aa51ab26fb820d167b.tar.xz
Merge tag 'asoc-v6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v6.7 This is quite a large set of changes but mostly due to API cleanups and in driver specific ways rather than due to anything subsystem wide. Highlights include: - Standardisation of API prefixes on snd_soc_, removing asoc_. - GPIO API usage improvements. - Support for HDA patches. - Lots of work on SOF, including crash dump support. - Support for AMD platforms with es83xx, Awinc AT87390, many Intel platforms, many Mediatek platforms, Qualcomm SM6115, Richtek RTQ9128 and Texas Instruments TAS575x. [ the merge conflicts around SOF Intel HD-audio and CS35L41 subcodec drivers are resolved here -- tiwai ]
Diffstat (limited to 'sound/soc/samsung/smdk_wm8994.c')
-rw-r--r--sound/soc/samsung/smdk_wm8994.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index 821ad1eb1b79..def92cc09f9c 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -5,7 +5,6 @@
#include <sound/soc.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/of_device.h>
/*
* Default CFG switch settings to use this driver:
@@ -32,20 +31,11 @@
/* SMDK has a 16.934MHZ crystal attached to WM8994 */
#define SMDK_WM8994_FREQ 16934000
-struct smdk_wm8994_data {
- int mclk1_rate;
-};
-
-/* Default SMDKs */
-static struct smdk_wm8994_data smdk_board_data = {
- .mclk1_rate = SMDK_WM8994_FREQ,
-};
-
static int smdk_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
- struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
unsigned int pll_out;
int ret;
@@ -136,8 +126,8 @@ static struct snd_soc_card smdk = {
.num_links = ARRAY_SIZE(smdk_dai),
};
-static const struct of_device_id samsung_wm8994_of_match[] __maybe_unused = {
- { .compatible = "samsung,smdk-wm8994", .data = &smdk_board_data },
+static const struct of_device_id samsung_wm8994_of_match[] = {
+ { .compatible = "samsung,smdk-wm8994" },
{},
};
MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match);
@@ -147,15 +137,9 @@ static int smdk_audio_probe(struct platform_device *pdev)
int ret;
struct device_node *np = pdev->dev.of_node;
struct snd_soc_card *card = &smdk;
- struct smdk_wm8994_data *board;
- const struct of_device_id *id;
card->dev = &pdev->dev;
- board = devm_kzalloc(&pdev->dev, sizeof(*board), GFP_KERNEL);
- if (!board)
- return -ENOMEM;
-
if (np) {
smdk_dai[0].cpus->dai_name = NULL;
smdk_dai[0].cpus->of_node = of_parse_phandle(np,
@@ -171,12 +155,6 @@ static int smdk_audio_probe(struct platform_device *pdev)
smdk_dai[0].platforms->of_node = smdk_dai[0].cpus->of_node;
}
- id = of_match_device(samsung_wm8994_of_match, &pdev->dev);
- if (id)
- *board = *((struct smdk_wm8994_data *)id->data);
-
- platform_set_drvdata(pdev, board);
-
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret)
@@ -188,7 +166,7 @@ static int smdk_audio_probe(struct platform_device *pdev)
static struct platform_driver smdk_audio_driver = {
.driver = {
.name = "smdk-audio-wm8994",
- .of_match_table = of_match_ptr(samsung_wm8994_of_match),
+ .of_match_table = samsung_wm8994_of_match,
.pm = &snd_soc_pm_ops,
},
.probe = smdk_audio_probe,