[PATCH v2 2/2] ARM: boards: phytec-som-imx6: probe all gpio devices before PMIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



GPIO lines in da9063 are assigned dynamically, while majority of SOC
GPIO drivers assign their GPIOs in static manner (GPIO line numbers can
be calculated).

This introduces regression if deep probe support is used. If da9063
GPIOs are registered before the SOCs GPIOs, there is a good chance that
the SOCs statically computed GPIO line numbers will already be used by
PMIC.

Ensure all SOCs GPIO drivers and GPIO lines get registered before the
da9063 registers its own gpiochip.

Signed-off-by: Andrej Picej <andrej.picej@xxxxxxxxx>
---
Changes in v2:
- move function from da9062 probe to board file
---
 arch/arm/boards/phytec-som-imx6/board.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index 1e515a093a..5dc7f676ed 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -111,6 +111,10 @@ static int phycore_da9062_setup_buck_mode(void)
 	if (!pmic_np)
 		return -ENODEV;
 
+	ret = of_device_ensure_probed_by_alias_stem(pmic_np, "gpio");
+	if (ret)
+		return ret;
+
 	ret = of_device_ensure_probed(pmic_np);
 	if (ret)
 		return ret;
-- 
2.25.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux