diff mbox series

ASoC: codecs: adau1372: add match table

Message ID 20241021-adau1372-of-table-v1-1-6efbc7946957@analog.com (mailing list archive)
State Accepted
Commit cca8824838a59aba31e182525175e5659c33034f
Headers show
Series ASoC: codecs: adau1372: add match table | expand

Commit Message

Nuno Sa Oct. 21, 2024, 2 p.m. UTC
Add an of_device_id table for both the I2C and SPI drivers.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 sound/soc/codecs/adau1372-i2c.c | 1 +
 sound/soc/codecs/adau1372-spi.c | 1 +
 sound/soc/codecs/adau1372.c     | 8 ++++++++
 sound/soc/codecs/adau1372.h     | 1 +
 4 files changed, 11 insertions(+)


---
base-commit: 626297009d7d0dbda64528099822f9ff21b26a24
change-id: 20241021-adau1372-of-table-31db6cb730f0
--

Thanks!
- Nuno Sá

Comments

Mark Brown Oct. 22, 2024, 2:07 p.m. UTC | #1
On Mon, 21 Oct 2024 16:00:49 +0200, Nuno Sa wrote:
> Add an of_device_id table for both the I2C and SPI drivers.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: codecs: adau1372: add match table
      commit: cca8824838a59aba31e182525175e5659c33034f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/codecs/adau1372-i2c.c b/sound/soc/codecs/adau1372-i2c.c
index 2869325f9acedeadf0a5d0331cf1c664ac85ffe0..73f83be38f749024e6836ccc503ffe7412cc8913 100644
--- a/sound/soc/codecs/adau1372-i2c.c
+++ b/sound/soc/codecs/adau1372-i2c.c
@@ -29,6 +29,7 @@  MODULE_DEVICE_TABLE(i2c, adau1372_i2c_ids);
 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,
diff --git a/sound/soc/codecs/adau1372-spi.c b/sound/soc/codecs/adau1372-spi.c
index 51298e00fbd69ccc033fdc74678b6d09376c08fb..656bd1fabeb3a1377c490b51ba7e1c16aadef561 100644
--- a/sound/soc/codecs/adau1372-spi.c
+++ b/sound/soc/codecs/adau1372-spi.c
@@ -47,6 +47,7 @@  MODULE_DEVICE_TABLE(spi, adau1372_spi_id);
 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,
diff --git a/sound/soc/codecs/adau1372.c b/sound/soc/codecs/adau1372.c
index 98380a7ce64d80cbfffee17060cf41350395a915..fdee689cae53830ee201be1d929d77e4b3489eac 100644
--- a/sound/soc/codecs/adau1372.c
+++ b/sound/soc/codecs/adau1372.c
@@ -11,6 +11,7 @@ 
 #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>
 
@@ -1060,6 +1061,13 @@  const struct regmap_config adau1372_regmap_config = {
 };
 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");
diff --git a/sound/soc/codecs/adau1372.h b/sound/soc/codecs/adau1372.h
index a9d2c59b73a93c772eac1c6c21ff772d8e6bcfdb..c55b1c24fe397a9b8c66cb0f10b1b2d57a6fc731 100644
--- a/sound/soc/codecs/adau1372.h
+++ b/sound/soc/codecs/adau1372.h
@@ -13,6 +13,7 @@ 
 
 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));