[PATCH V1] ASoC: codecs: Add of_match_table for aw888081 driver

wangweidong.a@awinic.com posted 1 patch 8 months, 1 week ago
sound/soc/codecs/aw88081.c | 10 ++++++++++
1 file changed, 10 insertions(+)
[PATCH V1] ASoC: codecs: Add of_match_table for aw888081 driver
Posted by wangweidong.a@awinic.com 8 months, 1 week ago
From: Weidong Wang <wangweidong.a@awinic.com>

Add of_match_table for aw88081 driver to make matching
between dts and driver more flexible

Signed-off-by: Weidong Wang <wangweidong.a@awinic.com>
---
 sound/soc/codecs/aw88081.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/codecs/aw88081.c b/sound/soc/codecs/aw88081.c
index ad16ab6812cd..3dd8428f08cc 100644
--- a/sound/soc/codecs/aw88081.c
+++ b/sound/soc/codecs/aw88081.c
@@ -1295,9 +1295,19 @@ static int aw88081_i2c_probe(struct i2c_client *i2c)
 			aw88081_dai, ARRAY_SIZE(aw88081_dai));
 }
 
+#if defined(CONFIG_OF)
+static const struct of_device_id aw88081_of_match[] = {
+	{ .compatible = "awinic,aw88081" },
+	{ .compatible = "awinic,aw88083" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, aw88081_of_match);
+#endif
+
 static struct i2c_driver aw88081_i2c_driver = {
 	.driver = {
 		.name = AW88081_I2C_NAME,
+		.of_match_table = of_match_ptr(aw88081_of_match),
 	},
 	.probe = aw88081_i2c_probe,
 	.id_table = aw88081_i2c_id,

base-commit: 3b07108ada81a8ebcebf1fe61367b4e436c895bd
-- 
2.47.0
Re: [PATCH V1] ASoC: codecs: Add of_match_table for aw888081 driver
Posted by Mark Brown 8 months, 1 week ago
On Thu, 10 Apr 2025 10:49:53 +0800, wangweidong.a@awinic.com wrote:
> Add of_match_table for aw88081 driver to make matching
> between dts and driver more flexible
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: codecs: Add of_match_table for aw888081 driver
      commit: 6bbb2b1286f437b45ccf4828a537429153cd1096

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