예제 #1
0
static void mdss_mdp_footswitch_ctrl(struct mdss_data_type *mdata, int on)
{
	if (!mdata->fs)
		return;

	if (on) {
		pr_debug("Enable MDP FS\n");
		if (!mdata->fs_ena)
			regulator_enable(mdata->fs);
		mdata->fs_ena = true;
	} else {
		pr_debug("Disable MDP FS\n");
		mdss_iommu_dettach(mdata);
		if (mdata->fs_ena)
			regulator_disable(mdata->fs);
		mdata->fs_ena = false;
	}
}
예제 #2
0
void mdss_mdp_footswitch_ctrl(int on)
{
	mutex_lock(&mdp_suspend_mutex);
	if (!mdss_res->suspend || mdss_res->eintf_ena || !mdss_res->fs) {
		mutex_unlock(&mdp_suspend_mutex);
		return;
	}

	if (on && !mdss_res->fs_ena) {
		pr_debug("Enable MDP FS\n");
		regulator_enable(mdss_res->fs);
		mdss_iommu_attach();
		mdss_res->fs_ena = true;
	} else if (!on && mdss_res->fs_ena) {
		pr_debug("Disable MDP FS\n");
		mdss_iommu_dettach();
		regulator_disable(mdss_res->fs);
		mdss_res->fs_ena = false;
	}
	mutex_unlock(&mdp_suspend_mutex);
}