From: André Apitzsch <git@apitzsch.eu>
Add of_match table for "dongwoon,dw9719" and "dongwoon,dw9761"
compatible string. This fixes automatic driver loading when using a
device-tree, and if built as a module like major linux distributions do.
Signed-off-by: André Apitzsch <git@apitzsch.eu>
---
drivers/media/i2c/dw9719.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/media/i2c/dw9719.c b/drivers/media/i2c/dw9719.c
index 032fbcb981f20f4e93202415e62f67379897a048..6c76212d4c698462a9128d26ef95f0eccb243c7c 100644
--- a/drivers/media/i2c/dw9719.c
+++ b/drivers/media/i2c/dw9719.c
@@ -360,6 +360,13 @@ static const struct i2c_device_id dw9719_id_table[] = {
};
MODULE_DEVICE_TABLE(i2c, dw9719_id_table);
+static const struct of_device_id dw9719_of_table[] = {
+ { .compatible = "dongwoon,dw9719" },
+ { .compatible = "dongwoon,dw9761" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, dw9719_of_table);
+
static DEFINE_RUNTIME_DEV_PM_OPS(dw9719_pm_ops, dw9719_suspend, dw9719_resume,
NULL);
@@ -367,6 +374,7 @@ static struct i2c_driver dw9719_i2c_driver = {
.driver = {
.name = "dw9719",
.pm = pm_sleep_ptr(&dw9719_pm_ops),
+ .of_match_table = of_match_ptr(dw9719_of_table),
},
.probe = dw9719_probe,
.remove = dw9719_remove,
--
2.48.1
Hi André,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 8f6629c004b193d23612641c3607e785819e97ab]
url: https://github.com/intel-lab-lkp/linux/commits/Andr-Apitzsch-via-B4-Relay/dt-bindings-media-i2c-Add-DW9719-and-DW9761-VCM/20250210-055506
base: 8f6629c004b193d23612641c3607e785819e97ab
patch link: https://lore.kernel.org/r/20250209-dw9761dts-v3-2-14d3f00f0585%40apitzsch.eu
patch subject: [PATCH v3 2/2] media: i2c: dw9719: Add of_match table
config: x86_64-randconfig-001-20250211 (https://download.01.org/0day-ci/archive/20250211/202502110539.EO1iB2au-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250211/202502110539.EO1iB2au-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502110539.EO1iB2au-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/media/i2c/dw9719.c:12:
In file included from include/linux/i2c.h:19:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:21:
In file included from include/linux/mm.h:2224:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/media/i2c/dw9719.c:363:34: warning: unused variable 'dw9719_of_table' [-Wunused-const-variable]
363 | static const struct of_device_id dw9719_of_table[] = {
| ^~~~~~~~~~~~~~~
4 warnings generated.
vim +/dw9719_of_table +363 drivers/media/i2c/dw9719.c
362
> 363 static const struct of_device_id dw9719_of_table[] = {
364 { .compatible = "dongwoon,dw9719" },
365 { .compatible = "dongwoon,dw9761" },
366 { }
367 };
368 MODULE_DEVICE_TABLE(of, dw9719_of_table);
369
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi André,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 8f6629c004b193d23612641c3607e785819e97ab]
url: https://github.com/intel-lab-lkp/linux/commits/Andr-Apitzsch-via-B4-Relay/dt-bindings-media-i2c-Add-DW9719-and-DW9761-VCM/20250210-055506
base: 8f6629c004b193d23612641c3607e785819e97ab
patch link: https://lore.kernel.org/r/20250209-dw9761dts-v3-2-14d3f00f0585%40apitzsch.eu
patch subject: [PATCH v3 2/2] media: i2c: dw9719: Add of_match table
config: x86_64-randconfig-161-20250210 (https://download.01.org/0day-ci/archive/20250210/202502101730.OtKFel6n-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250210/202502101730.OtKFel6n-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502101730.OtKFel6n-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/dw9719.c:363:34: warning: 'dw9719_of_table' defined but not used [-Wunused-const-variable=]
363 | static const struct of_device_id dw9719_of_table[] = {
| ^~~~~~~~~~~~~~~
vim +/dw9719_of_table +363 drivers/media/i2c/dw9719.c
362
> 363 static const struct of_device_id dw9719_of_table[] = {
364 { .compatible = "dongwoon,dw9719" },
365 { .compatible = "dongwoon,dw9761" },
366 { }
367 };
368 MODULE_DEVICE_TABLE(of, dw9719_of_table);
369
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi André, On Sun, Feb 09, 2025 at 10:51:58PM +0100, André Apitzsch via B4 Relay wrote: > + .of_match_table = of_match_ptr(dw9719_of_table), Please drop of_match_ptr(), that fixes the problem. -- Sakari Ailus
© 2016 - 2026 Red Hat, Inc.