boards: spresense: Add delay only for PMIC GPO setting

When RTC clock is still unstable, add a delay time only for PMIC GPO
setting to avoid a problem that the setting is not reflected.
This commit is contained in:
SPRESENSE 2021-05-19 17:48:28 +09:00 committed by Alin Jerpelea
parent 8403fe6503
commit 8b5425d661

View File

@ -206,9 +206,9 @@ int board_power_control(int target, bool en)
{
ret = pfunc(PMIC_GET_CH(target), en);
/* If RTC clock is unstable, delay 1 tick for PMIC setting. */
/* If RTC clock is unstable, delay 1 tick for PMIC GPO setting. */
if (!g_rtc_enabled)
if (!g_rtc_enabled && (PMIC_GET_TYPE(target) == PMIC_TYPE_GPO))
{
usleep(1);
}