forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/codecs/adau1977-spi.c
....@@ -1,15 +1,16 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * ADAU1977/ADAU1978/ADAU1979 driver
34 *
45 * Copyright 2014 Analog Devices Inc.
56 * Author: Lars-Peter Clausen <lars@metafoo.de>
6
- *
7
- * Licensed under the GPL-2.
87 */
98
109 #include <linux/mod_devicetable.h>
1110 #include <linux/module.h>
1211 #include <linux/regmap.h>
12
+#include <linux/of.h>
13
+#include <linux/of_device.h>
1314 #include <linux/spi/spi.h>
1415 #include <sound/soc.h>
1516
....@@ -54,9 +55,18 @@
5455 };
5556 MODULE_DEVICE_TABLE(spi, adau1977_spi_ids);
5657
58
+static const struct of_device_id adau1977_spi_of_match[] = {
59
+ { .compatible = "adi,adau1977" },
60
+ { .compatible = "adi,adau1978" },
61
+ { .compatible = "adi,adau1979" },
62
+ { },
63
+};
64
+MODULE_DEVICE_TABLE(of, adau1977_spi_of_match);
65
+
5766 static struct spi_driver adau1977_spi_driver = {
5867 .driver = {
5968 .name = "adau1977",
69
+ .of_match_table = of_match_ptr(adau1977_spi_of_match),
6070 },
6171 .probe = adau1977_spi_probe,
6272 .id_table = adau1977_spi_ids,