Signed-off-by: Siarhei Siamashka <[email protected]>
---
drivers/power/axp_power/axp20-mfd.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/power/axp_power/axp20-mfd.h
b/drivers/power/axp_power/axp20-mfd.h
index 0021fb5..6ec26f6 100644
--- a/drivers/power/axp_power/axp20-mfd.h
+++ b/drivers/power/axp_power/axp20-mfd.h
@@ -39,6 +39,8 @@ show_temp(struct device *dev, struct device_attribute
*devattr, char *buf)
return sprintf(buf, "264800\n");
if (attr->index == 2)
return sprintf(buf, "-144700\n");
+ if (attr->index == 3)
+ return sprintf(buf, "AXP20X temperature\n");
return sprintf(buf, "%d\n", data->temperature * 100);
}
@@ -46,11 +48,13 @@ show_temp(struct device *dev, struct device_attribute
*devattr, char *buf)
static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL, 0);
static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO, show_temp, NULL, 1);
static SENSOR_DEVICE_ATTR(temp1_min, S_IRUGO, show_temp, NULL, 2);
+static SENSOR_DEVICE_ATTR(temp1_label, S_IRUGO, show_temp, NULL, 3);
static struct attribute *axp20_attributes[] = {
&sensor_dev_attr_temp1_input.dev_attr.attr,
&sensor_dev_attr_temp1_min.dev_attr.attr,
&sensor_dev_attr_temp1_max.dev_attr.attr,
+ &sensor_dev_attr_temp1_label.dev_attr.attr,
NULL
};
--
1.8.3.2
--
You received this message because you are subscribed to the Google Groups
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.