diff options
author | Andreas Färber <[email protected]> | 2018-09-25 16:23:49 +0200 |
---|---|---|
committer | Mark Brown <[email protected]> | 2018-09-25 10:24:44 -0700 |
commit | 85aa0fe73edd856365d074a5aa38c614c8b2ca45 (patch) | |
tree | e7f15d1470498ec9641ec83163ffff41e2adc895 | |
parent | 02a9fad843d5f86b5afe5e156f09ea87fe24d9c9 (diff) |
ASoC: max98088: add OF support
MAX98088 is an older version of the MAX98089 device.
Signed-off-by: Andreas Färber <[email protected]>
[[email protected]: add CONFIG_OF compile switch]
[[email protected]: adapt commit message]
Signed-off-by: Marco Felsch <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
-rw-r--r-- | sound/soc/codecs/max98088.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index fb515aaa54fc..9450d5d9c492 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -1742,9 +1742,19 @@ static const struct i2c_device_id max98088_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, max98088_i2c_id); +#if defined(CONFIG_OF) +static const struct of_device_id max98088_of_match[] = { + { .compatible = "maxim,max98088" }, + { .compatible = "maxim,max98089" }, + { } +}; +MODULE_DEVICE_TABLE(of, max98088_of_match); +#endif + static struct i2c_driver max98088_i2c_driver = { .driver = { .name = "max98088", + .of_match_table = of_match_ptr(max98088_of_match), }, .probe = max98088_i2c_probe, .id_table = max98088_i2c_id, |