linux_old1/drivers/iio
Jonathan Cameron 5123960007 iio:core: add a callback to allow drivers to provide _available attributes
A large number of attributes can only take a limited range of values.
Currently in IIO this is handled by directly registering additional
*_available attributes thus providing this information to userspace.

It is desirable to provide this information via the core for much the same
reason this was done for the actual channel information attributes in the
first place.  If it isn't there, then it can only really be accessed from
userspace.  Other in kernel IIO consumers have no access to what valid
parameters are.

Two forms are currently supported:
* list of values in one particular IIO_VAL_* format.
	e.g. 1.300000 1.500000 1.730000
* range specification with a step size:
	e.g. [1.000000 0.500000 2.500000]
	equivalent to 1.000000 1.5000000 2.000000 2.500000

An addition set of masks are used to allow different sharing rules for the
*_available attributes generated.

This allows for example:

in_accel_x_offset
in_accel_y_offset
in_accel_offset_available.

We could have gone with having a specification for each and every
info_mask element but that would have meant changing the existing userspace
ABI.  This approach does not.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
[forward ported, added some docs and fixed buffer overflows /peda]
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-11-13 11:40:25 +00:00
..
accel iio: accel: st_accel: add support to lng2dm 2016-11-01 18:50:02 +00:00
adc iio:adc: ad7766: testing the wrong variable in probe 2016-11-12 14:35:21 +00:00
amplifiers
buffer iio: add resource managed triggered buffer init helpers 2016-09-04 15:42:46 +01:00
chemical iio:chemical:atlas-ph-sensor: Fix use of 32 bit int to hold 16 bit big endian value 2016-10-23 22:18:27 +01:00
common iio: cros_ec_sensors_core: fix unsigned compared less than zero on status 2016-11-12 14:38:38 +00:00
counter iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8 2016-10-01 17:06:21 +01:00
dac iio: dac: mcp4725: fix odd_ptr_err.cocci warnings 2016-10-23 19:34:27 +01:00
dummy iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
frequency iio: frequency: ad9523: use unsigned int rather then bare unsigned 2016-04-17 10:31:03 +01:00
gyro iio: gyro: st_gyro: inline per-sensor data 2016-11-12 15:38:09 +00:00
health First round of IIO new device support, features and cleanups for the 4.8 cycle. 2016-06-09 09:15:58 -07:00
humidity iio: si7020: Add devicetree support and trivial bindings 2016-11-01 18:49:53 +00:00
imu iio: imu: inv_mpu6050: inform the i2c mux core about how it is used 2016-11-12 14:44:45 +00:00
light iio: light: ltr501: claim direct mode during raw writes 2016-10-23 19:34:08 +01:00
magnetometer iio: magn: st_magn: inline per-sensor data 2016-11-12 15:45:37 +00:00
orientation
potentiometer iio: potentiometer: Fix typo in Kconfig 2016-07-03 12:40:01 +01:00
potentiostat iio: potentiostat: add LMP91000 support 2016-09-27 20:33:03 +01:00
pressure iio: pressure: st_pressure: inline per-sensor data 2016-11-12 15:50:10 +00:00
proximity iio: proximity: pulsedlight-lidar-lite-v2: cleanup power management 2016-10-23 19:34:26 +01:00
temperature Second round of new device support, cleanups and fixes for IIO in the 4.10 cycle 2016-11-07 09:14:03 +01:00
trigger iio:trigger: Experimental kthread tight loop trigger (thread only) 2016-06-03 13:18:44 +01:00
Kconfig iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8 2016-10-01 17:06:21 +01:00
Makefile iio: 104-quad-8: Add IIO support for the ACCES 104-QUAD-8 2016-10-01 17:06:21 +01:00
iio_core.h iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
iio_core_trigger.h
industrialio-buffer.c iio: Use kmalloc_array() in iio_scan_mask_set() 2016-09-24 16:35:24 +01:00
industrialio-configfs.c iio:configfs: Introduce iio/configfs.h to provide a location for the configfs_subsystem 2015-12-05 16:25:30 +00:00
industrialio-core.c iio:core: add a callback to allow drivers to provide _available attributes 2016-11-13 11:40:25 +00:00
industrialio-event.c iio: iio_push_event(): Don't crash if the event interface is not registered 2016-09-10 16:40:44 +01:00
industrialio-sw-device.c iio: Add support for creating IIO devices via configfs 2016-05-04 11:43:54 +01:00
industrialio-sw-trigger.c iio: core: fix ptr_ret.cocci warnings 2016-01-20 17:09:18 -08:00
industrialio-trigger.c iio:trigger: Add helper function to verify that a trigger belongs to the same device 2016-09-27 20:32:55 +01:00
industrialio-triggered-event.c
inkern.c iio: inkern: add iio_read_channel_offset helper 2016-09-27 20:33:02 +01:00