Message ID | 20180129045319.5406-1-jh80.chung@samsung.com |
---|---|
State | Accepted |
Commit | 4f0a8bf669f24771d1e4ca89a1f2b1ca39e50e47 |
Delegated to: | Jaehoon Chung |
Headers | show |
Series | [U-Boot,v2] samsung: board: init the s2mps11 pmic during booting time | expand |
Hi Jaehoon, > 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> > --- > Changelog on V2: > - Fix the #endif location > > board/samsung/common/exynos5-dt.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/board/samsung/common/exynos5-dt.c > b/board/samsung/common/exynos5-dt.c index a4eb351405..862644b00e > 100644 --- a/board/samsung/common/exynos5-dt.c > +++ b/board/samsung/common/exynos5-dt.c > @@ -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); Cannot this be added to DT? We use #ifdefs in a file, which is supposed to parse DT config. > 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; > Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
On 01/29/2018 06:12 PM, Lukasz Majewski wrote: > Hi Jaehoon, > >> 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> >> --- >> Changelog on V2: >> - Fix the #endif location >> >> board/samsung/common/exynos5-dt.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/board/samsung/common/exynos5-dt.c >> b/board/samsung/common/exynos5-dt.c index a4eb351405..862644b00e >> 100644 --- a/board/samsung/common/exynos5-dt.c >> +++ b/board/samsung/common/exynos5-dt.c >> @@ -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); > > Cannot this be added to DT? We use #ifdefs in a file, which is supposed > to parse DT config. Will do. Best Regards, Jaehoon Chung > >> 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; >> > > > Best regards, > > Lukasz Majewski > > -- > > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de >
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c index a4eb351405..862644b00e 100644 --- a/board/samsung/common/exynos5-dt.c +++ b/board/samsung/common/exynos5-dt.c @@ -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;