提交 abbf043b 编写于 作者: J Javier Martinez Canillas 提交者: Mark Brown

regulator: mt6397: Add OF match table

The Documentation/devicetree/bindings/regulator/mt6397-regulator.txt doc
mentions that a compatible "mediatek,mt6397-regulator" is required for
the MT6397 device node but the driver doesn't provide a OF match table so
the platform bus .match fallbacks to match using the driver name instead.

This also means that module auto-loading is broken for this driver since
the MFD driver that register the device, has a .of_compatible set so the
platform .uevent callback reports a OF modalias that's not in the module.
Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 288a89bf
...@@ -323,9 +323,16 @@ static const struct platform_device_id mt6397_platform_ids[] = { ...@@ -323,9 +323,16 @@ static const struct platform_device_id mt6397_platform_ids[] = {
}; };
MODULE_DEVICE_TABLE(platform, mt6397_platform_ids); MODULE_DEVICE_TABLE(platform, mt6397_platform_ids);
static const struct of_device_id mt6397_of_match[] = {
{ .compatible = "mediatek,mt6397-regulator", },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, mt6397_of_match);
static struct platform_driver mt6397_regulator_driver = { static struct platform_driver mt6397_regulator_driver = {
.driver = { .driver = {
.name = "mt6397-regulator", .name = "mt6397-regulator",
.of_match_table = of_match_ptr(mt6397_of_match),
}, },
.probe = mt6397_regulator_probe, .probe = mt6397_regulator_probe,
.id_table = mt6397_platform_ids, .id_table = mt6397_platform_ids,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册