Skip to content

Commit 6bbb2b1

Browse files
wangweidongabroonie
authored andcommitted
ASoC: codecs: Add of_match_table for aw888081 driver
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> Link: https://patch.msgid.link/20250410024953.26565-1-wangweidong.a@awinic.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 9aa33d5 commit 6bbb2b1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sound/soc/codecs/aw88081.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,9 +1295,19 @@ static int aw88081_i2c_probe(struct i2c_client *i2c)
12951295
aw88081_dai, ARRAY_SIZE(aw88081_dai));
12961296
}
12971297

1298+
#if defined(CONFIG_OF)
1299+
static const struct of_device_id aw88081_of_match[] = {
1300+
{ .compatible = "awinic,aw88081" },
1301+
{ .compatible = "awinic,aw88083" },
1302+
{ }
1303+
};
1304+
MODULE_DEVICE_TABLE(of, aw88081_of_match);
1305+
#endif
1306+
12981307
static struct i2c_driver aw88081_i2c_driver = {
12991308
.driver = {
13001309
.name = AW88081_I2C_NAME,
1310+
.of_match_table = of_match_ptr(aw88081_of_match),
13011311
},
13021312
.probe = aw88081_i2c_probe,
13031313
.id_table = aw88081_i2c_id,

0 commit comments

Comments
 (0)