예제 #1
0
static ssize_t store_lcd_display_kcal(struct device *dev,struct device_attribute *attr, const char *buf, size_t size)
{
	int is_white = 0;
	sscanf(buf, "%d",&is_white);
	
	if (is_white)
		mtkfb_display_kcal(1); //white display
	else
		mtkfb_display_kcal(0); //normal display
	
	return size;
}
예제 #2
0
static ssize_t store_lcd_kcal(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
{
	int r = 255;
	int g = 255;
	int b = 255;
	char is_store = 'k';

	sscanf(buf, "%d %d %d %c", &r, &g, &b, &is_store);
	printk("\n\n\n    [LCD] r =   %d, g =   %d,  b = %d, is_store = %c  %d \n\n",r,g,b,is_store,is_store);
	if(is_store == 75/*'K'*/) // ascii code 'K' == 75
	{
		set_kcal_value(r, g, b);  // store and ..
#if 1  //               
                disp_set_gamma_lut(r, g, b);
#else
		update_kcal_register(r, g, b);  // register reflash
#endif
	}
	else
	{
#if 1  //               
                disp_set_gamma_lut(r, g, b);
#else
		update_kcal_register(r, g, b);  // not store, just reflash for lcd register
#endif
	}
	mtkfb_display_kcal(0);  //normal display

	return size;
}
예제 #3
0
static ssize_t store_lcd_display_kcal(struct device *dev, struct device_attribute *attr, const char *buf, size_t size)
{
	int is_white = 0;
	sscanf(buf, "%d", &is_white);
	printk("[LCD]store_lcd_display_kcal, is_white : %d\n", is_white);

	if(is_white)
	{
		mtkfb_display_kcal(1);  // white display
		white_display = 1;
	}
	else
	{
		mtkfb_display_kcal(0);  // normal display
		white_display = 0;
	}
	return size;
}