mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
6ba20539ac
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen <liaochen4@huawei.com> Link: https://patch.msgid.link/20240826084924.368387-5-liaochen4@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
#include <linux/module.h>
|
|
#include <sound/soc.h>
|
|
|
|
static struct snd_soc_dai_driver chv3_codec_dai = {
|
|
.name = "chv3-codec-hifi",
|
|
.capture = {
|
|
.stream_name = "Capture",
|
|
.channels_min = 8,
|
|
.channels_max = 8,
|
|
.rates = SNDRV_PCM_RATE_CONTINUOUS,
|
|
.formats = SNDRV_PCM_FMTBIT_S32_LE,
|
|
},
|
|
};
|
|
|
|
static const struct snd_soc_component_driver soc_component_dev_chv3_codec = {
|
|
};
|
|
|
|
static int chv3_codec_probe(struct platform_device *pdev)
|
|
{
|
|
return devm_snd_soc_register_component(&pdev->dev,
|
|
&soc_component_dev_chv3_codec, &chv3_codec_dai, 1);
|
|
}
|
|
|
|
static const struct of_device_id chv3_codec_of_match[] = {
|
|
{ .compatible = "google,chv3-codec", },
|
|
{ }
|
|
};
|
|
MODULE_DEVICE_TABLE(of, chv3_codec_of_match);
|
|
|
|
static struct platform_driver chv3_codec_platform_driver = {
|
|
.driver = {
|
|
.name = "chv3-codec",
|
|
.of_match_table = chv3_codec_of_match,
|
|
},
|
|
.probe = chv3_codec_probe,
|
|
};
|
|
module_platform_driver(chv3_codec_platform_driver);
|
|
|
|
MODULE_DESCRIPTION("ASoC Chameleon v3 codec driver");
|
|
MODULE_AUTHOR("Pawel Anikiel <pan@semihalf.com>");
|
|
MODULE_LICENSE("GPL");
|