|
Matthias Brugger |
b8fd94 |
From 72e1f0935f4ff9db08a555fa0c00175877069834 Mon Sep 17 00:00:00 2001
|
|
Matthias Brugger |
b8fd94 |
From: Matthias Brugger <mbrugger@suse.com>
|
|
Matthias Brugger |
b8fd94 |
Date: Sat, 9 Jan 2021 02:45:45 +0100
|
|
Matthias Brugger |
b8fd94 |
Subject: regulator: mt6323: Add OF match table
|
|
Matthias Brugger |
b8fd94 |
Patch-mainline: Submitted, 20210109112612.1221-3-matthias.bgg@kernel.org
|
|
Matthias Brugger |
b8fd94 |
References: bsc#1180731
|
|
Matthias Brugger |
b8fd94 |
|
|
Matthias Brugger |
b8fd94 |
The binding documentation mentions that a compatible is required for the
|
|
Matthias Brugger |
b8fd94 |
MT6323 device node. But the driver does not provide a OF match table.
|
|
Matthias Brugger |
b8fd94 |
This way auto-loading is broken as the MFD driver that registers the
|
|
Matthias Brugger |
b8fd94 |
device has a .of_compatible set which makes the platform .uevent
|
|
Matthias Brugger |
b8fd94 |
callback report a OF modalias, but that's not in the module.
|
|
Matthias Brugger |
b8fd94 |
|
|
Matthias Brugger |
b8fd94 |
Fixes: 2fdf82923618 ("regulator: mt6323: Add support for MT6323 regulator")
|
|
Matthias Brugger |
b8fd94 |
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
|
|
Matthias Brugger |
b8fd94 |
---
|
|
Matthias Brugger |
b8fd94 |
drivers/regulator/mt6323-regulator.c | 9 +++++++++
|
|
Matthias Brugger |
b8fd94 |
1 file changed, 9 insertions(+)
|
|
Matthias Brugger |
b8fd94 |
|
|
Matthias Brugger |
b8fd94 |
diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c
|
|
Matthias Brugger |
b8fd94 |
index ff9016170db3..646742d4db74 100644
|
|
Matthias Brugger |
b8fd94 |
--- a/drivers/regulator/mt6323-regulator.c
|
|
Matthias Brugger |
b8fd94 |
+++ b/drivers/regulator/mt6323-regulator.c
|
|
Matthias Brugger |
b8fd94 |
@@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
|
|
Matthias Brugger |
b8fd94 |
};
|
|
Matthias Brugger |
b8fd94 |
MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
|
|
Matthias Brugger |
b8fd94 |
|
|
Matthias Brugger |
b8fd94 |
+#ifdef CONFIG_OF
|
|
Matthias Brugger |
b8fd94 |
+static const struct of_device_id mt6323_of_match[] = {
|
|
Matthias Brugger |
b8fd94 |
+ { .compatible = "mediatek,mt6323-regulator", },
|
|
Matthias Brugger |
b8fd94 |
+ { /* sentinel */ },
|
|
Matthias Brugger |
b8fd94 |
+};
|
|
Matthias Brugger |
b8fd94 |
+MODULE_DEVICE_TABLE(of, mt6323_of_match);
|
|
Matthias Brugger |
b8fd94 |
+#endif
|
|
Matthias Brugger |
b8fd94 |
+
|
|
Matthias Brugger |
b8fd94 |
static struct platform_driver mt6323_regulator_driver = {
|
|
Matthias Brugger |
b8fd94 |
.driver = {
|
|
Matthias Brugger |
b8fd94 |
.name = "mt6323-regulator",
|
|
Matthias Brugger |
b8fd94 |
+ .of_match_table = of_match_ptr(mt6323_of_match),
|
|
Matthias Brugger |
b8fd94 |
},
|
|
Matthias Brugger |
b8fd94 |
.probe = mt6323_regulator_probe,
|
|
Matthias Brugger |
b8fd94 |
.id_table = mt6323_platform_ids,
|
|
Matthias Brugger |
b8fd94 |
--
|
|
Matthias Brugger |
b8fd94 |
2.29.2
|
|
Matthias Brugger |
b8fd94 |
|