regulator: gpio: Honor regulator-boot-on property
PATCH v2 1/1 regulator: gpio: Honor regulator-boot-on property
From: Chen-Yu Tsai <[email protected]>
When requesting the enable GPIO, the driver should do so with the correct output level matching some expected state. This is especially important if the regulator is a critical one, such as a supply for the boot CPU. This is currently done by checking for the enable-at-boot property, but this is not documented in the device tree binding, nor does it match the common regulator properties.
Honor the common regulator-boot-on property by checking the boot_on constraint setting within the DT probe path. This is the same as what is done in the fixed regulator driver.
Also drop support for the undocumented enable-at-boot property. This property was not documented in the original commit introducing DT support, nor is it now, and there are no in-tree device trees that use this property.
--- drivers/regulator/gpio-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/gpio-regulator.c +1 -1
@@ -148,7 +148,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np, config->supply_name = config->init_data->constraints.name; -if (of_property_read_bool (np,"enable-at-boot" )) +if (config->init_data->constraints.boot_on) config->enabled_at_boot = true;of_property_read_u32 (np,"startup-delay-us" , &config->startup_delay);
Signature · 1 line
2.27.0
Mark Brown
maintainerQuoted 4 lines · Chen-Yu Tsai
Also drop support for the undocumented enable-at-boot property. This property was not documented in the original commit introducing DT support, nor is it now, and there are no in-tree device trees that use this property.
There may still be out of tree users, an ABI is an ABI.
Quoted 9 lines · Mark Brown
Quoted 4 lines · Chen-Yu Tsai
Also drop support for the undocumented enable-at-boot property. This property was not documented in the original commit introducing DT support, nor is it now, and there are no in-tree device trees that use this property.
There may still be out of tree users, an ABI is an ABI.
Ok. Should I add a comment stating this should not be used in new files? Or just leave it as it?
ChenYu
Mark Brown
maintainerQuoted 6 lines · Chen-Yu Tsai
Quoted 1 line · Mark Brown
There may still be out of tree users, an ABI is an ABI.
Ok. Should I add a comment stating this should not be used in new files? Or just leave it as it?
A comment would be fine.