Skip to content

Commit a469158

Browse files
André Apitzschbroonie
authored andcommitted
regulator: tps65132: Add of_match table
Add of_match table for "ti,tps65132" compatible string. This fixes automatic driver loading when using device-tree, and if built as a module like major linux distributions do. Signed-off-by: André Apitzsch <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4cece76 commit a469158

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/regulator/tps65132-regulator.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,17 @@ static const struct i2c_device_id tps65132_id[] = {
267267
};
268268
MODULE_DEVICE_TABLE(i2c, tps65132_id);
269269

270+
static const struct of_device_id __maybe_unused tps65132_of_match[] = {
271+
{ .compatible = "ti,tps65132" },
272+
{},
273+
};
274+
MODULE_DEVICE_TABLE(of, tps65132_of_match);
275+
270276
static struct i2c_driver tps65132_i2c_driver = {
271277
.driver = {
272278
.name = "tps65132",
273279
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
280+
.of_match_table = of_match_ptr(tps65132_of_match),
274281
},
275282
.probe = tps65132_probe,
276283
.id_table = tps65132_id,

0 commit comments

Comments
 (0)