/* * To determine which power mode system enter, check clock or power * registers and other devices by notifier. */ int determine_lpm(void) { if (!((exynos_check_aud_pwr() == AUD_PWR_LPA) || (exynos_check_aud_pwr() == AUD_PWR_ALPA))) return SYS_AFTR; if (exynos_lpa_prepare()) { lpa_blocking_counter(0); return SYS_AFTR; } if (check_reg_status(check_reg_lpm, ARRAY_SIZE(check_reg_lpm))) { lpa_blocking_counter(1); return SYS_AFTR; } #ifdef CONFIG_SND_SAMSUNG_AUDSS if (exynos_check_aud_pwr() == AUD_PWR_ALPA) #if defined(CONFIG_SOC_EXYNOS5433) return SYS_AFTR; #else return SYS_ALPA; #endif #endif return SYS_LPA; }
static int is_lpc_available(unsigned int target_residency) { if (!lpc_enabled) return false; if (is_jig_attached()) return false; if (is_cpus_busy(target_residency, cpu_possible_mask)) return false; if (check_reg_status(check_reg_lpc, ARRAY_SIZE(check_reg_lpc))) return false; if (exynos_check_aud_pwr() > AUD_PWR_LPA) return false; if (is_dll_on()) return false; if (pwm_check_enable_cnt()) return false; if (exynos_lpc_prepare()) return false; return true; }
int determine_lpm(void) { if (exynos_check_aud_pwr() != AUD_PWR_LPA) return SYS_AFTR; if (check_hw_status(lpm_regs, lpm_reg_num)) { lpa_blocking_counter(1); return SYS_AFTR; } if (exynos_lpa_prepare()) { lpa_blocking_counter(0); return SYS_AFTR; } #if defined(CONFIG_GPS_BCMxxxxx) if (check_gps_op()) return SYS_AFTR; #endif if (check_cp_status()) { lpa_blocking_counter(2); return SYS_AFTR; } return SYS_LPA; }