Commit 95f9db59 authored by Pawe? Chmiel's avatar Pawe? Chmiel Committed by Mauro Carvalho Chehab

media: si470x-i2c: Add device tree support

This commit enables device tree support adding simple of_match table.
Signed-off-by: default avatarPawe? Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 526daee7
...@@ -527,6 +527,13 @@ static int si470x_i2c_resume(struct device *dev) ...@@ -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); static SIMPLE_DEV_PM_OPS(si470x_i2c_pm, si470x_i2c_suspend, si470x_i2c_resume);
#endif #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 * si470x_i2c_driver - i2c driver interface
...@@ -534,6 +541,7 @@ static SIMPLE_DEV_PM_OPS(si470x_i2c_pm, si470x_i2c_suspend, si470x_i2c_resume); ...@@ -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 = { static struct i2c_driver si470x_i2c_driver = {
.driver = { .driver = {
.name = "si470x", .name = "si470x",
.of_match_table = of_match_ptr(si470x_of_match),
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
.pm = &si470x_i2c_pm, .pm = &si470x_i2c_pm,
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment