diff mbox series

board: dh_stm32mp1: update the gpio hog support

Message ID 20200529163325.30892-1-patrick.delaunay@st.com
State Superseded
Delegated to: Patrice Chotard
Headers show
Series board: dh_stm32mp1: update the gpio hog support | expand

Commit Message

Patrick Delaunay May 29, 2020, 4:33 p.m. UTC
This patch update the current gpio hog implementation with
the new API gpio_hog_probe_all() actviated with CONFIG_GPIO_HOG.

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

 board/dhelectronics/dh_stm32mp1/board.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Patrice CHOTARD July 2, 2020, 8:04 a.m. UTC | #1
Hi Patrick

On 5/29/20 6:33 PM, Patrick Delaunay wrote:
> This patch update the current gpio hog implementation with
> the new API gpio_hog_probe_all() actviated with CONFIG_GPIO_HOG.
s/actviated/activated
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
>
>  board/dhelectronics/dh_stm32mp1/board.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
> index 26e827bc38..ac9dc4b52c 100644
> --- a/board/dhelectronics/dh_stm32mp1/board.c
> +++ b/board/dhelectronics/dh_stm32mp1/board.c
> @@ -513,17 +513,11 @@ static void board_init_fmc2(void)
>  /* board dependent setup after realloc */
>  int board_init(void)
>  {
> -	struct udevice *dev;
> -
>  	/* address of boot parameters */
>  	gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
>  
> -	/* probe all PINCTRL for hog */
> -	for (uclass_first_device(UCLASS_PINCTRL, &dev);
> -	     dev;
> -	     uclass_next_device(&dev)) {
> -		pr_debug("probe pincontrol = %s\n", dev->name);
> -	}
> +	if (CONFIG_IS_ENABLED(DM_GPIO_HOG))
> +		gpio_hog_probe_all();
>  
>  	board_key_check();
>  

You can add my reviewed-by with the typo fixed

Thanks
diff mbox series

Patch

diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index 26e827bc38..ac9dc4b52c 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -513,17 +513,11 @@  static void board_init_fmc2(void)
 /* board dependent setup after realloc */
 int board_init(void)
 {
-	struct udevice *dev;
-
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
 
-	/* probe all PINCTRL for hog */
-	for (uclass_first_device(UCLASS_PINCTRL, &dev);
-	     dev;
-	     uclass_next_device(&dev)) {
-		pr_debug("probe pincontrol = %s\n", dev->name);
-	}
+	if (CONFIG_IS_ENABLED(DM_GPIO_HOG))
+		gpio_hog_probe_all();
 
 	board_key_check();