Skip to content

Commit 3250077

Browse files
committed
media: i2c: dw9719: Add an of_match_table
Allow the dw9719 driver to be attached via FDT. Signed-off-by: Val Packett <[email protected]>
1 parent 8f7f3e0 commit 3250077

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/media/i2c/dw9719.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,22 @@ static const struct i2c_device_id dw9719_id_table[] = {
421421
};
422422
MODULE_DEVICE_TABLE(i2c, dw9719_id_table);
423423

424+
static const struct of_device_id dw9719_of_table[] = {
425+
{ .compatible = "dongwoon,dw9718s", .data = (const void*)DW9718S },
426+
{ .compatible = "dongwoon,dw9719", .data = (const void*)DW9719 },
427+
{ .compatible = "dongwoon,dw9761", .data = (const void*)DW9761 },
428+
{ { 0 } }
429+
};
430+
MODULE_DEVICE_TABLE(of, dw9719_of_table);
431+
424432
static DEFINE_RUNTIME_DEV_PM_OPS(dw9719_pm_ops, dw9719_suspend, dw9719_resume,
425433
NULL);
426434

427435
static struct i2c_driver dw9719_i2c_driver = {
428436
.driver = {
429437
.name = "dw9719",
430438
.pm = pm_sleep_ptr(&dw9719_pm_ops),
439+
.of_match_table = dw9719_of_table,
431440
},
432441
.probe = dw9719_probe,
433442
.remove = dw9719_remove,

0 commit comments

Comments
 (0)