diff mbox series

[10/13] arm: dts: s5pv210: aries: Enable ADC node

Message ID BN6PR04MB0660998092302F2A78065E79A3AE0@BN6PR04MB0660.namprd04.prod.outlook.com (mailing list archive)
State Changes Requested
Headers show
Series S5PV210 and Aries DTS improvements | expand

Commit Message

Jonathan Bakker April 26, 2020, 6:36 p.m. UTC
On aries boards, the ADC is used for things such as jack detection
and battery temperature monitoring.  It is connected to ldo4 of max8998,
so only enable that regulator when we are actually using the ADC.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
---
 arch/arm/boot/dts/s5pv210-aries.dtsi | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Krzysztof Kozlowski April 28, 2020, 10:29 a.m. UTC | #1
On Sun, Apr 26, 2020 at 11:36:01AM -0700, Jonathan Bakker wrote:
> On aries boards, the ADC is used for things such as jack detection
> and battery temperature monitoring.  It is connected to ldo4 of max8998,
> so only enable that regulator when we are actually using the ADC.
> 
> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> ---
>  arch/arm/boot/dts/s5pv210-aries.dtsi | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
> index f30bdcb9c083..a103ddb0d720 100644
> --- a/arch/arm/boot/dts/s5pv210-aries.dtsi
> +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
> @@ -193,11 +193,6 @@
>  					regulator-name = "VADC_3.3V";
>  					regulator-min-microvolt = <3300000>;
>  					regulator-max-microvolt = <3300000>;
> -					regulator-always-on;
> -
> -					regulator-state-mem {
> -						regulator-off-in-suspend;
> -					};

I would expect to keep it disabled during suspend. Why you had to remove
this part?

Best regards,
Krzysztof
Jonathan Bakker April 28, 2020, 10:26 p.m. UTC | #2
Hi Krzysztof,

On 2020-04-28 3:29 a.m., Krzysztof Kozlowski wrote:
> On Sun, Apr 26, 2020 at 11:36:01AM -0700, Jonathan Bakker wrote:
>> On aries boards, the ADC is used for things such as jack detection
>> and battery temperature monitoring.  It is connected to ldo4 of max8998,
>> so only enable that regulator when we are actually using the ADC.
>>
>> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
>> ---
>>  arch/arm/boot/dts/s5pv210-aries.dtsi | 11 ++++++-----
>>  1 file changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
>> index f30bdcb9c083..a103ddb0d720 100644
>> --- a/arch/arm/boot/dts/s5pv210-aries.dtsi
>> +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
>> @@ -193,11 +193,6 @@
>>  					regulator-name = "VADC_3.3V";
>>  					regulator-min-microvolt = <3300000>;
>>  					regulator-max-microvolt = <3300000>;
>> -					regulator-always-on;
>> -
>> -					regulator-state-mem {
>> -						regulator-off-in-suspend;
>> -					};
> 
> I would expect to keep it disabled during suspend. Why you had to remove
> this part?

It was my thinking that if nothing was using it, then it would automatically be disabled and stay
that way over suspend.

However, looking at things again, it does make sense to make sure that it is disabled as it serves
no purpose to stay enabled over suspend.  I'll remove this change for v2.

> 
> Best regards,
> Krzysztof
> 

Thanks,
Jonathan
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index f30bdcb9c083..a103ddb0d720 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -193,11 +193,6 @@ 
 					regulator-name = "VADC_3.3V";
 					regulator-min-microvolt = <3300000>;
 					regulator-max-microvolt = <3300000>;
-					regulator-always-on;
-
-					regulator-state-mem {
-						regulator-off-in-suspend;
-					};
 				};
 
 				ldo5_reg: LDO5 {
@@ -530,6 +525,12 @@ 
 	};
 };
 
+&adc {
+	vdd-supply = <&ldo4_reg>;
+
+	status = "okay";
+};
+
 &fimd {
 	pinctrl-names = "default";
 	pinctrl-0 = <&lcd_clk &lcd_data24>;