Skip to content

Commit 3d6954d

Browse files
mszyprowchanwoochoi
authored andcommitted
extcon: max14577: Add proper dt-compatible strings
Add device tree compatible strings and create proper modalias structures to let this driver load automatically if compiled as module, because max14577 MFD driver creates MFD cells with such compatible strings. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
1 parent bc84cff commit 3d6954d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎drivers/extcon/extcon-max14577.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,9 +782,19 @@ static const struct platform_device_id max14577_muic_id[] = {
782782
};
783783
MODULE_DEVICE_TABLE(platform, max14577_muic_id);
784784

785+
static const struct of_device_id of_max14577_muic_dt_match[] = {
786+
{ .compatible = "maxim,max14577-muic",
787+
.data = (void *)MAXIM_DEVICE_TYPE_MAX14577, },
788+
{ .compatible = "maxim,max77836-muic",
789+
.data = (void *)MAXIM_DEVICE_TYPE_MAX77836, },
790+
{ },
791+
};
792+
MODULE_DEVICE_TABLE(of, of_max14577_muic_dt_match);
793+
785794
static struct platform_driver max14577_muic_driver = {
786795
.driver = {
787796
.name = "max14577-muic",
797+
.of_match_table = of_max14577_muic_dt_match,
788798
},
789799
.probe = max14577_muic_probe,
790800
.remove = max14577_muic_remove,

0 commit comments

Comments
 (0)