Ejemplo n.º 1
0
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;
}
bool is_lpc_available(unsigned int target_residency)
{
	if (!lpc_enabled)
		return false;

	if (is_busy(target_residency, cpu_online_mask))
		return false;

	if (check_hw_status(lpc_regs, lpc_reg_num))
		return false;

	if (exynos_lpc_prepare())
		return false;

	if (pwm_check_enable_cnt())
		return false;

#if defined(CONFIG_GPS_BCMxxxxx)
	if (check_gps_op())
		return false;
#endif

	if (check_cp_status())
		return false;

	return true;
}