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; }
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\n 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.. update_kcal_register(r, g, b); //register reflash } else { update_kcal_register(r, g, b); //not store, just reflash for lcd register } return size; }