public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2] iio: light: isl29125: Add scale_available information
@ 2015-06-20 21:51 Peter Meerwald
  2015-06-21  9:48 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Meerwald @ 2015-06-20 21:51 UTC (permalink / raw)
  To: linux-iio; +Cc: jic23, Peter Meerwald

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
---
v1 didn't even compile, sorry

 drivers/iio/light/isl29125.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/iio/light/isl29125.c b/drivers/iio/light/isl29125.c
index c82f4a6..b3cbbe8 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,
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-21  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-20 21:51 [PATCHv2] iio: light: isl29125: Add scale_available information Peter Meerwald
2015-06-21  9:48 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox