Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Weidong Wang and committed by
Mark Brown
6bbb2b12 9aa33d5b

+10
+10
sound/soc/codecs/aw88081.c
··· 1295 1295 aw88081_dai, ARRAY_SIZE(aw88081_dai)); 1296 1296 } 1297 1297 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 + 1298 1307 static struct i2c_driver aw88081_i2c_driver = { 1299 1308 .driver = { 1300 1309 .name = AW88081_I2C_NAME, 1310 + .of_match_table = of_match_ptr(aw88081_of_match), 1301 1311 }, 1302 1312 .probe = aw88081_i2c_probe, 1303 1313 .id_table = aw88081_i2c_id,