u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] board: stm32mp1: remove test on CONFIG_DM_REGULATOR
@ 2022-06-20 10:36 Patrick Delaunay
  2022-07-07  6:51 ` Patrice CHOTARD
  2022-09-07 13:30 ` Patrick DELAUNAY
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2022-06-20 10:36 UTC (permalink / raw)
  To: u-boot; +Cc: Patrick Delaunay, Patrice Chotard, U-Boot STM32

The tests on CONFIG_DM_REGULATOR, added to avoid compilation issues, can
now be removed, they are no more needed since the commit 16cc5ad0b439
("power: regulator: add dummy helper").

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 board/st/stm32mp1/stm32mp1.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 9496890d164..8c162b42a59 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -494,7 +494,7 @@ static void sysconf_init(void)
 	ret = uclass_get_device_by_driver(UCLASS_PMIC,
 					  DM_DRIVER_GET(stm32mp_pwr_pmic),
 					  &pwr_dev);
-	if (!ret && IS_ENABLED(CONFIG_DM_REGULATOR)) {
+	if (!ret) {
 		ret = uclass_get_device_by_driver(UCLASS_MISC,
 						  DM_DRIVER_GET(stm32mp_bsec),
 						  &dev);
@@ -555,9 +555,6 @@ static int board_stm32mp15x_dk2_init(void)
 	struct gpio_desc hdmi, audio;
 	int ret = 0;
 
-	if (!IS_ENABLED(CONFIG_DM_REGULATOR))
-		return -ENODEV;
-
 	/* Fix to make I2C1 usable on DK2 for touchscreen usage in kernel */
 	node = ofnode_path("/soc/i2c@40012000/hdmi-transmitter@39");
 	if (!ofnode_valid(node)) {
@@ -658,8 +655,7 @@ int board_init(void)
 	if (board_is_stm32mp15x_dk2())
 		board_stm32mp15x_dk2_init();
 
-	if (IS_ENABLED(CONFIG_DM_REGULATOR))
-		regulators_enable_boot_on(_DEBUG);
+	regulators_enable_boot_on(_DEBUG);
 
 	/*
 	 * sysconf initialisation done only when U-Boot is running in secure
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] board: stm32mp1: remove test on CONFIG_DM_REGULATOR
  2022-06-20 10:36 [PATCH] board: stm32mp1: remove test on CONFIG_DM_REGULATOR Patrick Delaunay
@ 2022-07-07  6:51 ` Patrice CHOTARD
  2022-09-07 13:30 ` Patrick DELAUNAY
  1 sibling, 0 replies; 3+ messages in thread
From: Patrice CHOTARD @ 2022-07-07  6:51 UTC (permalink / raw)
  To: Patrick Delaunay, u-boot; +Cc: U-Boot STM32

Hi Patrick

On 6/20/22 12:36, Patrick Delaunay wrote:
> The tests on CONFIG_DM_REGULATOR, added to avoid compilation issues, can
> now be removed, they are no more needed since the commit 16cc5ad0b439
> ("power: regulator: add dummy helper").
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  board/st/stm32mp1/stm32mp1.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
> index 9496890d164..8c162b42a59 100644
> --- a/board/st/stm32mp1/stm32mp1.c
> +++ b/board/st/stm32mp1/stm32mp1.c
> @@ -494,7 +494,7 @@ static void sysconf_init(void)
>  	ret = uclass_get_device_by_driver(UCLASS_PMIC,
>  					  DM_DRIVER_GET(stm32mp_pwr_pmic),
>  					  &pwr_dev);
> -	if (!ret && IS_ENABLED(CONFIG_DM_REGULATOR)) {
> +	if (!ret) {
>  		ret = uclass_get_device_by_driver(UCLASS_MISC,
>  						  DM_DRIVER_GET(stm32mp_bsec),
>  						  &dev);
> @@ -555,9 +555,6 @@ static int board_stm32mp15x_dk2_init(void)
>  	struct gpio_desc hdmi, audio;
>  	int ret = 0;
>  
> -	if (!IS_ENABLED(CONFIG_DM_REGULATOR))
> -		return -ENODEV;
> -
>  	/* Fix to make I2C1 usable on DK2 for touchscreen usage in kernel */
>  	node = ofnode_path("/soc/i2c@40012000/hdmi-transmitter@39");
>  	if (!ofnode_valid(node)) {
> @@ -658,8 +655,7 @@ int board_init(void)
>  	if (board_is_stm32mp15x_dk2())
>  		board_stm32mp15x_dk2_init();
>  
> -	if (IS_ENABLED(CONFIG_DM_REGULATOR))
> -		regulators_enable_boot_on(_DEBUG);
> +	regulators_enable_boot_on(_DEBUG);
>  
>  	/*
>  	 * sysconf initialisation done only when U-Boot is running in secure


Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] board: stm32mp1: remove test on CONFIG_DM_REGULATOR
  2022-06-20 10:36 [PATCH] board: stm32mp1: remove test on CONFIG_DM_REGULATOR Patrick Delaunay
  2022-07-07  6:51 ` Patrice CHOTARD
@ 2022-09-07 13:30 ` Patrick DELAUNAY
  1 sibling, 0 replies; 3+ messages in thread
From: Patrick DELAUNAY @ 2022-09-07 13:30 UTC (permalink / raw)
  To: u-boot; +Cc: Patrice Chotard, U-Boot STM32

Hi,

On 6/20/22 12:36, Patrick Delaunay wrote:
> The tests on CONFIG_DM_REGULATOR, added to avoid compilation issues, can
> now be removed, they are no more needed since the commit 16cc5ad0b439
> ("power: regulator: add dummy helper").
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
>   board/st/stm32mp1/stm32mp1.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
>
Applied to u-boot-stm/master, thanks!

Regards
Patrick



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-07 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 10:36 [PATCH] board: stm32mp1: remove test on CONFIG_DM_REGULATOR Patrick Delaunay
2022-07-07  6:51 ` Patrice CHOTARD
2022-09-07 13:30 ` Patrick DELAUNAY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).