[PATCH] ASoC: codecs: aw88395: Add of_match_table

From: Konrad Dybcio
Date: Tue Jul 11 2023 - 15:06:20 EST


The i2c_match_id entry is not enough to get the device probing with DT.
Add an of match table in accordance with the bindings.

Fixes: 62fc25fbab5f ("ASoC: codecs: Add i2c and codec registration for aw88395 and their associated operation functions")
Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>
---
sound/soc/codecs/aw88395/aw88395.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/aw88395/aw88395.c b/sound/soc/codecs/aw88395/aw88395.c
index 9dcd75dd799a..5ff01d3c31c8 100644
--- a/sound/soc/codecs/aw88395/aw88395.c
+++ b/sound/soc/codecs/aw88395/aw88395.c
@@ -566,9 +566,18 @@ static const struct i2c_device_id aw88395_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, aw88395_i2c_id);

+#ifdef CONFIG_OF
+static const struct of_device_id aw88395_of_match[] = {
+ { .compatible = "awinic,aw88395" },
+ { },
+};
+MODULE_DEVICE_TABLE(of, aw88395_of_match);
+#endif
+
static struct i2c_driver aw88395_i2c_driver = {
.driver = {
.name = AW88395_I2C_NAME,
+ .of_match_table = of_match_ptr(aw88395_of_match),
},
.probe = aw88395_i2c_probe,
.id_table = aw88395_i2c_id,

---
base-commit: 8e4b7f2f3d6071665b1dfd70786229c8a5d6c256
change-id: 20230711-topic-aw88395_of_tbl-68b16c5860a5

Best regards,
--
Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>