samsung: board: init the s2mps11 pmic during booting time
authorJaehoon Chung <jh80.chung@samsung.com>
Mon, 29 Jan 2018 04:53:19 +0000 (13:53 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Wed, 2 May 2018 01:57:43 +0000 (10:57 +0900)
Exynos5422 board has s2mps11 pmic.
If CONFIG_PMIC_S2MPS11 is enabled, it can initialize PMIC and Regulators
during booting time.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
board/samsung/common/exynos5-dt.c

index a4eb3514051e9851f3c60cdcc9cc45bcfe7fb2b0..862644b00e4142b4187ac65e6b6e54824fa20237 100644 (file)
@@ -93,6 +93,9 @@ int exynos_power_init(void)
        struct udevice *dev;
        int ret;
 
+#ifdef CONFIG_PMIC_S2MPS11
+       ret = pmic_get("s2mps11_pmic", &dev);
+#else
        ret = pmic_get("max77686", &dev);
        if (!ret) {
                /* TODO(sjg@chromium.org): Move into the clock/pmic API */
@@ -112,6 +115,7 @@ int exynos_power_init(void)
                        s5m8767_enable_32khz_cp(dev);
 #endif
        }
+#endif /* CONFIG_PMIC_S2MPS11 */
        if (ret == -ENODEV)
                return 0;