staging: iio: amend macros for SCAN_EL creation to add separate index attr

As Manuel Stahl observed, putting data into the naming of an attribute
(beyond what it is for) breaks the one value per attribute rule (in spirit
at least).  Hence we introduce a separate _index attribute for each scan
element to tell userspace the ordering in output from the buffer.

This will generate a lot of sparse warnings as all drivers will have unused
iio_const_attrs created.  The rest of the set will clean these up.

The final patch will remove the old indexing method. It is not here so
as to maintain one or other interface for all devices as this set
progresses.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 file changed