diff mbox series

[U-Boot,09/10] power: spl: add SPL_DM_REGULATOR_FIXED in Kconfig

Message ID 1505131150-39480-10-git-send-email-philipp.tomsich@theobroma-systems.com
State Superseded
Delegated to: Philipp Tomsich
Headers show
Series None | expand

Commit Message

Philipp Tomsich Sept. 11, 2017, 11:59 a.m. UTC
The Makefile already tests for SPL_DM_REGULATOR_FIXED, but Kconfig
does not provide it.  This adds SPL_DM_REGULATOR_FIXED to Kconfig.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---

 drivers/power/regulator/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Simon Glass Sept. 13, 2017, 4:26 a.m. UTC | #1
On 11 September 2017 at 05:59, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> The Makefile already tests for SPL_DM_REGULATOR_FIXED, but Kconfig
> does not provide it.  This adds SPL_DM_REGULATOR_FIXED to Kconfig.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
>
>  drivers/power/regulator/Kconfig | 7 +++++++
>  1 file changed, 7 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

Should that default to y?
Philipp Tomsich Sept. 13, 2017, 8:20 a.m. UTC | #2
> On 13 Sep 2017, at 06:26, Simon Glass <sjg@chromium.org> wrote:
> 
> On 11 September 2017 at 05:59, Philipp Tomsich
> <philipp.tomsich@theobroma-systems.com> wrote:
>> The Makefile already tests for SPL_DM_REGULATOR_FIXED, but Kconfig
>> does not provide it.  This adds SPL_DM_REGULATOR_FIXED to Kconfig.
>> 
>> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>> ---
>> 
>> drivers/power/regulator/Kconfig | 7 +++++++
>> 1 file changed, 7 insertions(+)
>> 
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> Should that default to y?

I am undecided, as pretty much any default will be wrong for most people.
Fortunately it can be easily changed via defconfig or from implying it from
one of the other Kconfig sections.

My reasoning behind not making it the default was that a large number of
boards will have DM_REGULATOR_FIXED enabled (e.g. for enabling some
of the USB path), but many of the boards will not need it at the SPL stage.
If we’d make this the default, we might see increases in size (and some SPL
stages exceeding their size limit) from this change.

I’d more more than happy to make it the default, though.
Simon Glass Sept. 17, 2017, 5:52 p.m. UTC | #3
On 13 September 2017 at 02:20, Dr. Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
>
>> On 13 Sep 2017, at 06:26, Simon Glass <sjg@chromium.org> wrote:
>>
>> On 11 September 2017 at 05:59, Philipp Tomsich
>> <philipp.tomsich@theobroma-systems.com> wrote:
>>> The Makefile already tests for SPL_DM_REGULATOR_FIXED, but Kconfig
>>> does not provide it.  This adds SPL_DM_REGULATOR_FIXED to Kconfig.
>>>
>>> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>>> ---
>>>
>>> drivers/power/regulator/Kconfig | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>>
>> Should that default to y?
>
> I am undecided, as pretty much any default will be wrong for most people.
> Fortunately it can be easily changed via defconfig or from implying it from
> one of the other Kconfig sections.
>
> My reasoning behind not making it the default was that a large number of
> boards will have DM_REGULATOR_FIXED enabled (e.g. for enabling some
> of the USB path), but many of the boards will not need it at the SPL stage.
> If we’d make this the default, we might see increases in size (and some SPL
> stages exceeding their size limit) from this change.
>
> I’d more more than happy to make it the default, though.

Seems fine, I understand.

- Simon
diff mbox series

Patch

diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index c82a936..a11408f 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -77,6 +77,13 @@  config DM_REGULATOR_FIXED
 	features for fixed value regulators. The driver implements get/set api
 	for enable and get only for voltage value.
 
+config SPL_DM_REGULATOR_FIXED
+	bool "Enable Driver Model for REGULATOR Fixed value in SPL"
+	depends on DM_REGULATOR_FIXED
+	---help---
+	This config enables implementation of driver-model regulator uclass
+	features for fixed value regulators in SPL.
+
 config DM_REGULATOR_GPIO
 	bool "Enable Driver Model for GPIO REGULATOR"
 	depends on DM_REGULATOR