static ssize_t adp5520_bl_daylight_max_store(struct device *dev,
			struct device_attribute *attr,
			const char *buf, size_t count)
{
	struct adp5520_bl *data = dev_get_drvdata(dev);
	int ret;

	ret = strict_strtoul(buf, 10, &data->cached_daylight_max);
	if (ret < 0)
		return ret;

	return adp5520_store(dev, buf, count, ADP5520_DAYLIGHT_MAX);
}
static ssize_t adp5520_bl_daylight_dim_store(struct device *dev,
			struct device_attribute *attr,
			const char *buf, size_t count)
{
	return adp5520_store(dev, buf, count, ADP5520_DAYLIGHT_DIM);
}
static ssize_t adp5520_bl_office_dim_store(struct device *dev,
			struct device_attribute *attr,
			const char *buf, size_t count)
{
	return adp5520_store(dev, buf, count, ADP5520_OFFICE_DIM);
}
static ssize_t adp5520_bl_dark_max_store(struct device *dev,
			struct device_attribute *attr,
			const char *buf, size_t count)
{
	return adp5520_store(dev, buf, count, ADP5520_DARK_MAX);
}
Exemplo n.º 5
0
static ssize_t adp5520_bl_dark_dim_store(struct device *dev,
				     struct device_attribute *attr,
				     const char *buf, size_t count)
{
	return adp5520_store(dev, buf, count, DARK_DIM);
}
Exemplo n.º 6
0
static ssize_t adp5520_bl_office_max_store(struct device *dev,
		struct device_attribute *attr, const char *buf, size_t count)
{
	return adp5520_store(dev, buf, count, OFFICE_MAX);
}