summaryrefslogtreecommitdiff
path: root/drivers/iio/light
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2015-06-21 00:51:38 +0300
committerJonathan Cameron <jic23@kernel.org>2015-06-21 12:48:07 +0300
commit208335138001015fd7c5c986b39e05fffad1c528 (patch)
tree13cddb6b5bba0633d5928ac6187098bde0af66e1 /drivers/iio/light
parent30e8326728fff4c66377bd3ba99266cf8489c915 (diff)
downloadlinux-208335138001015fd7c5c986b39e05fffad1c528.tar.xz
iio: light: isl29125: Add scale_available information
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r--drivers/iio/light/isl29125.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/iio/light/isl29125.c b/drivers/iio/light/isl29125.c
index c82f4a6f8464..b3cbbe830141 100644
--- a/drivers/iio/light/isl29125.c
+++ b/drivers/iio/light/isl29125.c
@@ -197,9 +197,21 @@ done:
return IRQ_HANDLED;
}
+static IIO_CONST_ATTR(scale_available, "0.005722 0.152590");
+
+static struct attribute *isl29125_attributes[] = {
+ &iio_const_attr_scale_available.dev_attr.attr,
+ NULL
+};
+
+static const struct attribute_group isl29125_attribute_group = {
+ .attrs = isl29125_attributes,
+};
+
static const struct iio_info isl29125_info = {
.read_raw = isl29125_read_raw,
.write_raw = isl29125_write_raw,
+ .attrs = &isl29125_attribute_group,
.driver_module = THIS_MODULE,
};