static struct i2c_driver adau1372_i2c_driver = {
.driver = {
.name = "adau1372",
+ .of_match_table = adau1372_of_match,
},
.probe = adau1372_i2c_probe,
.id_table = adau1372_i2c_ids,
static struct spi_driver adau1372_spi_driver = {
.driver = {
.name = "adau1372",
+ .of_match_table = adau1372_of_match,
},
.probe = adau1372_spi_probe,
.id_table = adau1372_spi_id,
#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/pm.h>
#include <linux/slab.h>
};
EXPORT_SYMBOL_GPL(adau1372_regmap_config);
+const struct of_device_id adau1372_of_match[] = {
+ { .compatible = "adi,adau1372" },
+ { }
+};
+EXPORT_SYMBOL_GPL(adau1372_of_match);
+MODULE_DEVICE_TABLE(of, adau1372_of_match);
+
MODULE_DESCRIPTION("ASoC ADAU1372 CODEC driver");
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
MODULE_LICENSE("GPL v2");
struct device;
+extern const struct of_device_id adau1372_of_match[];
int adau1372_probe(struct device *dev, struct regmap *regmap,
void (*switch_mode)(struct device *dev));