Example #1
0
static int panel_n1_spi_resume(struct spi_device *spi)
{
	printk(KERN_INFO "\n ************ %s : %d \n", __func__, __LINE__);
    n1_panel_reconfig_pins();
    n1_panel_enable();
	return 0;
}
Example #2
0
void lcd_power_on(void)
{
	n1_panel_enable();

	//gpio_set_value(GPIO_LCD_LDO_LED_EN, 1);

	lcdonoff_test = 1;
}
Example #3
0
static void n1_panel_late_resume(struct early_suspend *h)
{
	printk(KERN_INFO "\n ************ %s : %d\n", __func__, __LINE__);

	if (num_registered_fb > 0)
		fb_blank(registered_fb[0], FB_BLANK_UNBLANK);

#ifdef CONFIG_CPU_FREQ
	cpufreq_restore_default_governor(CPUFREQ_DISP_MODE);
#endif

	cmc623_resume(NULL);

	n1_panel_reconfig_pins(); //sjlee_0414 (sleep current problem)
  n1_panel_enable();
}
Example #4
0
static int panel_n1_spi_probe(struct spi_device *spi)
{
	int ret;

	spi->bits_per_word = 9;
	spi->mode = SPI_MODE_3;
	spi->max_speed_hz = 1000000;

	ret = spi_setup(spi);
	if (ret < 0) {
		dev_err(&spi->dev, "spi_setup failed: %d\n", ret);
		return ret;
	}

	printk(KERN_INFO "%s: probe\n", __func__);

	ret = gpio_request(n1_lvds_reset, "lvds_reset");
	if (ret < 0)
		printk(KERN_INFO "%s: gpio_request failed with %d \n", __func__, ret);
	tegra_gpio_enable(n1_lvds_reset);

//LCD_ONOFF_TEST, LCD_TYPE
	tune_lcd_dev = device_create(sec_class, NULL, 0, NULL, "sec_tune_lcd");

	if (IS_ERR(tune_lcd_dev)) 
    	{
		printk("Failed to create device!");
		ret = -1;
	}
//LCD_ONOFF_TEST, LCD_TYPE

#if LCD_ONOFF_TEST
	if (device_create_file(tune_lcd_dev, &dev_attr_lcd_onoff) < 0) {
		printk("Failed to create device file!(%s)!\n", dev_attr_lcd_onoff.attr.name);
		ret = -1;
	}
#endif

#if LCD_TYPE
	if (device_create_file(tune_lcd_dev, &dev_attr_lcdtype) < 0) {
		printk("Failed to create device file!(%s)!\n", dev_attr_lcdtype.attr.name);
		ret = -1;
	}
#endif //LCD_TYPE
	printk(KERN_INFO "%s: device_create_file(tune_lcd_dev, &dev_attr_lcdtype) \n", __func__);

	reg_lcd_1v8 = regulator_get(NULL, "VLCD_1V8");
	if (IS_ERR(reg_lcd_1v8)) {
		printk(KERN_INFO "%s: VLCD_1V8 regulator not found\n", __func__);
		reg_lcd_1v8 = NULL;
	} else {
		regulator_set_voltage(reg_lcd_1v8, 1800*1000,1800*1000);
//		regulator_enable(reg_lcd_1v8);
	}

	reg_lcd_3v0 = regulator_get(NULL, "VLCD_3V0");
	if (IS_ERR(reg_lcd_3v0)) {
		printk(KERN_INFO "%s: VLCD_3V0 regulator not found\n", __func__);
		reg_lcd_3v0 = NULL;
	} else {
		regulator_set_voltage(reg_lcd_3v0, 3000*1000,3000*1000);
//		regulator_enable(reg_lcd_3v0);
	}

	n1_disp1_spi = spi;

	n1_panel_early_suspend.level =  EARLY_SUSPEND_LEVEL_STOP_DRAWING - 1;
//	n1_panel_early_suspend.level =  EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1;/* EARLY_SUSPEND_LEVEL_DISABLE_FB; */
//	n1_panel_early_suspend.level =  EARLY_SUSPEND_LEVEL_DISABLE_FB-1;
	n1_panel_early_suspend.suspend = panel_n1_spi_suspend;
	n1_panel_early_suspend.resume = panel_n1_spi_resume;
	register_early_suspend(&n1_panel_early_suspend);
	
	n1_panel_enable();
	muxtex_temp = 2 ;

	return 0;
}