コード例 #1
0
ファイル: board-bravo-panel.c プロジェクト: Redux/rx-kernel
static int sony_tft_panel_unblank(struct msm_lcdc_panel_ops *ops)
{
	pr_info("%s: +()\n", __func__);

	mutex_lock(&panel_lock);

	if (tft_panel_on) {
		pr_info("%s: -() already unblanked\n", __func__);
		goto done;
	}

	sony_tft_panel_power(1);
	msleep(45);

	clk_enable(spi_clk);
	qspi_send_9bit(0x0, 0x11);
	msleep(5);
	qspi_send_9bit(0x0, 0x3a);
	if (is_sony_RGB666())
		qspi_send_9bit(0x1, 0x06);
	else
		qspi_send_9bit(0x1, 0x05);
	msleep(100);
	qspi_send_9bit(0x0, 0x29);
	msleep(20);

	//init gamma setting
	if(!is_sony_with_gamma())
		sony_tft_panel_without_gamma_init();

	/* unlock register page for pwm setting */
	if (is_sony_spi()) {
		qspi_send_9bit(0x0, 0xf0);
		qspi_send_9bit(0x1, 0x5a);
		qspi_send_9bit(0x1, 0x5a);
		qspi_send_9bit(0x0, 0xf1);
		qspi_send_9bit(0x1, 0x5a);
		qspi_send_9bit(0x1, 0x5a);
		qspi_send_9bit(0x0, 0xd0);
		qspi_send_9bit(0x1, 0x5a);
		qspi_send_9bit(0x1, 0x5a);

		qspi_send_9bit(0x0, 0xc2);
		qspi_send_9bit(0x1, 0x53);
		qspi_send_9bit(0x1, 0x12);
	}
	clk_disable(spi_clk);
	msleep(100);
	tft_panel_on = 1;
	sony_tft_set_pwm_val(last_val);

	pr_info("%s: -()\n", __func__);
done:
	mutex_unlock(&panel_lock);
	return 0;
}
コード例 #2
0
static int sonywvga_panel_unblank(struct msm_lcdc_panel_ops *panel_data)
{
	LCMDBG("%s\n", __func__);

        wake_lock(&panel_idle_lock);
        mutex_lock(&panel_lock);

	hr_msleep(100);
	qspi_send_9bit(&unblank_msg);
	hr_msleep(20);
	//init gamma setting
	if(!is_sony_with_gamma())
		lcm_write_tb(SONY_TFT_INIT_TABLE,
			ARRAY_SIZE(SONY_TFT_INIT_TABLE));

	sonywvga_set_gamma_val(last_val_pwm);

	g_unblank_stage = 1;

        mutex_unlock(&panel_lock);
        wake_unlock(&panel_idle_lock);

	return 0;
}