Beispiel #1
0
int mdss_edp_off(struct mdss_panel_data *pdata)
{
	struct mdss_edp_drv_pdata *edp_drv = NULL;
	int ret = 0;
	int i;

	edp_drv = container_of(pdata, struct mdss_edp_drv_pdata,
				panel_data);
	if (!edp_drv) {
		pr_err("%s: Invalid input data\n", __func__);
		return -EINVAL;
	}

	gpio_set_value(edp_drv->gpio_panel_en, 0);
	pwm_disable(edp_drv->bl_pwm);
	mdss_edp_enable(edp_drv->edp_base, 0);
	mdss_edp_unconfig_clk(edp_drv->edp_base, edp_drv->mmss_cc_base);
	mdss_edp_enable_mainlink(edp_drv->edp_base, 0);

	for (i = 0; i < edp_drv->dpcd.max_lane_count; ++i)
		mdss_edp_enable_lane_bist(edp_drv->edp_base, i, 0);

	mdss_edp_clk_disable(edp_drv);
	mdss_edp_hw_powerup(edp_drv->edp_base, 0);
	mdss_edp_unprepare_clocks(edp_drv);

	return ret;
}
Beispiel #2
0
int mdss_edp_off(struct mdss_panel_data *pdata)
{
	struct mdss_edp_drv_pdata *edp_drv = NULL;
	int ret = 0;

	edp_drv = container_of(pdata, struct mdss_edp_drv_pdata,
				panel_data);
	if (!edp_drv) {
		pr_err("%s: Invalid input data\n", __func__);
		return -EINVAL;
	}
	pr_debug("%s:+\n", __func__);

	mdss_edp_irq_disable(edp_drv);

	gpio_set_value(edp_drv->gpio_panel_en, 0);
	if (edp_drv->bl_pwm != NULL)
		pwm_disable(edp_drv->bl_pwm);
	mdss_edp_enable(edp_drv->base, 0);
	mdss_edp_unconfig_clk(edp_drv->base, edp_drv->mmss_cc_base);
	mdss_edp_enable_mainlink(edp_drv->base, 0);

	mdss_edp_lane_power_ctrl(edp_drv->base,
				edp_drv->dpcd.max_lane_count, 0);
	mdss_edp_clk_disable(edp_drv);
	mdss_edp_phy_powerup(edp_drv->base, 0);
	mdss_edp_unprepare_clocks(edp_drv);
	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF, false);

	mdss_edp_aux_ctrl(edp_drv->base, 0);

	pr_debug("%s:-\n", __func__);
	return ret;
}