* [PATCH] regulator: Convert to subsys_platform_driver()
@ 2026-11-04 11:33 Peng Fan (OSS)
2026-11-04 11:49 ` Charles Keepax
2026-11-07 14:18 ` Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2026-11-04 11:33 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Support Opensource, Chanwoo Choi,
Krzysztof Kozlowski, Aaro Koskinen, Andreas Kemnade,
Kevin Hilman, Roger Quadros, Tony Lindgren
Cc: linux-kernel, linux-omap, patches
From: Peng Fan <peng.fan@nxp.com>
Replace the open-coded subsys_initcall()/module_exit() platform driver
registration with subsys_platform_driver().
No functional change.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/regulator/88pm8607.c | 13 +------------
drivers/regulator/aat2870-regulator.c | 13 +------------
drivers/regulator/as3711-regulator.c | 13 +------------
drivers/regulator/da903x-regulator.c | 13 +------------
drivers/regulator/da9052-regulator.c | 13 +------------
drivers/regulator/da9055-regulator.c | 13 +------------
drivers/regulator/da9062-regulator.c | 13 +------------
drivers/regulator/da9063-regulator.c | 13 +------------
drivers/regulator/fixed.c | 13 +------------
drivers/regulator/gpio-regulator.c | 13 +------------
drivers/regulator/lp8788-buck.c | 13 +------------
drivers/regulator/max77693-regulator.c | 13 +------------
drivers/regulator/max8907-regulator.c | 14 +-------------
drivers/regulator/max8925-regulator.c | 13 +------------
drivers/regulator/max8997-regulator.c | 13 +------------
drivers/regulator/max8998.c | 13 +------------
drivers/regulator/mc13783-regulator.c | 13 +------------
drivers/regulator/mc13892-regulator.c | 13 +------------
drivers/regulator/palmas-regulator.c | 13 +------------
drivers/regulator/rc5t583-regulator.c | 13 +------------
drivers/regulator/tps6105x-regulator.c | 13 +------------
drivers/regulator/tps6507x-regulator.c | 13 +------------
drivers/regulator/tps65090-regulator.c | 13 +------------
drivers/regulator/tps65217-regulator.c | 13 +------------
drivers/regulator/tps6586x-regulator.c | 13 +------------
drivers/regulator/tps65910-regulator.c | 13 +------------
drivers/regulator/tps68470-regulator.c | 12 +-----------
drivers/regulator/wm8350-regulator.c | 13 +------------
drivers/regulator/wm8400-regulator.c | 13 +------------
29 files changed, 29 insertions(+), 348 deletions(-)
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index 969554725a67..b740b4883812 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -386,18 +386,7 @@ static struct platform_driver pm8607_regulator_driver = {
.probe = pm8607_regulator_probe,
.id_table = pm8607_regulator_driver_ids,
};
-
-static int __init pm8607_regulator_init(void)
-{
- return platform_driver_register(&pm8607_regulator_driver);
-}
-subsys_initcall(pm8607_regulator_init);
-
-static void __exit pm8607_regulator_exit(void)
-{
- platform_driver_unregister(&pm8607_regulator_driver);
-}
-module_exit(pm8607_regulator_exit);
+subsys_platform_driver(pm8607_regulator_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
index 970d86f2bbb8..52c08e6c4803 100644
--- a/drivers/regulator/aat2870-regulator.c
+++ b/drivers/regulator/aat2870-regulator.c
@@ -182,18 +182,7 @@ static struct platform_driver aat2870_regulator_driver = {
},
.probe = aat2870_regulator_probe,
};
-
-static int __init aat2870_regulator_init(void)
-{
- return platform_driver_register(&aat2870_regulator_driver);
-}
-subsys_initcall(aat2870_regulator_init);
-
-static void __exit aat2870_regulator_exit(void)
-{
- platform_driver_unregister(&aat2870_regulator_driver);
-}
-module_exit(aat2870_regulator_exit);
+subsys_platform_driver(aat2870_regulator_driver);
MODULE_DESCRIPTION("AnalogicTech AAT2870 Regulator");
MODULE_LICENSE("GPL");
diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c
index 0431a732cd78..22fa51ce22ee 100644
--- a/drivers/regulator/as3711-regulator.c
+++ b/drivers/regulator/as3711-regulator.c
@@ -247,18 +247,7 @@ static struct platform_driver as3711_regulator_driver = {
},
.probe = as3711_regulator_probe,
};
-
-static int __init as3711_regulator_init(void)
-{
- return platform_driver_register(&as3711_regulator_driver);
-}
-subsys_initcall(as3711_regulator_init);
-
-static void __exit as3711_regulator_exit(void)
-{
- platform_driver_unregister(&as3711_regulator_driver);
-}
-module_exit(as3711_regulator_exit);
+subsys_platform_driver(as3711_regulator_driver);
MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
MODULE_DESCRIPTION("AS3711 regulator driver");
diff --git a/drivers/regulator/da903x-regulator.c b/drivers/regulator/da903x-regulator.c
index 2f85897183b3..05629667dfc3 100644
--- a/drivers/regulator/da903x-regulator.c
+++ b/drivers/regulator/da903x-regulator.c
@@ -475,18 +475,7 @@ static struct platform_driver da903x_regulator_driver = {
},
.probe = da903x_regulator_probe,
};
-
-static int __init da903x_regulator_init(void)
-{
- return platform_driver_register(&da903x_regulator_driver);
-}
-subsys_initcall(da903x_regulator_init);
-
-static void __exit da903x_regulator_exit(void)
-{
- platform_driver_unregister(&da903x_regulator_driver);
-}
-module_exit(da903x_regulator_exit);
+subsys_platform_driver(da903x_regulator_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index fbebe538a648..412eb27c1067 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -441,18 +441,7 @@ static struct platform_driver da9052_regulator_driver = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
-
-static int __init da9052_regulator_init(void)
-{
- return platform_driver_register(&da9052_regulator_driver);
-}
-subsys_initcall(da9052_regulator_init);
-
-static void __exit da9052_regulator_exit(void)
-{
- platform_driver_unregister(&da9052_regulator_driver);
-}
-module_exit(da9052_regulator_exit);
+subsys_platform_driver(da9052_regulator_driver);
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
MODULE_DESCRIPTION("Power Regulator driver for Dialog DA9052 PMIC");
diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c
index a0d3414aa79e..29756eec6502 100644
--- a/drivers/regulator/da9055-regulator.c
+++ b/drivers/regulator/da9055-regulator.c
@@ -579,18 +579,7 @@ static struct platform_driver da9055_regulator_driver = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
-
-static int __init da9055_regulator_init(void)
-{
- return platform_driver_register(&da9055_regulator_driver);
-}
-subsys_initcall(da9055_regulator_init);
-
-static void __exit da9055_regulator_exit(void)
-{
- platform_driver_unregister(&da9055_regulator_driver);
-}
-module_exit(da9055_regulator_exit);
+subsys_platform_driver(da9055_regulator_driver);
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
MODULE_DESCRIPTION("Power Regulator driver for Dialog DA9055 PMIC");
diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
index e0c96f10e570..7f0604327358 100644
--- a/drivers/regulator/da9062-regulator.c
+++ b/drivers/regulator/da9062-regulator.c
@@ -1036,18 +1036,7 @@ static struct platform_driver da9062_regulator_driver = {
},
.probe = da9062_regulator_probe,
};
-
-static int __init da9062_regulator_init(void)
-{
- return platform_driver_register(&da9062_regulator_driver);
-}
-subsys_initcall(da9062_regulator_init);
-
-static void __exit da9062_regulator_cleanup(void)
-{
- platform_driver_unregister(&da9062_regulator_driver);
-}
-module_exit(da9062_regulator_cleanup);
+subsys_platform_driver(da9062_regulator_driver);
/* Module information */
MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>");
diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index bf34ea440d77..b4680f335961 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -1064,18 +1064,7 @@ static struct platform_driver da9063_regulator_driver = {
},
.probe = da9063_regulator_probe,
};
-
-static int __init da9063_regulator_init(void)
-{
- return platform_driver_register(&da9063_regulator_driver);
-}
-subsys_initcall(da9063_regulator_init);
-
-static void __exit da9063_regulator_cleanup(void)
-{
- platform_driver_unregister(&da9063_regulator_driver);
-}
-module_exit(da9063_regulator_cleanup);
+subsys_platform_driver(da9063_regulator_driver);
/* Module information */
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index f797cb504b9a..3f95ac2b0d29 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -388,18 +388,7 @@ static struct platform_driver regulator_fixed_voltage_driver = {
.of_match_table = of_match_ptr(fixed_of_match),
},
};
-
-static int __init regulator_fixed_voltage_init(void)
-{
- return platform_driver_register(®ulator_fixed_voltage_driver);
-}
-subsys_initcall(regulator_fixed_voltage_init);
-
-static void __exit regulator_fixed_voltage_exit(void)
-{
- platform_driver_unregister(®ulator_fixed_voltage_driver);
-}
-module_exit(regulator_fixed_voltage_exit);
+subsys_platform_driver(regulator_fixed_voltage_driver);
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_DESCRIPTION("Fixed voltage regulator");
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 6351ceefdb3e..e16eedb27b1c 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -370,18 +370,7 @@ static struct platform_driver gpio_regulator_driver = {
.of_match_table = of_match_ptr(regulator_gpio_of_match),
},
};
-
-static int __init gpio_regulator_init(void)
-{
- return platform_driver_register(&gpio_regulator_driver);
-}
-subsys_initcall(gpio_regulator_init);
-
-static void __exit gpio_regulator_exit(void)
-{
- platform_driver_unregister(&gpio_regulator_driver);
-}
-module_exit(gpio_regulator_exit);
+subsys_platform_driver(gpio_regulator_driver);
MODULE_AUTHOR("Heiko Stuebner <heiko@sntech.de>");
MODULE_DESCRIPTION("gpio voltage regulator");
diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c
index 2ade249ab6df..6028c2ac11ec 100644
--- a/drivers/regulator/lp8788-buck.c
+++ b/drivers/regulator/lp8788-buck.c
@@ -522,18 +522,7 @@ static struct platform_driver lp8788_buck_driver = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
-
-static int __init lp8788_buck_init(void)
-{
- return platform_driver_register(&lp8788_buck_driver);
-}
-subsys_initcall(lp8788_buck_init);
-
-static void __exit lp8788_buck_exit(void)
-{
- platform_driver_unregister(&lp8788_buck_driver);
-}
-module_exit(lp8788_buck_exit);
+subsys_platform_driver(lp8788_buck_driver);
MODULE_DESCRIPTION("TI LP8788 BUCK Driver");
MODULE_AUTHOR("Milo Kim");
diff --git a/drivers/regulator/max77693-regulator.c b/drivers/regulator/max77693-regulator.c
index a8b3a2058d34..cfadf33574c3 100644
--- a/drivers/regulator/max77693-regulator.c
+++ b/drivers/regulator/max77693-regulator.c
@@ -286,18 +286,7 @@ static struct platform_driver max77693_pmic_driver = {
.probe = max77693_pmic_probe,
.id_table = max77693_pmic_id,
};
-
-static int __init max77693_pmic_init(void)
-{
- return platform_driver_register(&max77693_pmic_driver);
-}
-subsys_initcall(max77693_pmic_init);
-
-static void __exit max77693_pmic_cleanup(void)
-{
- platform_driver_unregister(&max77693_pmic_driver);
-}
-module_exit(max77693_pmic_cleanup);
+subsys_platform_driver(max77693_pmic_driver);
MODULE_DESCRIPTION("MAXIM 77693/77843 regulator driver");
MODULE_AUTHOR("Jonghwa Lee <jonghwa3.lee@samsung.com>");
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index e59aa7a3ee54..f8f0a50161c6 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -377,19 +377,7 @@ static struct platform_driver max8907_regulator_driver = {
.probe = max8907_regulator_probe,
};
-static int __init max8907_regulator_init(void)
-{
- return platform_driver_register(&max8907_regulator_driver);
-}
-
-subsys_initcall(max8907_regulator_init);
-
-static void __exit max8907_reg_exit(void)
-{
- platform_driver_unregister(&max8907_regulator_driver);
-}
-
-module_exit(max8907_reg_exit);
+subsys_platform_driver(max8907_regulator_driver);
MODULE_DESCRIPTION("MAX8907 regulator driver");
MODULE_AUTHOR("Gyungoh Yoo <jack.yoo@maxim-ic.com>");
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index c1532db0a4ee..bdcbc457766c 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -267,18 +267,7 @@ static struct platform_driver max8925_regulator_driver = {
},
.probe = max8925_regulator_probe,
};
-
-static int __init max8925_regulator_init(void)
-{
- return platform_driver_register(&max8925_regulator_driver);
-}
-subsys_initcall(max8925_regulator_init);
-
-static void __exit max8925_regulator_exit(void)
-{
- platform_driver_unregister(&max8925_regulator_driver);
-}
-module_exit(max8925_regulator_exit);
+subsys_platform_driver(max8925_regulator_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
diff --git a/drivers/regulator/max8997-regulator.c b/drivers/regulator/max8997-regulator.c
index e48ba694a906..25aac72b79e7 100644
--- a/drivers/regulator/max8997-regulator.c
+++ b/drivers/regulator/max8997-regulator.c
@@ -1165,18 +1165,7 @@ static struct platform_driver max8997_pmic_driver = {
.probe = max8997_pmic_probe,
.id_table = max8997_pmic_id,
};
-
-static int __init max8997_pmic_init(void)
-{
- return platform_driver_register(&max8997_pmic_driver);
-}
-subsys_initcall(max8997_pmic_init);
-
-static void __exit max8997_pmic_cleanup(void)
-{
- platform_driver_unregister(&max8997_pmic_driver);
-}
-module_exit(max8997_pmic_cleanup);
+subsys_platform_driver(max8997_pmic_driver);
MODULE_DESCRIPTION("MAXIM 8997/8966 Regulator Driver");
MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 90651f4d1828..2eb16fa92b86 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -765,18 +765,7 @@ static struct platform_driver max8998_pmic_driver = {
.probe = max8998_pmic_probe,
.id_table = max8998_pmic_id,
};
-
-static int __init max8998_pmic_init(void)
-{
- return platform_driver_register(&max8998_pmic_driver);
-}
-subsys_initcall(max8998_pmic_init);
-
-static void __exit max8998_pmic_cleanup(void)
-{
- platform_driver_unregister(&max8998_pmic_driver);
-}
-module_exit(max8998_pmic_cleanup);
+subsys_platform_driver(max8998_pmic_driver);
MODULE_DESCRIPTION("MAXIM 8998 voltage regulator driver");
MODULE_AUTHOR("Kyungmin Park <kyungmin.park@samsung.com>");
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index fb3aa1cec1f2..449f4e3621c1 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -459,18 +459,7 @@ static struct platform_driver mc13783_regulator_driver = {
},
.probe = mc13783_regulator_probe,
};
-
-static int __init mc13783_regulator_init(void)
-{
- return platform_driver_register(&mc13783_regulator_driver);
-}
-subsys_initcall(mc13783_regulator_init);
-
-static void __exit mc13783_regulator_exit(void)
-{
- platform_driver_unregister(&mc13783_regulator_driver);
-}
-module_exit(mc13783_regulator_exit);
+subsys_platform_driver(mc13783_regulator_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index b29cf6ba6f12..debec21aaf3c 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -633,18 +633,7 @@ static struct platform_driver mc13892_regulator_driver = {
},
.probe = mc13892_regulator_probe,
};
-
-static int __init mc13892_regulator_init(void)
-{
- return platform_driver_register(&mc13892_regulator_driver);
-}
-subsys_initcall(mc13892_regulator_init);
-
-static void __exit mc13892_regulator_exit(void)
-{
- platform_driver_unregister(&mc13892_regulator_driver);
-}
-module_exit(mc13892_regulator_exit);
+subsys_platform_driver(mc13892_regulator_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Yong Shen <yong.shen@linaro.org>");
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index f82618a70106..bf66cfd11465 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -1668,18 +1668,7 @@ static struct platform_driver palmas_driver = {
},
.probe = palmas_regulators_probe,
};
-
-static int __init palmas_init(void)
-{
- return platform_driver_register(&palmas_driver);
-}
-subsys_initcall(palmas_init);
-
-static void __exit palmas_exit(void)
-{
- platform_driver_unregister(&palmas_driver);
-}
-module_exit(palmas_exit);
+subsys_platform_driver(palmas_driver);
MODULE_AUTHOR("Graeme Gregory <gg@slimlogic.co.uk>");
MODULE_DESCRIPTION("Palmas voltage regulator driver");
diff --git a/drivers/regulator/rc5t583-regulator.c b/drivers/regulator/rc5t583-regulator.c
index a25a141e86c4..fff2b5be5cc1 100644
--- a/drivers/regulator/rc5t583-regulator.c
+++ b/drivers/regulator/rc5t583-regulator.c
@@ -152,18 +152,7 @@ static struct platform_driver rc5t583_regulator_driver = {
},
.probe = rc5t583_regulator_probe,
};
-
-static int __init rc5t583_regulator_init(void)
-{
- return platform_driver_register(&rc5t583_regulator_driver);
-}
-subsys_initcall(rc5t583_regulator_init);
-
-static void __exit rc5t583_regulator_exit(void)
-{
- platform_driver_unregister(&rc5t583_regulator_driver);
-}
-module_exit(rc5t583_regulator_exit);
+subsys_platform_driver(rc5t583_regulator_driver);
MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>");
MODULE_DESCRIPTION("RC5T583 regulator driver");
diff --git a/drivers/regulator/tps6105x-regulator.c b/drivers/regulator/tps6105x-regulator.c
index 7f99f3e90bec..d5a6d3554631 100644
--- a/drivers/regulator/tps6105x-regulator.c
+++ b/drivers/regulator/tps6105x-regulator.c
@@ -97,18 +97,7 @@ static struct platform_driver tps6105x_regulator_driver = {
},
.probe = tps6105x_regulator_probe,
};
-
-static __init int tps6105x_regulator_init(void)
-{
- return platform_driver_register(&tps6105x_regulator_driver);
-}
-subsys_initcall(tps6105x_regulator_init);
-
-static __exit void tps6105x_regulator_exit(void)
-{
- platform_driver_unregister(&tps6105x_regulator_driver);
-}
-module_exit(tps6105x_regulator_exit);
+subsys_platform_driver(tps6105x_regulator_driver);
MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
MODULE_DESCRIPTION("TPS6105x regulator driver");
diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c
index 6655d9c31187..bcfa418a503d 100644
--- a/drivers/regulator/tps6507x-regulator.c
+++ b/drivers/regulator/tps6507x-regulator.c
@@ -442,18 +442,7 @@ static struct platform_driver tps6507x_pmic_driver = {
},
.probe = tps6507x_pmic_probe,
};
-
-static int __init tps6507x_pmic_init(void)
-{
- return platform_driver_register(&tps6507x_pmic_driver);
-}
-subsys_initcall(tps6507x_pmic_init);
-
-static void __exit tps6507x_pmic_cleanup(void)
-{
- platform_driver_unregister(&tps6507x_pmic_driver);
-}
-module_exit(tps6507x_pmic_cleanup);
+subsys_platform_driver(tps6507x_pmic_driver);
MODULE_AUTHOR("Texas Instruments");
MODULE_DESCRIPTION("TPS6507x voltage regulator driver");
diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c
index 8f916ee366e5..8a5e0889551c 100644
--- a/drivers/regulator/tps65090-regulator.c
+++ b/drivers/regulator/tps65090-regulator.c
@@ -515,18 +515,7 @@ static struct platform_driver tps65090_regulator_driver = {
},
.probe = tps65090_regulator_probe,
};
-
-static int __init tps65090_regulator_init(void)
-{
- return platform_driver_register(&tps65090_regulator_driver);
-}
-subsys_initcall(tps65090_regulator_init);
-
-static void __exit tps65090_regulator_exit(void)
-{
- platform_driver_unregister(&tps65090_regulator_driver);
-}
-module_exit(tps65090_regulator_exit);
+subsys_platform_driver(tps65090_regulator_driver);
MODULE_DESCRIPTION("tps65090 regulator driver");
MODULE_AUTHOR("Venu Byravarasu <vbyravarasu@nvidia.com>");
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index b167ba22fe16..f55cc1a8079d 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -262,18 +262,7 @@ static struct platform_driver tps65217_regulator_driver = {
},
.probe = tps65217_regulator_probe,
};
-
-static int __init tps65217_regulator_init(void)
-{
- return platform_driver_register(&tps65217_regulator_driver);
-}
-subsys_initcall(tps65217_regulator_init);
-
-static void __exit tps65217_regulator_exit(void)
-{
- platform_driver_unregister(&tps65217_regulator_driver);
-}
-module_exit(tps65217_regulator_exit);
+subsys_platform_driver(tps65217_regulator_driver);
MODULE_AUTHOR("AnilKumar Ch <anilkumar@ti.com>");
MODULE_DESCRIPTION("TPS65217 voltage regulator driver");
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 1ab5767590f3..a144b4c5ed20 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -524,18 +524,7 @@ static struct platform_driver tps6586x_regulator_driver = {
},
.probe = tps6586x_regulator_probe,
};
-
-static int __init tps6586x_regulator_init(void)
-{
- return platform_driver_register(&tps6586x_regulator_driver);
-}
-subsys_initcall(tps6586x_regulator_init);
-
-static void __exit tps6586x_regulator_exit(void)
-{
- platform_driver_unregister(&tps6586x_regulator_driver);
-}
-module_exit(tps6586x_regulator_exit);
+subsys_platform_driver(tps6586x_regulator_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 3a3027e0b94e..61bb269fc7c6 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -1259,18 +1259,7 @@ static struct platform_driver tps65910_driver = {
.probe = tps65910_probe,
.shutdown = tps65910_shutdown,
};
-
-static int __init tps65910_init(void)
-{
- return platform_driver_register(&tps65910_driver);
-}
-subsys_initcall(tps65910_init);
-
-static void __exit tps65910_cleanup(void)
-{
- platform_driver_unregister(&tps65910_driver);
-}
-module_exit(tps65910_cleanup);
+subsys_platform_driver(tps65910_driver);
MODULE_AUTHOR("Graeme Gregory <gg@slimlogic.co.uk>");
MODULE_DESCRIPTION("TPS65910/TPS65911 voltage regulator driver");
diff --git a/drivers/regulator/tps68470-regulator.c b/drivers/regulator/tps68470-regulator.c
index de7db7690f6b..7aef0c12fbcc 100644
--- a/drivers/regulator/tps68470-regulator.c
+++ b/drivers/regulator/tps68470-regulator.c
@@ -185,17 +185,7 @@ static struct platform_driver tps68470_regulator_driver = {
* registering before the drivers for the camera-sensors which use them bind.
* subsys_initcall() ensures this when the drivers are builtin.
*/
-static int __init tps68470_regulator_init(void)
-{
- return platform_driver_register(&tps68470_regulator_driver);
-}
-subsys_initcall(tps68470_regulator_init);
-
-static void __exit tps68470_regulator_exit(void)
-{
- platform_driver_unregister(&tps68470_regulator_driver);
-}
-module_exit(tps68470_regulator_exit);
+subsys_platform_driver(tps68470_regulator_driver);
MODULE_ALIAS("platform:tps68470-regulator");
MODULE_DESCRIPTION("TPS68470 voltage regulator driver");
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index d09864bae5ef..8dfc24a74765 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1310,18 +1310,7 @@ static struct platform_driver wm8350_regulator_driver = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
-
-static int __init wm8350_regulator_init(void)
-{
- return platform_driver_register(&wm8350_regulator_driver);
-}
-subsys_initcall(wm8350_regulator_init);
-
-static void __exit wm8350_regulator_exit(void)
-{
- platform_driver_unregister(&wm8350_regulator_driver);
-}
-module_exit(wm8350_regulator_exit);
+subsys_platform_driver(wm8350_regulator_driver);
/* Module information */
MODULE_AUTHOR("Liam Girdwood");
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c
index fb3ca7956d00..f9b9973b70e5 100644
--- a/drivers/regulator/wm8400-regulator.c
+++ b/drivers/regulator/wm8400-regulator.c
@@ -257,18 +257,7 @@ int wm8400_register_regulator(struct device *dev, int reg,
return platform_device_register(&wm8400->regulators[reg]);
}
EXPORT_SYMBOL_GPL(wm8400_register_regulator);
-
-static int __init wm8400_regulator_init(void)
-{
- return platform_driver_register(&wm8400_regulator_driver);
-}
-subsys_initcall(wm8400_regulator_init);
-
-static void __exit wm8400_regulator_exit(void)
-{
- platform_driver_unregister(&wm8400_regulator_driver);
-}
-module_exit(wm8400_regulator_exit);
+subsys_platform_driver(wm8400_regulator_driver);
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_DESCRIPTION("WM8400 regulator driver");
--
2.51.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] regulator: Convert to subsys_platform_driver()
2026-11-04 11:33 [PATCH] regulator: Convert to subsys_platform_driver() Peng Fan (OSS)
@ 2026-11-04 11:49 ` Charles Keepax
2026-11-07 14:18 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Charles Keepax @ 2026-11-04 11:49 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Liam Girdwood, Mark Brown, Support Opensource, Chanwoo Choi,
Krzysztof Kozlowski, Aaro Koskinen, Andreas Kemnade,
Kevin Hilman, Roger Quadros, Tony Lindgren, linux-kernel,
linux-omap, patches
On Wed, Nov 04, 2026 at 07:33:52PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Replace the open-coded subsys_initcall()/module_exit() platform driver
> registration with subsys_platform_driver().
>
> No functional change.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/regulator/wm8350-regulator.c | 13 +------------
> drivers/regulator/wm8400-regulator.c | 13 +------------
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] regulator: Convert to subsys_platform_driver()
2026-11-04 11:33 [PATCH] regulator: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-04 11:49 ` Charles Keepax
@ 2026-11-07 14:18 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-11-07 14:18 UTC (permalink / raw)
To: Liam Girdwood, Support Opensource, Chanwoo Choi,
Krzysztof Kozlowski, Aaro Koskinen, Andreas Kemnade,
Kevin Hilman, Roger Quadros, Tony Lindgren, Peng Fan (OSS)
Cc: linux-kernel, linux-omap, patches
On Wed, 04 Nov 2026 19:33:52 +0800, Peng Fan (OSS) wrote:
> regulator: Convert to subsys_platform_driver()
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-7.5
Thanks!
[1/1] regulator: Convert to subsys_platform_driver()
https://git.kernel.org/broonie/regulator/c/2a1984b30e9c
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] regulator: convert to subsys_platform_driver()
2026-11-07 0:28 [PATCH] regulator: convert " Brian Masney
@ 2026-11-07 10:47 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-07 10:47 UTC (permalink / raw)
To: Brian Masney, Liam Girdwood, Mark Brown, Support Opensource,
Chanwoo Choi, Aaro Koskinen, Andreas Kemnade, Kevin Hilman,
Roger Quadros, Tony Lindgren
Cc: linux-kernel, linux-omap, linux-arm-msm, patches
On 07/11/2026 01:28, Brian Masney wrote:
> Reduce boilerplate code in these drivers and convert them over to use
> the macro subsys_platform_driver().
>
> Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] regulator: convert to subsys_platform_driver()
@ 2026-11-07 0:28 Brian Masney
2026-11-07 10:47 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Brian Masney @ 2026-11-07 0:28 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Support Opensource, Chanwoo Choi,
Krzysztof Kozlowski, Aaro Koskinen, Andreas Kemnade,
Kevin Hilman, Roger Quadros, Tony Lindgren
Cc: linux-kernel, linux-omap, linux-arm-msm, patches, Brian Masney
Reduce boilerplate code in these drivers and convert them over to use
the macro subsys_platform_driver().
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/regulator/88pm8607.c | 12 +-----------
drivers/regulator/aat2870-regulator.c | 12 +-----------
drivers/regulator/as3711-regulator.c | 12 +-----------
drivers/regulator/da903x-regulator.c | 12 +-----------
drivers/regulator/da9052-regulator.c | 12 +-----------
drivers/regulator/da9055-regulator.c | 12 +-----------
drivers/regulator/da9062-regulator.c | 12 +-----------
drivers/regulator/da9063-regulator.c | 12 +-----------
drivers/regulator/fixed.c | 12 +-----------
drivers/regulator/gpio-regulator.c | 12 +-----------
drivers/regulator/lp8788-buck.c | 12 +-----------
drivers/regulator/max77693-regulator.c | 12 +-----------
drivers/regulator/max8907-regulator.c | 14 +-------------
drivers/regulator/max8925-regulator.c | 12 +-----------
drivers/regulator/max8997-regulator.c | 12 +-----------
drivers/regulator/max8998.c | 12 +-----------
drivers/regulator/mc13783-regulator.c | 12 +-----------
drivers/regulator/mc13892-regulator.c | 12 +-----------
drivers/regulator/palmas-regulator.c | 12 +-----------
drivers/regulator/qcom_rpm-regulator.c | 12 +-----------
drivers/regulator/qcom_smd-regulator.c | 12 +-----------
drivers/regulator/rc5t583-regulator.c | 12 +-----------
drivers/regulator/tps6105x-regulator.c | 12 +-----------
drivers/regulator/tps6507x-regulator.c | 12 +-----------
drivers/regulator/tps65090-regulator.c | 12 +-----------
drivers/regulator/tps65217-regulator.c | 12 +-----------
drivers/regulator/tps6586x-regulator.c | 12 +-----------
drivers/regulator/tps65910-regulator.c | 12 +-----------
drivers/regulator/tps68470-regulator.c | 12 +-----------
drivers/regulator/twl-regulator.c | 12 +-----------
drivers/regulator/twl6030-regulator.c | 12 +-----------
drivers/regulator/wm8350-regulator.c | 12 +-----------
drivers/regulator/wm8400-regulator.c | 12 +-----------
33 files changed, 33 insertions(+), 365 deletions(-)
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index 969554725a67..a02c21d7f9af 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -387,17 +387,7 @@ static struct platform_driver pm8607_regulator_driver = {
.id_table = pm8607_regulator_driver_ids,
};
-static int __init pm8607_regulator_init(void)
-{
- return platform_driver_register(&pm8607_regulator_driver);
-}
-subsys_initcall(pm8607_regulator_init);
-
-static void __exit pm8607_regulator_exit(void)
-{
- platform_driver_unregister(&pm8607_regulator_driver);
-}
-module_exit(pm8607_regulator_exit);
+subsys_platform_driver(pm8607_regulator_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
index 970d86f2bbb8..5f5ac84c6668 100644
--- a/drivers/regulator/aat2870-regulator.c
+++ b/drivers/regulator/aat2870-regulator.c
@@ -183,17 +183,7 @@ static struct platform_driver aat2870_regulator_driver = {
.probe = aat2870_regulator_probe,
};
-static int __init aat2870_regulator_init(void)
-{
- return platform_driver_register(&aat2870_regulator_driver);
-}
-subsys_initcall(aat2870_regulator_init);
-
-static void __exit aat2870_regulator_exit(void)
-{
- platform_driver_unregister(&aat2870_regulator_driver);
-}
-module_exit(aat2870_regulator_exit);
+subsys_platform_driver(aat2870_regulator_driver);
MODULE_DESCRIPTION("AnalogicTech AAT2870 Regulator");
MODULE_LICENSE("GPL");
diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c
index 0431a732cd78..510c4d5c0935 100644
--- a/drivers/regulator/as3711-regulator.c
+++ b/drivers/regulator/as3711-regulator.c
@@ -248,17 +248,7 @@ static struct platform_driver as3711_regulator_driver = {
.probe = as3711_regulator_probe,
};
-static int __init as3711_regulator_init(void)
-{
- return platform_driver_register(&as3711_regulator_driver);
-}
-subsys_initcall(as3711_regulator_init);
-
-static void __exit as3711_regulator_exit(void)
-{
- platform_driver_unregister(&as3711_regulator_driver);
-}
-module_exit(as3711_regulator_exit);
+subsys_platform_driver(as3711_regulator_driver);
MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de>");
MODULE_DESCRIPTION("AS3711 regulator driver");
diff --git a/drivers/regulator/da903x-regulator.c b/drivers/regulator/da903x-regulator.c
index 2f85897183b3..084868adbff8 100644
--- a/drivers/regulator/da903x-regulator.c
+++ b/drivers/regulator/da903x-regulator.c
@@ -476,17 +476,7 @@ static struct platform_driver da903x_regulator_driver = {
.probe = da903x_regulator_probe,
};
-static int __init da903x_regulator_init(void)
-{
- return platform_driver_register(&da903x_regulator_driver);
-}
-subsys_initcall(da903x_regulator_init);
-
-static void __exit da903x_regulator_exit(void)
-{
- platform_driver_unregister(&da903x_regulator_driver);
-}
-module_exit(da903x_regulator_exit);
+subsys_platform_driver(da903x_regulator_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index fbebe538a648..289711143d76 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -442,17 +442,7 @@ static struct platform_driver da9052_regulator_driver = {
},
};
-static int __init da9052_regulator_init(void)
-{
- return platform_driver_register(&da9052_regulator_driver);
-}
-subsys_initcall(da9052_regulator_init);
-
-static void __exit da9052_regulator_exit(void)
-{
- platform_driver_unregister(&da9052_regulator_driver);
-}
-module_exit(da9052_regulator_exit);
+subsys_platform_driver(da9052_regulator_driver);
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
MODULE_DESCRIPTION("Power Regulator driver for Dialog DA9052 PMIC");
diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c
index a0d3414aa79e..aadc4d762d3f 100644
--- a/drivers/regulator/da9055-regulator.c
+++ b/drivers/regulator/da9055-regulator.c
@@ -580,17 +580,7 @@ static struct platform_driver da9055_regulator_driver = {
},
};
-static int __init da9055_regulator_init(void)
-{
- return platform_driver_register(&da9055_regulator_driver);
-}
-subsys_initcall(da9055_regulator_init);
-
-static void __exit da9055_regulator_exit(void)
-{
- platform_driver_unregister(&da9055_regulator_driver);
-}
-module_exit(da9055_regulator_exit);
+subsys_platform_driver(da9055_regulator_driver);
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
MODULE_DESCRIPTION("Power Regulator driver for Dialog DA9055 PMIC");
diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
index e0c96f10e570..fd7f57991175 100644
--- a/drivers/regulator/da9062-regulator.c
+++ b/drivers/regulator/da9062-regulator.c
@@ -1037,17 +1037,7 @@ static struct platform_driver da9062_regulator_driver = {
.probe = da9062_regulator_probe,
};
-static int __init da9062_regulator_init(void)
-{
- return platform_driver_register(&da9062_regulator_driver);
-}
-subsys_initcall(da9062_regulator_init);
-
-static void __exit da9062_regulator_cleanup(void)
-{
- platform_driver_unregister(&da9062_regulator_driver);
-}
-module_exit(da9062_regulator_cleanup);
+subsys_platform_driver(da9062_regulator_driver);
/* Module information */
MODULE_AUTHOR("S Twiss <stwiss.opensource@diasemi.com>");
diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index bf34ea440d77..6df44d60c927 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -1065,17 +1065,7 @@ static struct platform_driver da9063_regulator_driver = {
.probe = da9063_regulator_probe,
};
-static int __init da9063_regulator_init(void)
-{
- return platform_driver_register(&da9063_regulator_driver);
-}
-subsys_initcall(da9063_regulator_init);
-
-static void __exit da9063_regulator_cleanup(void)
-{
- platform_driver_unregister(&da9063_regulator_driver);
-}
-module_exit(da9063_regulator_cleanup);
+subsys_platform_driver(da9063_regulator_driver);
/* Module information */
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index f797cb504b9a..9d0c0513acfd 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -389,17 +389,7 @@ static struct platform_driver regulator_fixed_voltage_driver = {
},
};
-static int __init regulator_fixed_voltage_init(void)
-{
- return platform_driver_register(®ulator_fixed_voltage_driver);
-}
-subsys_initcall(regulator_fixed_voltage_init);
-
-static void __exit regulator_fixed_voltage_exit(void)
-{
- platform_driver_unregister(®ulator_fixed_voltage_driver);
-}
-module_exit(regulator_fixed_voltage_exit);
+subsys_platform_driver(regulator_fixed_voltage_driver);
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_DESCRIPTION("Fixed voltage regulator");
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 6351ceefdb3e..53e65ae576df 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -371,17 +371,7 @@ static struct platform_driver gpio_regulator_driver = {
},
};
-static int __init gpio_regulator_init(void)
-{
- return platform_driver_register(&gpio_regulator_driver);
-}
-subsys_initcall(gpio_regulator_init);
-
-static void __exit gpio_regulator_exit(void)
-{
- platform_driver_unregister(&gpio_regulator_driver);
-}
-module_exit(gpio_regulator_exit);
+subsys_platform_driver(gpio_regulator_driver);
MODULE_AUTHOR("Heiko Stuebner <heiko@sntech.de>");
MODULE_DESCRIPTION("gpio voltage regulator");
diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c
index 2ade249ab6df..d11b8dfb2656 100644
--- a/drivers/regulator/lp8788-buck.c
+++ b/drivers/regulator/lp8788-buck.c
@@ -523,17 +523,7 @@ static struct platform_driver lp8788_buck_driver = {
},
};
-static int __init lp8788_buck_init(void)
-{
- return platform_driver_register(&lp8788_buck_driver);
-}
-subsys_initcall(lp8788_buck_init);
-
-static void __exit lp8788_buck_exit(void)
-{
- platform_driver_unregister(&lp8788_buck_driver);
-}
-module_exit(lp8788_buck_exit);
+subsys_platform_driver(lp8788_buck_driver);
MODULE_DESCRIPTION("TI LP8788 BUCK Driver");
MODULE_AUTHOR("Milo Kim");
diff --git a/drivers/regulator/max77693-regulator.c b/drivers/regulator/max77693-regulator.c
index a8b3a2058d34..71c03c5db8c3 100644
--- a/drivers/regulator/max77693-regulator.c
+++ b/drivers/regulator/max77693-regulator.c
@@ -287,17 +287,7 @@ static struct platform_driver max77693_pmic_driver = {
.id_table = max77693_pmic_id,
};
-static int __init max77693_pmic_init(void)
-{
- return platform_driver_register(&max77693_pmic_driver);
-}
-subsys_initcall(max77693_pmic_init);
-
-static void __exit max77693_pmic_cleanup(void)
-{
- platform_driver_unregister(&max77693_pmic_driver);
-}
-module_exit(max77693_pmic_cleanup);
+subsys_platform_driver(max77693_pmic_driver);
MODULE_DESCRIPTION("MAXIM 77693/77843 regulator driver");
MODULE_AUTHOR("Jonghwa Lee <jonghwa3.lee@samsung.com>");
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c
index e59aa7a3ee54..f8f0a50161c6 100644
--- a/drivers/regulator/max8907-regulator.c
+++ b/drivers/regulator/max8907-regulator.c
@@ -377,19 +377,7 @@ static struct platform_driver max8907_regulator_driver = {
.probe = max8907_regulator_probe,
};
-static int __init max8907_regulator_init(void)
-{
- return platform_driver_register(&max8907_regulator_driver);
-}
-
-subsys_initcall(max8907_regulator_init);
-
-static void __exit max8907_reg_exit(void)
-{
- platform_driver_unregister(&max8907_regulator_driver);
-}
-
-module_exit(max8907_reg_exit);
+subsys_platform_driver(max8907_regulator_driver);
MODULE_DESCRIPTION("MAX8907 regulator driver");
MODULE_AUTHOR("Gyungoh Yoo <jack.yoo@maxim-ic.com>");
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index c1532db0a4ee..348ab150603b 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -268,17 +268,7 @@ static struct platform_driver max8925_regulator_driver = {
.probe = max8925_regulator_probe,
};
-static int __init max8925_regulator_init(void)
-{
- return platform_driver_register(&max8925_regulator_driver);
-}
-subsys_initcall(max8925_regulator_init);
-
-static void __exit max8925_regulator_exit(void)
-{
- platform_driver_unregister(&max8925_regulator_driver);
-}
-module_exit(max8925_regulator_exit);
+subsys_platform_driver(max8925_regulator_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
diff --git a/drivers/regulator/max8997-regulator.c b/drivers/regulator/max8997-regulator.c
index e48ba694a906..a16c54162153 100644
--- a/drivers/regulator/max8997-regulator.c
+++ b/drivers/regulator/max8997-regulator.c
@@ -1166,17 +1166,7 @@ static struct platform_driver max8997_pmic_driver = {
.id_table = max8997_pmic_id,
};
-static int __init max8997_pmic_init(void)
-{
- return platform_driver_register(&max8997_pmic_driver);
-}
-subsys_initcall(max8997_pmic_init);
-
-static void __exit max8997_pmic_cleanup(void)
-{
- platform_driver_unregister(&max8997_pmic_driver);
-}
-module_exit(max8997_pmic_cleanup);
+subsys_platform_driver(max8997_pmic_driver);
MODULE_DESCRIPTION("MAXIM 8997/8966 Regulator Driver");
MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 90651f4d1828..a29b19fbaf64 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -766,17 +766,7 @@ static struct platform_driver max8998_pmic_driver = {
.id_table = max8998_pmic_id,
};
-static int __init max8998_pmic_init(void)
-{
- return platform_driver_register(&max8998_pmic_driver);
-}
-subsys_initcall(max8998_pmic_init);
-
-static void __exit max8998_pmic_cleanup(void)
-{
- platform_driver_unregister(&max8998_pmic_driver);
-}
-module_exit(max8998_pmic_cleanup);
+subsys_platform_driver(max8998_pmic_driver);
MODULE_DESCRIPTION("MAXIM 8998 voltage regulator driver");
MODULE_AUTHOR("Kyungmin Park <kyungmin.park@samsung.com>");
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index fb3aa1cec1f2..1b634c334c30 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -460,17 +460,7 @@ static struct platform_driver mc13783_regulator_driver = {
.probe = mc13783_regulator_probe,
};
-static int __init mc13783_regulator_init(void)
-{
- return platform_driver_register(&mc13783_regulator_driver);
-}
-subsys_initcall(mc13783_regulator_init);
-
-static void __exit mc13783_regulator_exit(void)
-{
- platform_driver_unregister(&mc13783_regulator_driver);
-}
-module_exit(mc13783_regulator_exit);
+subsys_platform_driver(mc13783_regulator_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index b29cf6ba6f12..803db41b7363 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -634,17 +634,7 @@ static struct platform_driver mc13892_regulator_driver = {
.probe = mc13892_regulator_probe,
};
-static int __init mc13892_regulator_init(void)
-{
- return platform_driver_register(&mc13892_regulator_driver);
-}
-subsys_initcall(mc13892_regulator_init);
-
-static void __exit mc13892_regulator_exit(void)
-{
- platform_driver_unregister(&mc13892_regulator_driver);
-}
-module_exit(mc13892_regulator_exit);
+subsys_platform_driver(mc13892_regulator_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Yong Shen <yong.shen@linaro.org>");
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index f82618a70106..3d8ee8587f66 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -1669,17 +1669,7 @@ static struct platform_driver palmas_driver = {
.probe = palmas_regulators_probe,
};
-static int __init palmas_init(void)
-{
- return platform_driver_register(&palmas_driver);
-}
-subsys_initcall(palmas_init);
-
-static void __exit palmas_exit(void)
-{
- platform_driver_unregister(&palmas_driver);
-}
-module_exit(palmas_exit);
+subsys_platform_driver(palmas_driver);
MODULE_AUTHOR("Graeme Gregory <gg@slimlogic.co.uk>");
MODULE_DESCRIPTION("Palmas voltage regulator driver");
diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c
index 2d5fec1457d1..6a15dcc4fe4f 100644
--- a/drivers/regulator/qcom_rpm-regulator.c
+++ b/drivers/regulator/qcom_rpm-regulator.c
@@ -994,17 +994,7 @@ static struct platform_driver rpm_reg_driver = {
},
};
-static int __init rpm_reg_init(void)
-{
- return platform_driver_register(&rpm_reg_driver);
-}
-subsys_initcall(rpm_reg_init);
-
-static void __exit rpm_reg_exit(void)
-{
- platform_driver_unregister(&rpm_reg_driver);
-}
-module_exit(rpm_reg_exit)
+subsys_platform_driver(rpm_reg_driver);
MODULE_DESCRIPTION("Qualcomm RPM regulator driver");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
index 23ed594b574e..6242f7237836 100644
--- a/drivers/regulator/qcom_smd-regulator.c
+++ b/drivers/regulator/qcom_smd-regulator.c
@@ -1532,17 +1532,7 @@ static struct platform_driver rpm_reg_driver = {
},
};
-static int __init rpm_reg_init(void)
-{
- return platform_driver_register(&rpm_reg_driver);
-}
-subsys_initcall(rpm_reg_init);
-
-static void __exit rpm_reg_exit(void)
-{
- platform_driver_unregister(&rpm_reg_driver);
-}
-module_exit(rpm_reg_exit)
+subsys_platform_driver(rpm_reg_driver);
MODULE_DESCRIPTION("Qualcomm RPM regulator driver");
MODULE_LICENSE("GPL v2");
diff --git a/drivers/regulator/rc5t583-regulator.c b/drivers/regulator/rc5t583-regulator.c
index a25a141e86c4..4633f996e6dc 100644
--- a/drivers/regulator/rc5t583-regulator.c
+++ b/drivers/regulator/rc5t583-regulator.c
@@ -153,17 +153,7 @@ static struct platform_driver rc5t583_regulator_driver = {
.probe = rc5t583_regulator_probe,
};
-static int __init rc5t583_regulator_init(void)
-{
- return platform_driver_register(&rc5t583_regulator_driver);
-}
-subsys_initcall(rc5t583_regulator_init);
-
-static void __exit rc5t583_regulator_exit(void)
-{
- platform_driver_unregister(&rc5t583_regulator_driver);
-}
-module_exit(rc5t583_regulator_exit);
+subsys_platform_driver(rc5t583_regulator_driver);
MODULE_AUTHOR("Laxman Dewangan <ldewangan@nvidia.com>");
MODULE_DESCRIPTION("RC5T583 regulator driver");
diff --git a/drivers/regulator/tps6105x-regulator.c b/drivers/regulator/tps6105x-regulator.c
index 7f99f3e90bec..e5a053e0ad06 100644
--- a/drivers/regulator/tps6105x-regulator.c
+++ b/drivers/regulator/tps6105x-regulator.c
@@ -98,17 +98,7 @@ static struct platform_driver tps6105x_regulator_driver = {
.probe = tps6105x_regulator_probe,
};
-static __init int tps6105x_regulator_init(void)
-{
- return platform_driver_register(&tps6105x_regulator_driver);
-}
-subsys_initcall(tps6105x_regulator_init);
-
-static __exit void tps6105x_regulator_exit(void)
-{
- platform_driver_unregister(&tps6105x_regulator_driver);
-}
-module_exit(tps6105x_regulator_exit);
+subsys_platform_driver(tps6105x_regulator_driver);
MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
MODULE_DESCRIPTION("TPS6105x regulator driver");
diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c
index 6655d9c31187..aba2b41da549 100644
--- a/drivers/regulator/tps6507x-regulator.c
+++ b/drivers/regulator/tps6507x-regulator.c
@@ -443,17 +443,7 @@ static struct platform_driver tps6507x_pmic_driver = {
.probe = tps6507x_pmic_probe,
};
-static int __init tps6507x_pmic_init(void)
-{
- return platform_driver_register(&tps6507x_pmic_driver);
-}
-subsys_initcall(tps6507x_pmic_init);
-
-static void __exit tps6507x_pmic_cleanup(void)
-{
- platform_driver_unregister(&tps6507x_pmic_driver);
-}
-module_exit(tps6507x_pmic_cleanup);
+subsys_platform_driver(tps6507x_pmic_driver);
MODULE_AUTHOR("Texas Instruments");
MODULE_DESCRIPTION("TPS6507x voltage regulator driver");
diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c
index 8f916ee366e5..329af2f878b7 100644
--- a/drivers/regulator/tps65090-regulator.c
+++ b/drivers/regulator/tps65090-regulator.c
@@ -516,17 +516,7 @@ static struct platform_driver tps65090_regulator_driver = {
.probe = tps65090_regulator_probe,
};
-static int __init tps65090_regulator_init(void)
-{
- return platform_driver_register(&tps65090_regulator_driver);
-}
-subsys_initcall(tps65090_regulator_init);
-
-static void __exit tps65090_regulator_exit(void)
-{
- platform_driver_unregister(&tps65090_regulator_driver);
-}
-module_exit(tps65090_regulator_exit);
+subsys_platform_driver(tps65090_regulator_driver);
MODULE_DESCRIPTION("tps65090 regulator driver");
MODULE_AUTHOR("Venu Byravarasu <vbyravarasu@nvidia.com>");
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index b167ba22fe16..c30b0a330bba 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -263,17 +263,7 @@ static struct platform_driver tps65217_regulator_driver = {
.probe = tps65217_regulator_probe,
};
-static int __init tps65217_regulator_init(void)
-{
- return platform_driver_register(&tps65217_regulator_driver);
-}
-subsys_initcall(tps65217_regulator_init);
-
-static void __exit tps65217_regulator_exit(void)
-{
- platform_driver_unregister(&tps65217_regulator_driver);
-}
-module_exit(tps65217_regulator_exit);
+subsys_platform_driver(tps65217_regulator_driver);
MODULE_AUTHOR("AnilKumar Ch <anilkumar@ti.com>");
MODULE_DESCRIPTION("TPS65217 voltage regulator driver");
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 1ab5767590f3..93fde5f81cc9 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -525,17 +525,7 @@ static struct platform_driver tps6586x_regulator_driver = {
.probe = tps6586x_regulator_probe,
};
-static int __init tps6586x_regulator_init(void)
-{
- return platform_driver_register(&tps6586x_regulator_driver);
-}
-subsys_initcall(tps6586x_regulator_init);
-
-static void __exit tps6586x_regulator_exit(void)
-{
- platform_driver_unregister(&tps6586x_regulator_driver);
-}
-module_exit(tps6586x_regulator_exit);
+subsys_platform_driver(tps6586x_regulator_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 3a3027e0b94e..84fba40263d2 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -1260,17 +1260,7 @@ static struct platform_driver tps65910_driver = {
.shutdown = tps65910_shutdown,
};
-static int __init tps65910_init(void)
-{
- return platform_driver_register(&tps65910_driver);
-}
-subsys_initcall(tps65910_init);
-
-static void __exit tps65910_cleanup(void)
-{
- platform_driver_unregister(&tps65910_driver);
-}
-module_exit(tps65910_cleanup);
+subsys_platform_driver(tps65910_driver);
MODULE_AUTHOR("Graeme Gregory <gg@slimlogic.co.uk>");
MODULE_DESCRIPTION("TPS65910/TPS65911 voltage regulator driver");
diff --git a/drivers/regulator/tps68470-regulator.c b/drivers/regulator/tps68470-regulator.c
index de7db7690f6b..7aef0c12fbcc 100644
--- a/drivers/regulator/tps68470-regulator.c
+++ b/drivers/regulator/tps68470-regulator.c
@@ -185,17 +185,7 @@ static struct platform_driver tps68470_regulator_driver = {
* registering before the drivers for the camera-sensors which use them bind.
* subsys_initcall() ensures this when the drivers are builtin.
*/
-static int __init tps68470_regulator_init(void)
-{
- return platform_driver_register(&tps68470_regulator_driver);
-}
-subsys_initcall(tps68470_regulator_init);
-
-static void __exit tps68470_regulator_exit(void)
-{
- platform_driver_unregister(&tps68470_regulator_driver);
-}
-module_exit(tps68470_regulator_exit);
+subsys_platform_driver(tps68470_regulator_driver);
MODULE_ALIAS("platform:tps68470-regulator");
MODULE_DESCRIPTION("TPS68470 voltage regulator driver");
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 5bacfcebf59a..05579f2ee0e2 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -660,17 +660,7 @@ static struct platform_driver twlreg_driver = {
},
};
-static int __init twlreg_init(void)
-{
- return platform_driver_register(&twlreg_driver);
-}
-subsys_initcall(twlreg_init);
-
-static void __exit twlreg_exit(void)
-{
- platform_driver_unregister(&twlreg_driver);
-}
-module_exit(twlreg_exit)
+subsys_platform_driver(twlreg_driver);
MODULE_DESCRIPTION("TWL4030 regulator driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index 6eed0f6e0adb..5a7c6e2a5e0b 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -769,17 +769,7 @@ static struct platform_driver twlreg_driver = {
},
};
-static int __init twlreg_init(void)
-{
- return platform_driver_register(&twlreg_driver);
-}
-subsys_initcall(twlreg_init);
-
-static void __exit twlreg_exit(void)
-{
- platform_driver_unregister(&twlreg_driver);
-}
-module_exit(twlreg_exit)
+subsys_platform_driver(twlreg_driver);
MODULE_DESCRIPTION("TWL6030 regulator driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index d09864bae5ef..90942d0f439c 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1311,17 +1311,7 @@ static struct platform_driver wm8350_regulator_driver = {
},
};
-static int __init wm8350_regulator_init(void)
-{
- return platform_driver_register(&wm8350_regulator_driver);
-}
-subsys_initcall(wm8350_regulator_init);
-
-static void __exit wm8350_regulator_exit(void)
-{
- platform_driver_unregister(&wm8350_regulator_driver);
-}
-module_exit(wm8350_regulator_exit);
+subsys_platform_driver(wm8350_regulator_driver);
/* Module information */
MODULE_AUTHOR("Liam Girdwood");
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c
index fb3ca7956d00..61627892224e 100644
--- a/drivers/regulator/wm8400-regulator.c
+++ b/drivers/regulator/wm8400-regulator.c
@@ -258,17 +258,7 @@ int wm8400_register_regulator(struct device *dev, int reg,
}
EXPORT_SYMBOL_GPL(wm8400_register_regulator);
-static int __init wm8400_regulator_init(void)
-{
- return platform_driver_register(&wm8400_regulator_driver);
-}
-subsys_initcall(wm8400_regulator_init);
-
-static void __exit wm8400_regulator_exit(void)
-{
- platform_driver_unregister(&wm8400_regulator_driver);
-}
-module_exit(wm8400_regulator_exit);
+subsys_platform_driver(wm8400_regulator_driver);
MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
MODULE_DESCRIPTION("WM8400 regulator driver");
---
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261106-regulator-subsys-6f166d01d0ae
Best regards,
--
Brian Masney <bmasney@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-07 15:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 11:33 [PATCH] regulator: Convert to subsys_platform_driver() Peng Fan (OSS)
2026-11-04 11:49 ` Charles Keepax
2026-11-07 14:18 ` Mark Brown
2026-11-07 0:28 [PATCH] regulator: convert " Brian Masney
2026-11-07 10:47 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®