Skip to content

Commit fdbccac

Browse files
valpackettAndré Apitzsch
authored andcommitted
media: i2c: dw9719: Add an of_match_table
Allow the dw9719 driver to be attached via FDT. Signed-off-by: Val Packett <[email protected]> Signed-off-by: André Apitzsch <[email protected]>
1 parent 78e4054 commit fdbccac

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
@@ -419,13 +419,22 @@ static const struct i2c_device_id dw9719_id_table[] = {
419419
};
420420
MODULE_DEVICE_TABLE(i2c, dw9719_id_table);
421421

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

425433
static struct i2c_driver dw9719_i2c_driver = {
426434
.driver = {
427435
.name = "dw9719",
428436
.pm = pm_sleep_ptr(&dw9719_pm_ops),
437+
.of_match_table = dw9719_of_table,
429438
},
430439
.probe = dw9719_probe,
431440
.remove = dw9719_remove,

0 commit comments

Comments
 (0)