summaryrefslogtreecommitdiffstats
path: root/include/linux/iio/sw_trigger.h
AgeCommit message (Collapse)AuthorFilesLines
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 <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-19iio: make function argument and some structures constBhumika Goyal1-1/+1
Make the argument of the functions iio_sw{d/t}_group_init_type_name const as they are only passed to the function config_group_init_type_name having the argument as const. Make the config_item_type structures const as they are either passed to the functions having the argument as const or they are stored in the const "ci_type" field of a config_item structure. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2016-08-15iio: sw-trigger: Fix config group initializationLars-Peter Clausen1-1/+1
Use the IS_ENABLED() helper macro to ensure that the configfs group is initialized either when configfs is built-in or when configfs is built as a module. Otherwise software trigger creation will result in undefined behaviour when configfs is built as a mdoule since the configfs group for the trigger is not properly initialized. Fixes: b662f809d410 ("iio: core: Introduce IIO software triggers") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-12-05iio:configfs: Introduce iio/configfs.h to provide a location for the ↵Jonathan Cameron1-1/+0
configfs_subsystem This exported element needs to be accesible to all drivers using configfs within IIO. Previously it was in the sw_trig.h file which only convered one such usecase. This also fixes a sparse warning as it is now in a header that makes sense to include from industrialio-configfs.c Signed-off-by: Jonathan Cameron < jic23@kernel.org>
2015-12-03iio: core: Introduce IIO software triggersDaniel Baluta1-0/+71
A software trigger associates an IIO device trigger with a software interrupt source (e.g: timer, sysfs). This patch adds the generic infrastructure for handling software triggers. Software interrupts sources are kept in a iio_trigger_types_list and registered separately when the associated kernel module is loaded. Software triggers can be created directly from drivers or from user space via configfs interface. To sum up, this dynamically creates "triggers" group to be found under /config/iio/triggers and offers the possibility of dynamically creating trigger types groups. The first supported trigger type is "hrtimer" found under /config/iio/triggers/hrtimer. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>