Skip to content

Commit 85aa0fe

Browse files
afaerberbroonie
authored andcommitted
ASoC: max98088: add OF support
MAX98088 is an older version of the MAX98089 device. Signed-off-by: Andreas Färber <afaerber@suse.de> [m.felsch@pengutronix.de: add CONFIG_OF compile switch] [m.felsch@pengutronix.de: adapt commit message] Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 02a9fad commit 85aa0fe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sound/soc/codecs/max98088.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,9 +1742,19 @@ static const struct i2c_device_id max98088_i2c_id[] = {
17421742
};
17431743
MODULE_DEVICE_TABLE(i2c, max98088_i2c_id);
17441744

1745+
#if defined(CONFIG_OF)
1746+
static const struct of_device_id max98088_of_match[] = {
1747+
{ .compatible = "maxim,max98088" },
1748+
{ .compatible = "maxim,max98089" },
1749+
{ }
1750+
};
1751+
MODULE_DEVICE_TABLE(of, max98088_of_match);
1752+
#endif
1753+
17451754
static struct i2c_driver max98088_i2c_driver = {
17461755
.driver = {
17471756
.name = "max98088",
1757+
.of_match_table = of_match_ptr(max98088_of_match),
17481758
},
17491759
.probe = max98088_i2c_probe,
17501760
.id_table = max98088_i2c_id,

0 commit comments

Comments
 (0)