diff mbox series

[v2,02/11] board: stm32mp1: update the gpio hog support

Message ID 20200604123033.25499-2-patrick.delaunay@st.com
State Accepted
Commit 29e4ce3c970f7a183d1218a78d82891d07bf801d
Headers show
Series stm32mp1: activate gpio hog support and add new pinctrl ops | expand

Commit Message

Patrick Delaunay June 4, 2020, 12:30 p.m. UTC
This patch updates the current gpio hog implementation and uses
the new API gpio_hog_probe_all(), activated with CONFIG_GPIO_HOG.

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

Changes in v2: None

 board/st/stm32mp1/stm32mp1.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 4553329b25..f4a032f781 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -664,17 +664,11 @@  static void board_ev1_init(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();