2 * Driver for the PCM1794A codec
4 * Author: Florian Meier <florian.meier@koalo.de>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
18 #include <linux/init.h>
19 #include <linux/module.h>
20 #include <linux/platform_device.h>
22 #include <sound/soc.h>
24 static struct snd_soc_dai_driver pcm1794a_dai = {
25 .name = "pcm1794a-hifi",
29 .rates = SNDRV_PCM_RATE_8000_192000,
30 .formats = SNDRV_PCM_FMTBIT_S16_LE |
31 SNDRV_PCM_FMTBIT_S24_LE
35 static struct snd_soc_component_driver soc_component_dev_pcm1794a;
37 static int pcm1794a_probe(struct platform_device *pdev)
39 return snd_soc_register_component(&pdev->dev, &soc_component_dev_pcm1794a,
43 static int pcm1794a_remove(struct platform_device *pdev)
45 snd_soc_unregister_component(&pdev->dev);
49 static const struct of_device_id pcm1794a_of_match[] = {
50 { .compatible = "ti,pcm1794a", },
53 MODULE_DEVICE_TABLE(of, pcm1794a_of_match);
55 static struct platform_driver pcm1794a_component_driver = {
56 .probe = pcm1794a_probe,
57 .remove = pcm1794a_remove,
59 .name = "pcm1794a-codec",
61 .of_match_table = of_match_ptr(pcm1794a_of_match),
65 module_platform_driver(pcm1794a_component_driver);
67 MODULE_DESCRIPTION("ASoC PCM1794A codec driver");
68 MODULE_AUTHOR("Florian Meier <florian.meier@koalo.de>");
69 MODULE_LICENSE("GPL v2");