]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: stm32mp1: update the gpio hog support
authorPatrick Delaunay <patrick.delaunay@st.com>
Thu, 4 Jun 2020 12:30:24 +0000 (14:30 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Tue, 7 Jul 2020 14:01:23 +0000 (16:01 +0200)
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@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
board/st/stm32mp1/stm32mp1.c

index 4cea5bd02192aeadab215758a686bb4924418d1b..c5c89d27e5233c1e235cc7769ea9f3fb7d634de1 100644 (file)
@@ -670,17 +670,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();