当前位置: 首页>>代码示例>>C++>>正文


C++ set_mdnie_value函数代码示例

本文整理汇总了C++中set_mdnie_value函数的典型用法代码示例。如果您正苦于以下问题:C++ set_mdnie_value函数的具体用法?C++ set_mdnie_value怎么用?C++ set_mdnie_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了set_mdnie_value函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: auto_brightness_store

static ssize_t auto_brightness_store(struct device *dev,
	struct device_attribute *attr, const char *buf, size_t size)
{
	struct mdnie_info *mdnie = dev_get_drvdata(dev);
	int value;
	int rc;

	rc = strict_strtoul(buf, (unsigned int)0, (unsigned long *)&value);
	if (rc < 0)
		return rc;
	else {
		if (mdnie->auto_brightness != value) {
			dev_info(dev, "%s - %d -> %d\n", __func__, mdnie->auto_brightness, value);
			mutex_lock(&mdnie->dev_lock);
			mdnie->auto_brightness = value;
#if defined(CONFIG_FB_S5P_S6C1372)
			mutex_lock(&mdnie->lock);
			mdnie->cabc = (value) ? CABC_ON : CABC_OFF;
			mutex_unlock(&mdnie->lock);
#endif
			if (mdnie->auto_brightness >= 5)
				mdnie->power_lut_idx = LUT_LEVEL_OUTDOOR_2;
			else if (mdnie->auto_brightness == 4)
				mdnie->power_lut_idx = LUT_LEVEL_OUTDOOR_1;
			else
				mdnie->power_lut_idx = LUT_LEVEL_MANUAL_AND_INDOOR;
			mutex_unlock(&mdnie->dev_lock);
			set_mdnie_value(mdnie, 0);
			if (mdnie->bd_enable)
				update_brightness(mdnie);
		}
	}
	return size;
}
开发者ID:perillamint,项目名称:tizen-linux-3.0,代码行数:34,代码来源:mdnie.c

示例2: mdnie_late_resume

void mdnie_late_resume(struct early_suspend *h)
{
	u32 i;
	struct mdnie_info *mdnie = container_of(h, struct mdnie_info, early_suspend);
	struct lcd_platform_data *pd = NULL;

	dev_info(mdnie->dev, "+%s\n", __func__);

#if defined(CONFIG_FB_MDNIE_PWM)
	pd = mdnie->lcd_pd;

	if (mdnie->enable)
		mdnie_pwm_control(mdnie, 0);

	if (!pd)
		dev_info(&mdnie->bd->dev, "platform data is NULL.\n");

	if (!pd->power_on)
		dev_info(&mdnie->bd->dev, "power_on is NULL.\n");
	else
		pd->power_on(NULL, 1);

	if (mdnie->enable) {
		dev_info(&mdnie->bd->dev, "brightness=%d\n", mdnie->bd->props.brightness);
		update_brightness(mdnie);
	}

	mdnie->bd_enable = TRUE;
#endif

	set_mdnie_value(mdnie, 1);

	dev_info(mdnie->dev, "-%s\n", __func__);
	for (i = 0; i < 5; i++) {
		if (negative[i].enable)
			dev_info(mdnie->dev, "pid=%d, %s, %s\n", negative[i].pid, negative[i].comm, negative[i].time);
	}

	return ;
}
开发者ID:ffolkes,项目名称:android_kernel_samsung_smdk4412,代码行数:40,代码来源:mdnie.c


注:本文中的set_mdnie_value函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。