aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/Documentation/iio_utils.h
Commit message (Collapse)AuthorAgeFilesLines
* staging:iio:Documentation generic_buffer.c update to new abi for buffers + ↵Jonathan Cameron2011-05-191-15/+5
| | | | | | | | | | | | | | misc fixes Trivial space before newline fix incorporated. Additional fixes related to handling of sign extension and shifted data. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> squash into buffer handling update. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* Staging: IIO: Documentation: iio_utils: fix channel array generation.Michael Hennerich2011-03-091-23/+33
| | | | | | | | | | | | | | | | | | | | | | | The previous implementation flawed, in case some channels are not enabled. The sorted array would then include channel information of disabled channels, And misses the enabled ones, when the count is reached. More troublesome, the loop would not even terminate. The fix is twofold: First we skip channels that are not enabled. Then we use a tested bubble sort algorithm to sort the array. Since we already allocated exactly the number of bytes we need. We can exercise bubble sort on the original memory. In all cases I've seen, the array is already sorted, so this sort terminates immediately. Changes since V1: Fix coding style issues. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* IIO: Documentation: iio_utils: fix mask generationMichael Hennerich2011-02-281-2/+2
| | | | | | | | | Variable sizeint is used uninitialized. Remove sizeint completely and use bits_used instead. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* IIO: Documentation: iio_utils: Prevent buffer overflowMichael Hennerich2011-02-281-1/+3
| | | | | | | | | | | | | | | The first part of build_channel_array()identifies the number of enabled channels. Further down this count is used to allocate the ci_array. The next section parses the scan_elements directory again, and fills ci_array regardless if the channel is enabled or not. So if less than available channels are enabled ci_array memory is overflowed. This fix makes sure that we allocate enough memory. But the whole approach looks a bit cumbersome to me. Why not allocate memory for MAX_CHANNLES, less say 64 (I never seen a part with more than that channels). And skip the first part entirely. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* IIO: Documentation: iio_utils: style consistency fixMichael Hennerich2011-02-281-1/+1
| | | | | | | | No functional changes Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* IIO: Documentation: iio_utils: Avoid double free()Michael Hennerich2011-02-281-1/+0
| | | | | | | | filename is used and freed later Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: iio: --/++ confusion in build_channel_array() error cleanuproel kluin2011-01-201-1/+1
| | | | | | | | Fix loop: it should decrement Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: iio: update example application.Jonathan Cameron2010-10-081-5/+391
| | | | | | | | | The application is now considerably more generic and should cope with all devices in tree. The process function will need to be extended to handle other type values as needed. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: iio-utils: fix memory overflow for dynamically allocateded memory ↵Barry Song2010-06-041-2/+1
| | | | | | | | | to hold filename Signed-off-by: Barry Song <21cnbao@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio:Documentation: Rewrite example for new abi.Jonathan Cameron2010-05-111-115/+162
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Documentation, update iio_utils.h for the move to a busJonathan Cameron2010-05-111-1/+30
| | | | | Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: IIO: Initial documentationJonathan Cameron2009-09-151-0/+159
This needs considerably more work, all comments / suggestions welcomed. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>