summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorPawe? Chmiel <pawel.mikolaj.chmiel@gmail.com>2018-12-07 11:58:09 -0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-01-21 15:34:16 -0200
commit95f9db59d856010e5c28813263fbdd7d70159f77 (patch)
tree02c8191848e4f56f36ca742241aa8e9dd4e3e304 /drivers/media/radio
parent526daee7301d8ec86d8de0698d4c9ada185c5470 (diff)
downloadlinux-95f9db59d856010e5c28813263fbdd7d70159f77.tar.gz
linux-95f9db59d856010e5c28813263fbdd7d70159f77.tar.bz2
linux-95f9db59d856010e5c28813263fbdd7d70159f77.zip
media: si470x-i2c: Add device tree support
This commit enables device tree support adding simple of_match table. Signed-off-by: Pawe? Chmiel <pawel.mikolaj.chmiel@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r--drivers/media/radio/si470x/radio-si470x-i2c.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c
index 9751ea1d80be..250828ddb5fa 100644
--- a/drivers/media/radio/si470x/radio-si470x-i2c.c
+++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
@@ -527,6 +527,13 @@ static int si470x_i2c_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(si470x_i2c_pm, si470x_i2c_suspend, si470x_i2c_resume);
#endif
+#if IS_ENABLED(CONFIG_OF)
+static const struct of_device_id si470x_of_match[] = {
+ { .compatible = "silabs,si470x" },
+ { },
+};
+MODULE_DEVICE_TABLE(of, si470x_of_match);
+#endif
/*
* si470x_i2c_driver - i2c driver interface
@@ -534,6 +541,7 @@ static SIMPLE_DEV_PM_OPS(si470x_i2c_pm, si470x_i2c_suspend, si470x_i2c_resume);
static struct i2c_driver si470x_i2c_driver = {
.driver = {
.name = "si470x",
+ .of_match_table = of_match_ptr(si470x_of_match),
#ifdef CONFIG_PM_SLEEP
.pm = &si470x_i2c_pm,
#endif