Source
301
301
return 0;
302
302
}
303
303
304
304
static const struct i2c_device_id retu_id[] = {
305
305
{ "retu", 0 },
306
306
{ "tahvo", 0 },
307
307
{ }
308
308
};
309
309
MODULE_DEVICE_TABLE(i2c, retu_id);
310
310
311
+
static const struct of_device_id retu_of_match[] = {
312
+
{ .compatible = "nokia,retu" },
313
+
{ .compatible = "nokia,tahvo" },
314
+
{ }
315
+
};
316
+
MODULE_DEVICE_TABLE(of, retu_of_match);
317
+
311
318
static struct i2c_driver retu_driver = {
312
319
.driver = {
313
320
.name = "retu-mfd",
321
+
.of_match_table = retu_of_match,
314
322
},
315
323
.probe = retu_probe,
316
324
.remove = retu_remove,
317
325
.id_table = retu_id,
318
326
};
319
327
module_i2c_driver(retu_driver);
320
328
321
329
MODULE_DESCRIPTION("Retu MFD driver");
322
330
MODULE_AUTHOR("Juha Yrjölä");
323
331
MODULE_AUTHOR("David Weinehall");