xref: /openbmc/linux/sound/soc/codecs/adau7118-hw.c (revision dc6a81c3)
1 // SPDX-License-Identifier: GPL-2.0
2 //
3 // Analog Devices ADAU7118 8 channel PDM-to-I2S/TDM Converter Standalone Hw
4 // driver
5 //
6 // Copyright 2019 Analog Devices Inc.
7 
8 #include <linux/module.h>
9 #include <linux/mod_devicetable.h>
10 #include <linux/platform_device.h>
11 
12 #include "adau7118.h"
13 
14 static int adau7118_probe_hw(struct platform_device *pdev)
15 {
16 	return adau7118_probe(&pdev->dev, NULL, true);
17 }
18 
19 static const struct of_device_id adau7118_of_match[] = {
20 	{ .compatible = "adi,adau7118" },
21 	{}
22 };
23 MODULE_DEVICE_TABLE(of, adau7118_of_match);
24 
25 static const struct platform_device_id adau7118_id[] = {
26 	{ .name	= "adau7118" },
27 	{ }
28 };
29 MODULE_DEVICE_TABLE(platform, adau7118_id);
30 
31 static struct platform_driver adau7118_driver_hw = {
32 	.driver = {
33 		.name = "adau7118",
34 		.of_match_table = adau7118_of_match,
35 	},
36 	.probe = adau7118_probe_hw,
37 	.id_table = adau7118_id,
38 };
39 module_platform_driver(adau7118_driver_hw);
40 
41 MODULE_AUTHOR("Nuno Sa <nuno.sa@analog.com>");
42 MODULE_DESCRIPTION("ADAU7118 8 channel PDM-to-I2S/TDM Converter driver for standalone hw mode");
43 MODULE_LICENSE("GPL");
44