aboutsummaryrefslogtreecommitdiff
path: root/include/linux/iio/driver.h
AgeCommit message (Collapse)AuthorFilesLines
2021-10-19iio: inkern: introduce devm_iio_map_array_register() short-hand functionAlexandru Ardelean1-0/+14
This change introduces a device-managed variant to the iio_map_array_register() function. It's a simple implementation of calling iio_map_array_register() and registering a callback to iio_map_array_unregister() with the devm_add_action_or_reset(). The function uses an explicit 'dev' parameter to bind the unwinding to. It could have been implemented to implicitly use the parent of the IIO device, however it shouldn't be too expensive to callers to just specify to which device object to bind this unwind call. It would make the API a bit more flexible. Signed-off-by: Alexandru Ardelean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-04-04iio: Make possible to include driver.h firstAndy Shevchenko1-0/+1
If we put headers alphabetically sorted in the IIO driver, the compilation will abort because of unknown type to handle. Simple add a forward declaration of opaque struct iio_dev. Suggested-by: Jonathan Cameron <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2013-02-02iio: Simplify iio_map_array_unregister APIGuenter Roeck1-6/+3
Instead of requiring the map to unregister, simply unregister all map entries associated with the given iio device. This simplifies map removal and also works for maps generated through devicetree. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2012-04-25IIO: Move core headers to include/linux/iioJonathan Cameron1-0/+34
Step 1 in moving the IIO core out of staging. Signed-off-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>