On 4/12/2012 3:01 PM, Laxman Dewangan wrote:Intersil's ISL29028 is concurrent Ambient Light andVery nearly there. The available attributes need to match naming
Proximity Sensor device.
Add driver to access the light and IR intensity and
proximity value via iio interface.
of what they are providing values for. (we need a better way of handling
these but that's a job for another day).
Otherwise, all good.
+ mutex_unlock(&chip->lock);tiny disconnect now that you have in_proximity0_sampling frequency, this
+ return ret;
+}
+
+static IIO_CONST_ATTR(proximity_sampling_frequency_available,
+ "1, 3, 5, 10, 13, 20, 83, 100");
+static IIO_CONST_ATTR(illuminance_scale_available, "125, 2000");
+
+#define ISL29028_DEV_ATTR(name) (&iio_dev_attr_##name.dev_attr.attr)
+#define ISL29028_CONST_ATTR(name) (&iio_const_attr_##name.dev_attr.attr)
+static struct attribute *isl29028_attributes[] = {
+ ISL29028_CONST_ATTR(proximity_sampling_frequency_available),
should be in_proximity0_sampling_frequency_available
+ ISL29028_CONST_ATTR(illuminance_scale_available),snap here (sorry, missed that last time).
in_illuminance0_scale_available