Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1316762
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] regulator: mt6397: Add OF match table |
| Date | 2016-01-25 15:40 +0100 |
| Message-ID | <qUQtc-5oH-7@gated-at.bofh.it> (permalink) |
| References | <qUQtb-5oH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/regulator/mt6397-regulator.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c
index 585f0399a36b..17a5b6c2d6a9 100644
--- a/drivers/regulator/mt6397-regulator.c
+++ b/drivers/regulator/mt6397-regulator.c
@@ -323,9 +323,16 @@ static const struct platform_device_id 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 = {
.driver = {
.name = "mt6397-regulator",
+ .of_match_table = of_match_ptr(mt6397_of_match),
},
.probe = mt6397_regulator_probe,
.id_table = mt6397_platform_ids,
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] regulator: mt6397: Add platform and OF tables and fix module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-25 15:40 +0100
[PATCH 2/2] regulator: mt6397: Add OF match table Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-25 15:40 +0100
Applied "regulator: mt6397: Add OF match table" to the regulator tree Mark Brown <broonie@kernel.org> - 2016-01-27 19:40 +0100
[PATCH 1/2] regulator: mt6397: Add platform device ID table Javier Martinez Canillas <javier@osg.samsung.com> - 2016-01-25 15:40 +0100
Applied "regulator: mt6397: Add platform device ID table" to the regulator tree Mark Brown <broonie@kernel.org> - 2016-01-27 19:40 +0100
csiph-web