コード例 #1
0
static ssize_t intensity_store(struct kobject *kobj, struct kobj_attribute *attr,
    const char *buf, size_t size)
{
	ssize_t ret = 0;
	int val;
	static bool is_firsttime = true;
	sscanf(buf, "%d", &val);
	pr_err("sss %s state=%d size=%d\n", __func__, (int)val, (int)size);
	v5_intensity_value = val;
	if (is_firsttime) {
		is_firsttime = false;
		return ret;
	}
#if defined( CONFIG_ZTEMT_LCD_Z5MINI_SIZE_4P7)
	zte_mipi_disp_inc_nt35590(val);
#else
	zte_mipi_disp_inc(val);
#endif
	#if 0
	char *after;
	unsigned int state = simple_strtoul(buf, &after, 10);
	size_t count = after - buf;
	pr_err("sss %s state=%d size=%d\n", __func__, (int)state, (int)size);
	if (isspace(*after))
		count++;

	if (count == size) {
		ret = count;
		zte_mipi_disp_inc(state);
	}
	#endif
	return ret;


}
コード例 #2
0
static ssize_t intensity_store(struct kobject *kobj, struct kobj_attribute *attr,
    const char *buf, size_t size)
{
	ssize_t ret = 0;
	int val;
	static bool is_firsttime = true;
	sscanf(buf, "%d", &val);

#ifdef ZTE_DISP_ENHANCE_DEBUG
	printk("lcd:%s state=%d size=%d\n", __func__, (int)val, (int)size);
#endif
	zte_intensity_value = val;
	if (is_firsttime) {
		is_firsttime = false;
		return ret;
	}
	zte_mipi_disp_inc(val);

	return ret;
}
コード例 #3
0
void zte_disp_enhance(void)
{
  zte_mipi_disp_inc(zte_intensity_value);
}