Exemplo n.º 1
0
static void shooter_3Dpanel_off(void)
{
	int rc;

	if (mipi_novatek_panel_data.mipi_send_cmds) {
		mipi_novatek_panel_data.mipi_send_cmds(novatek_2vci_cmds, ARRAY_SIZE(novatek_2vci_cmds));
	}

	if(system_rev >= 1) {
		pwm_gpio_config.output_value = 0;
		rc = pm8058_gpio_config(SHOOTER_3DLCM_PD, &pwm_gpio_config);
		if (rc < 0)
			pr_err("%s pmic gpio config gpio %d failed\n", __func__, SHOOTER_3DLCM_PD);
	}
	mdp_color_enhancement(mdp_sharp_barrier_off, ARRAY_SIZE(mdp_sharp_barrier_off));
	pwm_disable(pwm_3d);

	rc = pm8058_gpio_config(SHOOTER_3DCLK, &clk_gpio_config_off);
	if (rc < 0)
		pr_err("%s pmic gpio config gpio %d failed\n", __func__, SHOOTER_3DCLK);
	gpio_set_value(SHOOTER_CTL_3D_1, 0);
	gpio_set_value(SHOOTER_CTL_3D_2, 0);
	gpio_set_value(SHOOTER_CTL_3D_3, 0);
	gpio_set_value(SHOOTER_CTL_3D_4, 0);
	led_brightness_switch("lcd-backlight", last_br_2d);
}
Exemplo n.º 2
0
static void shooter_3Dpanel_on(bool bLandscape)
{
	struct pw8058_pwm_config pwm_conf;
	int rc;

	if (mipi_novatek_panel_data.mipi_send_cmds) {
		mipi_novatek_panel_data.mipi_send_cmds(novatek_3vci_cmds, ARRAY_SIZE(novatek_3vci_cmds));
	}
	led_brightness_switch("lcd-backlight", 255);

	if(system_rev >= 1) {
		pwm_gpio_config.output_value = 1;
		rc = pm8058_gpio_config(SHOOTER_3DLCM_PD, &pwm_gpio_config);
		if (rc < 0)
			pr_err("%s pmic gpio config gpio %d failed\n", __func__, SHOOTER_3DLCM_PD);
	}

	rc = pm8058_gpio_config(SHOOTER_3DCLK, &clk_gpio_config_on);
	if (rc < 0)
		pr_err("%s pmic gpio config gpio %d failed\n", __func__, SHOOTER_3DCLK);

	pwm_disable(pwm_3d);
	pwm_conf.pwm_size = 9;
	pwm_conf.clk = PM_PWM_CLK_19P2MHZ;
	pwm_conf.pre_div = PM_PWM_PREDIVIDE_3;
	pwm_conf.pre_div_exp = 6;
	pwm_conf.pwm_value = 255;
	pwm_conf.bypass_lut = 1;
	pwm_configure(pwm_3d, &pwm_conf);
	pwm_enable(pwm_3d);

	if(bLandscape) {
		mdp_color_enhancement(mdp_sharp_barrier_on, ARRAY_SIZE(mdp_sharp_barrier_on));
		gpio_set_value(SHOOTER_CTL_3D_1, 1);
		gpio_set_value(SHOOTER_CTL_3D_2, 1);
		gpio_set_value(SHOOTER_CTL_3D_3, 1);
		gpio_set_value(SHOOTER_CTL_3D_4, 0);
	} else {
		mdp_color_enhancement(mdp_sharp_barrier_on, ARRAY_SIZE(mdp_sharp_barrier_on));
		gpio_set_value(SHOOTER_CTL_3D_1, 1);
		gpio_set_value(SHOOTER_CTL_3D_2, 1);
		gpio_set_value(SHOOTER_CTL_3D_3, 0);
		gpio_set_value(SHOOTER_CTL_3D_4, 1);
	}
}
Exemplo n.º 3
0
static void shooter_3Dpanel_on(bool bLandscape)
{
	struct pm8058_pwm_period pwm_conf;
	int rc;

	led_brightness_switch("lcd-backlight", 255);

	if (system_rev >= 1) {
		pwm_gpio_config.output_value = 1;
		rc = pm8xxx_gpio_config(PM8058_GPIO_PM_TO_SYS(SHOOTER_3DLCM_PD), &pwm_gpio_config);
		if (rc < 0)
			pr_err("%s pmic gpio config gpio %d failed\n", __func__, PM8058_GPIO_PM_TO_SYS(SHOOTER_3DLCM_PD));
	}

	rc = pm8xxx_gpio_config(PM8058_GPIO_PM_TO_SYS(SHOOTER_3DCLK), &clk_gpio_config_on);
	if (rc < 0)
		pr_err("%s pmic gpio config gpio %d failed\n", __func__, SHOOTER_3DCLK);

	pwm_disable(pwm_3d);
	pwm_conf.pwm_size = 9;
	pwm_conf.clk = PM_PWM_CLK_19P2MHZ;
	pwm_conf.pre_div = PM_PWM_PREDIVIDE_3;
	pwm_conf.pre_div_exp = 6;
	rc = pwm_configure(pwm_3d, &pwm_conf, 1, 255);
	if (rc < 0)
		pr_err("%s pmic configure %d\n", __func__, rc);
	pwm_enable(pwm_3d);

	if (bLandscape) {
		mdp4_dsi_color_enhancement(mdp_sharp_barrier_on, ARRAY_SIZE(mdp_sharp_barrier_on));
		gpio_set_value(SHOOTER_CTL_3D_1, 1);
		gpio_set_value(SHOOTER_CTL_3D_2, 1);
		gpio_set_value(SHOOTER_CTL_3D_3, 1);
		gpio_set_value(SHOOTER_CTL_3D_4, 0);
	} else {
		mdp4_dsi_color_enhancement(mdp_sharp_barrier_on, ARRAY_SIZE(mdp_sharp_barrier_on));
		gpio_set_value(SHOOTER_CTL_3D_1, 1);
		gpio_set_value(SHOOTER_CTL_3D_2, 1);
		gpio_set_value(SHOOTER_CTL_3D_3, 0);
		gpio_set_value(SHOOTER_CTL_3D_4, 1);
	}
}
Exemplo n.º 4
0
static void shooter_u_3Dpanel_off(void)
{
	int rc;
	pwm_gpio_config.output_value = 0;
	rc = pm8xxx_gpio_config(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_3DLCM_PD), &pwm_gpio_config);
	if (rc < 0)
		pr_err("%s pmic gpio config gpio %d failed\n", __func__, SHOOTER_U_3DLCM_PD);

	mdp4_dsi_color_enhancement(mdp_sharp_barrier_off, ARRAY_SIZE(mdp_sharp_barrier_off));
	pwm_disable(pwm_3d);

	rc = pm8xxx_gpio_config(PM8058_GPIO_PM_TO_SYS(SHOOTER_U_3DCLK), &clk_gpio_config_off);
	if (rc < 0)
		pr_err("%s pmic gpio config gpio %d failed\n", __func__, SHOOTER_U_3DCLK);
	gpio_set_value(SHOOTER_U_CTL_3D_1, 0);
	gpio_set_value(SHOOTER_U_CTL_3D_2, 0);
	gpio_set_value(SHOOTER_U_CTL_3D_3, 0);
	gpio_set_value(SHOOTER_U_CTL_3D_4, 0);
	led_brightness_switch("lcd-backlight", last_br_2d);
}