aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/gpio-regulator.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-08-03 20:05:44 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-03 20:05:44 -0700
commitbbb839901fe865a56d91aa88d70908a7d16268a1 (patch)
tree7a74f14aa27f601f9c97b25c7f5c145253be2634 /drivers/regulator/gpio-regulator.c
parentf8851cb2d0cc2b4f8ac5dadb03148d6b58609b1c (diff)
parent3f02794888213efb224ef8e38d5d0e0f74b95416 (diff)
downloadlinux-bbb839901fe865a56d91aa88d70908a7d16268a1.tar.gz
linux-bbb839901fe865a56d91aa88d70908a7d16268a1.tar.bz2
linux-bbb839901fe865a56d91aa88d70908a7d16268a1.zip
Merge tag 'regulator-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "This time around the bulk of the work on the regulator API has been cleanups of various kinds, partly but not entirely inspired by the W=1 stuff that 0day turned on. There's also been a fairly large crop of new drivers, and a few bugfixes for existing drivers. - Mode setting support for MT6397 and DA9211. - New drivers for ChromeOS embedded controllers, Fairchild FAN53880, NXP PCA9450, Qualcomm LABIBB, MP5496, and VBUS booster, and Silergy SY8827N" * tag 'regulator-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (67 commits) regulator: add the sub node names for the MP5496 PMIC regulator: cros-ec-regulator: Fix double free of desc->name. platform/chrome: cros_ec: Fix host command for regulator control. regulator: pca9450: Convert to use module_i2c_driver regulator: fix memory leak on error path of regulator_register() regulator: Replace HTTP links with HTTPS ones regulator: convert QCOM SMD-RPM regulator document to YAML schema regulator: gpio: Honor regulator-boot-on property regulator: core: Add destroy_regulator() regulator: Correct kernel-doc inconsistency regulator: Add labibb regulator binding regulator: qcom: Add labibb driver regulator: Allow regulators to verify enabled during enable() regulator: cros-ec: Constify cros_ec_regulator_voltage_ops regulator: devres: Standardise on function documentation headers regulator: of_regulator: Add missing colon for rdev kerneldoc argument regulator: devres: Fix issues with kerneldoc headers regulator: fan53880: Add support for COMPILE_TEST regulator: fan53880: Add missing .owner field in regulator_desc dt-bindings: regulator: add pca9450 regulator yaml ...
Diffstat (limited to 'drivers/regulator/gpio-regulator.c')
-rw-r--r--drivers/regulator/gpio-regulator.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 110ee6fe76c4..5927d4f3eabd 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -148,6 +148,13 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np,
config->supply_name = config->init_data->constraints.name;
+ if (config->init_data->constraints.boot_on)
+ config->enabled_at_boot = true;
+
+ /*
+ * Do not use: undocumented device tree property.
+ * This is kept around solely for device tree ABI stability.
+ */
if (of_property_read_bool(np, "enable-at-boot"))
config->enabled_at_boot = true;
@@ -311,7 +318,7 @@ static int gpio_regulator_probe(struct platform_device *pdev)
/*
* The signal will be inverted by the GPIO core if flagged so in the
- * decriptor.
+ * descriptor.
*/
if (config->enabled_at_boot)
gflags = GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE;