diff mbox series

[1/2] regulator: palmas: Add support for LDO1 regulator to provide 1.8V

Message ID 1499852567-28165-2-git-send-email-jjhiblot@ti.com
State New
Headers show
Series [1/2] regulator: palmas: Add support for LDO1 regulator to provide 1.8V | expand

Commit Message

Jean-Jacques Hiblot July 12, 2017, 9:42 a.m. UTC
From: Kishon Vijay Abraham I <kishon@ti.com>

Modify palmas_mmc1_poweron_ldo() API to set the voltage based on the
voltage parameter passed as argument instead of always setting it to
3.0V. This allows MMC1 to set the LDO1 regulator voltage to 3.3V or 1.8V.
1.8V is required to add support for UHS mode.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
 drivers/power/palmas.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Tom Rini July 12, 2017, 5:31 p.m. UTC | #1
On Wed, Jul 12, 2017 at 11:42:46AM +0200, Jean-Jacques Hiblot wrote:

> From: Kishon Vijay Abraham I <kishon@ti.com>

> 

> Modify palmas_mmc1_poweron_ldo() API to set the voltage based on the

> voltage parameter passed as argument instead of always setting it to

> 3.0V. This allows MMC1 to set the LDO1 regulator voltage to 3.3V or 1.8V.

> 1.8V is required to add support for UHS mode.

> 

> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>


Reviewed-by: Tom Rini <trini@konsulko.com>


-- 
Tom
Jaehoon Chung July 28, 2017, 12:53 p.m. UTC | #2
Hi,

On 07/12/2017 06:42 PM, Jean-Jacques Hiblot wrote:
> From: Kishon Vijay Abraham I <kishon@ti.com>
> 
> Modify palmas_mmc1_poweron_ldo() API to set the voltage based on the
> voltage parameter passed as argument instead of always setting it to
> 3.0V. This allows MMC1 to set the LDO1 regulator voltage to 3.3V or 1.8V.
> 1.8V is required to add support for UHS mode.
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot-mmc for pmic! Thanks!

Best Regards,
Jaehoon Chung

> ---
>  drivers/power/palmas.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/palmas.c b/drivers/power/palmas.c
> index c813b21..4e98959 100644
> --- a/drivers/power/palmas.c
> +++ b/drivers/power/palmas.c
> @@ -50,10 +50,9 @@ int palmas_mmc1_poweron_ldo(uint voltage)
>  	int ret;
>  	/*
>  	 * Currently valid for the dra7xx_evm board:
> -	 * Set TPS659038 LDO1 to 3.0 V
> +	 * Set TPS659038 LDO1 to 3.0 V or 1.8V
>  	 */
> -	val = LDO_VOLT_3V0;
> -	ret = palmas_i2c_write_u8(TPS65903X_CHIP_P1, LDO1_VOLTAGE, val);
> +	ret = palmas_i2c_write_u8(TPS65903X_CHIP_P1, LDO1_VOLTAGE, voltage);
>  	if (ret) {
>  		printf("tps65903x: could not set LDO1 voltage.\n");
>  		return ret;
>
diff mbox series

Patch

diff --git a/drivers/power/palmas.c b/drivers/power/palmas.c
index c813b21..4e98959 100644
--- a/drivers/power/palmas.c
+++ b/drivers/power/palmas.c
@@ -50,10 +50,9 @@  int palmas_mmc1_poweron_ldo(uint voltage)
 	int ret;
 	/*
 	 * Currently valid for the dra7xx_evm board:
-	 * Set TPS659038 LDO1 to 3.0 V
+	 * Set TPS659038 LDO1 to 3.0 V or 1.8V
 	 */
-	val = LDO_VOLT_3V0;
-	ret = palmas_i2c_write_u8(TPS65903X_CHIP_P1, LDO1_VOLTAGE, val);
+	ret = palmas_i2c_write_u8(TPS65903X_CHIP_P1, LDO1_VOLTAGE, voltage);
 	if (ret) {
 		printf("tps65903x: could not set LDO1 voltage.\n");
 		return ret;