161ed3034SPaweł Anikiel // SPDX-License-Identifier: GPL-2.0-only
261ed3034SPaweł Anikiel #include <linux/module.h>
361ed3034SPaweł Anikiel #include <sound/soc.h>
461ed3034SPaweł Anikiel
561ed3034SPaweł Anikiel static struct snd_soc_dai_driver chv3_codec_dai = {
661ed3034SPaweł Anikiel .name = "chv3-codec-hifi",
761ed3034SPaweł Anikiel .capture = {
861ed3034SPaweł Anikiel .stream_name = "Capture",
961ed3034SPaweł Anikiel .channels_min = 8,
1061ed3034SPaweł Anikiel .channels_max = 8,
1161ed3034SPaweł Anikiel .rates = SNDRV_PCM_RATE_CONTINUOUS,
1261ed3034SPaweł Anikiel .formats = SNDRV_PCM_FMTBIT_S32_LE,
1361ed3034SPaweł Anikiel },
1461ed3034SPaweł Anikiel };
1561ed3034SPaweł Anikiel
1661ed3034SPaweł Anikiel static const struct snd_soc_component_driver soc_component_dev_chv3_codec = {
1761ed3034SPaweł Anikiel };
1861ed3034SPaweł Anikiel
chv3_codec_probe(struct platform_device * pdev)1961ed3034SPaweł Anikiel static int chv3_codec_probe(struct platform_device *pdev)
2061ed3034SPaweł Anikiel {
2161ed3034SPaweł Anikiel return devm_snd_soc_register_component(&pdev->dev,
2261ed3034SPaweł Anikiel &soc_component_dev_chv3_codec, &chv3_codec_dai, 1);
2361ed3034SPaweł Anikiel }
2461ed3034SPaweł Anikiel
2561ed3034SPaweł Anikiel static const struct of_device_id chv3_codec_of_match[] = {
2661ed3034SPaweł Anikiel { .compatible = "google,chv3-codec", },
2761ed3034SPaweł Anikiel { }
2861ed3034SPaweł Anikiel };
29*6ba20539SLiao Chen MODULE_DEVICE_TABLE(of, chv3_codec_of_match);
3061ed3034SPaweł Anikiel
3161ed3034SPaweł Anikiel static struct platform_driver chv3_codec_platform_driver = {
3261ed3034SPaweł Anikiel .driver = {
3361ed3034SPaweł Anikiel .name = "chv3-codec",
3461ed3034SPaweł Anikiel .of_match_table = chv3_codec_of_match,
3561ed3034SPaweł Anikiel },
3661ed3034SPaweł Anikiel .probe = chv3_codec_probe,
3761ed3034SPaweł Anikiel };
3861ed3034SPaweł Anikiel module_platform_driver(chv3_codec_platform_driver);
3961ed3034SPaweł Anikiel
4061ed3034SPaweł Anikiel MODULE_DESCRIPTION("ASoC Chameleon v3 codec driver");
4161ed3034SPaweł Anikiel MODULE_AUTHOR("Pawel Anikiel <pan@semihalf.com>");
4261ed3034SPaweł Anikiel MODULE_LICENSE("GPL");
43