1 // SPDX-License-Identifier: GPL-2.0-only
3 * Driver for the PCM5102A codec
5 * Author: Florian Meier <florian.meier@koalo.de>
9 #include <linux/init.h>
10 #include <linux/module.h>
11 #include <linux/platform_device.h>
13 #include <sound/soc.h>
15 static struct snd_soc_dai_driver pcm5102a_dai
= {
16 .name
= "pcm5102a-hifi",
20 .rates
= SNDRV_PCM_RATE_8000_192000
,
21 .formats
= SNDRV_PCM_FMTBIT_S16_LE
|
22 SNDRV_PCM_FMTBIT_S24_LE
|
23 SNDRV_PCM_FMTBIT_S32_LE
27 static struct snd_soc_component_driver soc_component_dev_pcm5102a
= {
31 .non_legacy_dai_naming
= 1,
34 static int pcm5102a_probe(struct platform_device
*pdev
)
36 return devm_snd_soc_register_component(&pdev
->dev
, &soc_component_dev_pcm5102a
,
40 static const struct of_device_id pcm5102a_of_match
[] = {
41 { .compatible
= "ti,pcm5102a", },
44 MODULE_DEVICE_TABLE(of
, pcm5102a_of_match
);
46 static struct platform_driver pcm5102a_codec_driver
= {
47 .probe
= pcm5102a_probe
,
49 .name
= "pcm5102a-codec",
50 .of_match_table
= pcm5102a_of_match
,
54 module_platform_driver(pcm5102a_codec_driver
);
56 MODULE_DESCRIPTION("ASoC PCM5102A codec driver");
57 MODULE_AUTHOR("Florian Meier <florian.meier@koalo.de>");
58 MODULE_LICENSE("GPL v2");