Skip to content

Commit 02ce28b

Browse files
committed
regulator: Set PROBE_PREFER_ASYNCHRONOUS for
Merge series from Douglas Anderson <dianders@chromium.org>: This series directly follows from the discussion when I tried to turn on PROBE_PREFER_ASYNCHRONOUS just for the fixed-regulator [1] and attempts to switch everything in drivers/regulator over to async probe. Like the similar patch series I did for the MMC subsystem a few years ago [2], I've split this patch series into batches corresponding to drivers corresponding to actively maintained stable kernel trees with the idea to break the patch series up somewhat. Most of the description of this series is contained in the first patch of the series and then the further patches simply refer back to the first one. The logic and reasoning behind all the patches is exactly the same. As talked about in the first patch, it wouldn't be at all shocking if this broke someone. Hopefully this doesn't cause too much of a problem. Most of the problems expected would be real underlying bugs that already existed and were just tickled by this change. If you're facing a problem, it's fairly easy to force individual drivers back to "synchronous" probing while the problem is tracked down and fixed. I am opting _not_ to CC every single person involved in each of these regulators on this patch series because I suspect that the mailing lists couldn't handle CCing that many people. This should be on LKML so hopefully people can find it there and respond to it that way. Anyone who responds will get CCed on future versions, if there are any. For reference, the ugly script I used is here: import os import re for filename in os.listdir("."): found_subsys = False found_driver = False output = [] for line in open(filename, "r").readlines(): if "struct platform_driver" in line or \ "struct i2c_driver" in line or \ "struct spmi_driver" in line or \ "struct spi_driver" in line: found_subsys = True if found_subsys and re.search(r"\t\.driver\s*=\s*{", line): found_driver = True found_subsys = False mo = re.search(r"(\s*)\.name(\s*)=", line) if found_driver and mo: if not line.endswith(",\n"): line = line[:-1] + ",\n" output.append(line) if mo.group(2) == " ": space = " " elif mo.group(2) == "\t": # Best we can do space = " " elif mo.group(2).startswith("\t"): # Guess that removing one tab is right space = mo.group(2)[1:] else: # Guess it's all spaces space = mo.group(2)[7:] + " " output.append("%s.probe_type%s= PROBE_PREFER_ASYNCHRONOUS,\n" % (mo.group(1), space)) found_driver = False else: output.append(line) open(filename, "w").write("".join(output)) I manually split drivers up into groups based on the kernel they were introduced in. I've run a compile test against "allyesconfig" on amd64, arm32, and arm64 with this and confirmed it compiled. I've booted this on a sc7180-trogdor-lazor board and confirmed it booted OK and got the boot speed improvements I expected and that dmesg was as expected. [1] https://lore.kernel.org/r/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk [2] https://lore.kernel.org/r/20200903232441.2694866-1-dianders@chromium.org/ Douglas Anderson (7): regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in 4.14 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.14 and 4.19 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 4.19 and 5.4 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.4 and 5.10 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.10 and 5.15 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.15 and 6.1 regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers that are newer than 6.1 drivers/regulator/88pg86x.c | 1 + drivers/regulator/88pm800-regulator.c | 1 + drivers/regulator/88pm8607.c | 1 + drivers/regulator/aat2870-regulator.c | 1 + drivers/regulator/ab8500-ext.c | 1 + drivers/regulator/ab8500.c | 1 + drivers/regulator/act8865-regulator.c | 1 + drivers/regulator/act8945a-regulator.c | 1 + drivers/regulator/ad5398.c | 1 + drivers/regulator/anatop-regulator.c | 1 + drivers/regulator/arizona-ldo1.c | 2 ++ drivers/regulator/arizona-micsupp.c | 2 ++ drivers/regulator/as3711-regulator.c | 1 + drivers/regulator/as3722-regulator.c | 1 + drivers/regulator/atc260x-regulator.c | 1 + drivers/regulator/axp20x-regulator.c | 1 + drivers/regulator/bcm590xx-regulator.c | 1 + drivers/regulator/bd71815-regulator.c | 1 + drivers/regulator/bd71828-regulator.c | 3 ++- drivers/regulator/bd718x7-regulator.c | 1 + drivers/regulator/bd9571mwv-regulator.c | 1 + drivers/regulator/bd9576-regulator.c | 1 + drivers/regulator/cpcap-regulator.c | 1 + drivers/regulator/cros-ec-regulator.c | 1 + drivers/regulator/da903x-regulator.c | 1 + drivers/regulator/da9052-regulator.c | 1 + drivers/regulator/da9055-regulator.c | 1 + drivers/regulator/da9062-regulator.c | 1 + drivers/regulator/da9063-regulator.c | 1 + drivers/regulator/da9121-regulator.c | 1 + drivers/regulator/da9210-regulator.c | 1 + drivers/regulator/da9211-regulator.c | 1 + drivers/regulator/db8500-prcmu.c | 1 + drivers/regulator/dummy.c | 1 + drivers/regulator/fan53555.c | 1 + drivers/regulator/fan53880.c | 1 + drivers/regulator/fixed.c | 1 + drivers/regulator/gpio-regulator.c | 1 + drivers/regulator/hi6421-regulator.c | 1 + drivers/regulator/hi6421v530-regulator.c | 1 + drivers/regulator/hi6421v600-regulator.c | 1 + drivers/regulator/hi655x-regulator.c | 1 + drivers/regulator/isl6271a-regulator.c | 1 + drivers/regulator/isl9305.c | 1 + drivers/regulator/lm363x-regulator.c | 1 + drivers/regulator/lochnagar-regulator.c | 1 + drivers/regulator/lp3971.c | 1 + drivers/regulator/lp3972.c | 1 + drivers/regulator/lp872x.c | 1 + drivers/regulator/lp873x-regulator.c | 1 + drivers/regulator/lp8755.c | 1 + drivers/regulator/lp87565-regulator.c | 1 + drivers/regulator/lp8788-buck.c | 1 + drivers/regulator/lp8788-ldo.c | 2 ++ drivers/regulator/ltc3589.c | 1 + drivers/regulator/ltc3676.c | 1 + drivers/regulator/max14577-regulator.c | 1 + drivers/regulator/max1586.c | 1 + drivers/regulator/max20086-regulator.c | 1 + drivers/regulator/max20411-regulator.c | 1 + drivers/regulator/max597x-regulator.c | 1 + drivers/regulator/max77620-regulator.c | 1 + drivers/regulator/max77650-regulator.c | 1 + drivers/regulator/max77686-regulator.c | 1 + drivers/regulator/max77693-regulator.c | 1 + drivers/regulator/max77802-regulator.c | 1 + drivers/regulator/max77826-regulator.c | 1 + drivers/regulator/max8649.c | 1 + drivers/regulator/max8660.c | 1 + drivers/regulator/max8893.c | 1 + drivers/regulator/max8907-regulator.c | 1 + drivers/regulator/max8925-regulator.c | 1 + drivers/regulator/max8952.c | 1 + drivers/regulator/max8973-regulator.c | 1 + drivers/regulator/max8997-regulator.c | 1 + drivers/regulator/max8998.c | 1 + drivers/regulator/mc13783-regulator.c | 1 + drivers/regulator/mc13892-regulator.c | 1 + drivers/regulator/mcp16502.c | 1 + drivers/regulator/mp5416.c | 1 + drivers/regulator/mp8859.c | 1 + drivers/regulator/mp886x.c | 1 + drivers/regulator/mpq7920.c | 1 + drivers/regulator/mt6311-regulator.c | 1 + drivers/regulator/mt6315-regulator.c | 1 + drivers/regulator/mt6323-regulator.c | 1 + drivers/regulator/mt6331-regulator.c | 1 + drivers/regulator/mt6332-regulator.c | 1 + drivers/regulator/mt6357-regulator.c | 1 + drivers/regulator/mt6358-regulator.c | 1 + drivers/regulator/mt6359-regulator.c | 1 + drivers/regulator/mt6360-regulator.c | 1 + drivers/regulator/mt6370-regulator.c | 1 + drivers/regulator/mt6380-regulator.c | 1 + drivers/regulator/mt6397-regulator.c | 1 + drivers/regulator/mtk-dvfsrc-regulator.c | 1 + drivers/regulator/palmas-regulator.c | 1 + drivers/regulator/pbias-regulator.c | 1 + drivers/regulator/pca9450-regulator.c | 1 + drivers/regulator/pcap-regulator.c | 1 + drivers/regulator/pcf50633-regulator.c | 1 + drivers/regulator/pf8x00-regulator.c | 1 + drivers/regulator/pfuze100-regulator.c | 1 + drivers/regulator/pv88060-regulator.c | 1 + drivers/regulator/pv88080-regulator.c | 1 + drivers/regulator/pv88090-regulator.c | 1 + drivers/regulator/pwm-regulator.c | 1 + drivers/regulator/qcom-labibb-regulator.c | 1 + drivers/regulator/qcom-rpmh-regulator.c | 1 + drivers/regulator/qcom_rpm-regulator.c | 1 + drivers/regulator/qcom_smd-regulator.c | 1 + drivers/regulator/qcom_spmi-regulator.c | 1 + drivers/regulator/qcom_usb_vbus-regulator.c | 1 + drivers/regulator/rc5t583-regulator.c | 1 + drivers/regulator/rk808-regulator.c | 3 ++- drivers/regulator/rn5t618-regulator.c | 1 + drivers/regulator/rpi-panel-attiny-regulator.c | 1 + drivers/regulator/rt4801-regulator.c | 1 + drivers/regulator/rt4831-regulator.c | 1 + drivers/regulator/rt5033-regulator.c | 1 + drivers/regulator/rt5120-regulator.c | 1 + drivers/regulator/rt5190a-regulator.c | 1 + drivers/regulator/rt5739.c | 1 + drivers/regulator/rt5759-regulator.c | 1 + drivers/regulator/rt6160-regulator.c | 1 + drivers/regulator/rt6190-regulator.c | 1 + drivers/regulator/rt6245-regulator.c | 1 + drivers/regulator/rtmv20-regulator.c | 1 + drivers/regulator/rtq2134-regulator.c | 1 + drivers/regulator/rtq6752-regulator.c | 1 + drivers/regulator/s2mpa01.c | 1 + drivers/regulator/s2mps11.c | 1 + drivers/regulator/s5m8767.c | 1 + drivers/regulator/sc2731-regulator.c | 1 + drivers/regulator/sky81452-regulator.c | 1 + drivers/regulator/slg51000-regulator.c | 1 + drivers/regulator/sm5703-regulator.c | 1 + drivers/regulator/stm32-booster.c | 1 + drivers/regulator/stm32-pwr.c | 1 + drivers/regulator/stm32-vrefbuf.c | 1 + drivers/regulator/stpmic1_regulator.c | 1 + drivers/regulator/stw481x-vmmc.c | 1 + drivers/regulator/sy7636a-regulator.c | 1 + drivers/regulator/sy8106a-regulator.c | 1 + drivers/regulator/sy8824x.c | 1 + drivers/regulator/sy8827n.c | 1 + drivers/regulator/ti-abb-regulator.c | 1 + drivers/regulator/tps51632-regulator.c | 1 + drivers/regulator/tps6105x-regulator.c | 1 + drivers/regulator/tps62360-regulator.c | 1 + drivers/regulator/tps6286x-regulator.c | 1 + drivers/regulator/tps65023-regulator.c | 1 + drivers/regulator/tps6507x-regulator.c | 1 + drivers/regulator/tps65086-regulator.c | 1 + drivers/regulator/tps65090-regulator.c | 1 + drivers/regulator/tps65132-regulator.c | 1 + drivers/regulator/tps65217-regulator.c | 1 + drivers/regulator/tps65218-regulator.c | 1 + drivers/regulator/tps65219-regulator.c | 1 + drivers/regulator/tps6524x-regulator.c | 1 + drivers/regulator/tps6586x-regulator.c | 1 + drivers/regulator/tps65910-regulator.c | 1 + drivers/regulator/tps65912-regulator.c | 1 + drivers/regulator/tps68470-regulator.c | 1 + drivers/regulator/twl-regulator.c | 1 + drivers/regulator/twl6030-regulator.c | 1 + drivers/regulator/uniphier-regulator.c | 1 + drivers/regulator/userspace-consumer.c | 1 + drivers/regulator/vctrl-regulator.c | 1 + drivers/regulator/vexpress-regulator.c | 1 + drivers/regulator/virtual.c | 1 + drivers/regulator/vqmmc-ipq4019-regulator.c | 1 + drivers/regulator/wm831x-dcdc.c | 4 ++++ drivers/regulator/wm831x-isink.c | 1 + drivers/regulator/wm831x-ldo.c | 3 +++ drivers/regulator/wm8350-regulator.c | 1 + drivers/regulator/wm8400-regulator.c | 1 + drivers/regulator/wm8994-regulator.c | 1 + 178 files changed, 188 insertions(+), 2 deletions(-) -- 2.40.0.rc1.284.g88254d51c5-goog
2 parents cff5c89 + bdce47b commit 02ce28b

178 files changed

Lines changed: 188 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/regulator/88pg86x.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ MODULE_DEVICE_TABLE(i2c, pg86x_i2c_id);
101101
static struct i2c_driver pg86x_regulator_driver = {
102102
.driver = {
103103
.name = "88pg86x",
104+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
104105
.of_match_table = of_match_ptr(pg86x_dt_ids),
105106
},
106107
.probe_new = pg86x_i2c_probe,

drivers/regulator/88pm800-regulator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ static int pm800_regulator_probe(struct platform_device *pdev)
274274
static struct platform_driver pm800_regulator_driver = {
275275
.driver = {
276276
.name = "88pm80x-regulator",
277+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
277278
},
278279
.probe = pm800_regulator_probe,
279280
};

drivers/regulator/88pm8607.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ MODULE_DEVICE_TABLE(platform, pm8607_regulator_driver_ids);
383383
static struct platform_driver pm8607_regulator_driver = {
384384
.driver = {
385385
.name = "88pm860x-regulator",
386+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
386387
},
387388
.probe = pm8607_regulator_probe,
388389
.id_table = pm8607_regulator_driver_ids,

drivers/regulator/aat2870-regulator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
178178
static struct platform_driver aat2870_regulator_driver = {
179179
.driver = {
180180
.name = "aat2870-regulator",
181+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
181182
},
182183
.probe = aat2870_regulator_probe,
183184
};

drivers/regulator/ab8500-ext.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ static struct platform_driver ab8500_ext_regulator_driver = {
446446
.probe = ab8500_ext_regulator_probe,
447447
.driver = {
448448
.name = "ab8500-ext-regulator",
449+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
449450
},
450451
};
451452

drivers/regulator/ab8500.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,7 @@ static struct platform_driver ab8500_regulator_driver = {
17371737
.probe = ab8500_regulator_probe,
17381738
.driver = {
17391739
.name = "ab8500-regulator",
1740+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
17401741
},
17411742
};
17421743

drivers/regulator/act8865-regulator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ MODULE_DEVICE_TABLE(i2c, act8865_ids);
789789
static struct i2c_driver act8865_pmic_driver = {
790790
.driver = {
791791
.name = "act8865",
792+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
792793
},
793794
.probe_new = act8865_pmic_probe,
794795
.id_table = act8865_ids,

drivers/regulator/act8945a-regulator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ static void act8945a_pmic_shutdown(struct platform_device *pdev)
348348
static struct platform_driver act8945a_pmic_driver = {
349349
.driver = {
350350
.name = "act8945a-regulator",
351+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
351352
.pm = &act8945a_pm,
352353
},
353354
.probe = act8945a_pmic_probe,

drivers/regulator/ad5398.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ static struct i2c_driver ad5398_driver = {
257257
.probe_new = ad5398_probe,
258258
.driver = {
259259
.name = "ad5398",
260+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
260261
},
261262
.id_table = ad5398_id,
262263
};

drivers/regulator/anatop-regulator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ MODULE_DEVICE_TABLE(of, of_anatop_regulator_match_tbl);
328328
static struct platform_driver anatop_regulator_driver = {
329329
.driver = {
330330
.name = "anatop_regulator",
331+
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
331332
.of_match_table = of_anatop_regulator_match_tbl,
332333
},
333334
.probe = anatop_regulator_probe,

0 commit comments

Comments
 (0)