aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio/trigger.h
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-05-15 10:26:50 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-05-15 10:26:50 -0400
commit12e04ffcd93b25dfd726d46338c2ee7d23de556e (patch)
treef91479a62805619168994fd3ee55e3ffa23fc24e /include/linux/iio/trigger.h
parent9eff37a8713939f218ab8bf0dc93f1d67af7b8b4 (diff)
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
Merge tag 'v3.10-rc1' into stable/for-linus-3.10
Linux 3.10-rc1 * tag 'v3.10-rc1': (12273 commits) Linux 3.10-rc1 [SCSI] qla2xxx: Update firmware link in Kconfig file. [SCSI] iscsi class, qla4xxx: fix sess/conn refcounting when find fns are used [SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type [SCSI] pm80xx: thermal, sas controller config and error handling update [SCSI] pm80xx: NCQ error handling changes [SCSI] pm80xx: WWN Modification for PM8081/88/89 controllers [SCSI] pm80xx: Changed module name and debug messages update [SCSI] pm80xx: Firmware flash memory free fix, with addition of new memory region for it [SCSI] pm80xx: SPC new firmware changes for device id 0x8081 alone [SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files [SCSI] pm80xx: MSI-X implementation for using 64 interrupts [SCSI] pm80xx: Updated common functions common for SPC and SPCv/ve [SCSI] pm80xx: Multiple inbound/outbound queue configuration [SCSI] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC [SCSI] lpfc: fix up Kconfig dependencies [SCSI] Handle MLQUEUE busy response in scsi_send_eh_cmnd dm cache: set config value dm cache: move config fns dm thin: generate event when metadata threshold passed ...
Diffstat (limited to 'include/linux/iio/trigger.h')
-rw-r--r--include/linux/iio/trigger.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index c66e0a96f6e8..3869c525b052 100644
--- a/include/linux/iio/trigger.h
+++ b/include/linux/iio/trigger.h
@@ -44,7 +44,6 @@ struct iio_trigger_ops {
44 * @id: [INTERN] unique id number 44 * @id: [INTERN] unique id number
45 * @name: [DRIVER] unique name 45 * @name: [DRIVER] unique name
46 * @dev: [DRIVER] associated device (if relevant) 46 * @dev: [DRIVER] associated device (if relevant)
47 * @private_data: [DRIVER] device specific data
48 * @list: [INTERN] used in maintenance of global trigger list 47 * @list: [INTERN] used in maintenance of global trigger list
49 * @alloc_list: [DRIVER] used for driver specific trigger list 48 * @alloc_list: [DRIVER] used for driver specific trigger list
50 * @use_count: use count for the trigger 49 * @use_count: use count for the trigger
@@ -60,7 +59,6 @@ struct iio_trigger {
60 const char *name; 59 const char *name;
61 struct device dev; 60 struct device dev;
62 61
63 void *private_data;
64 struct list_head list; 62 struct list_head list;
65 struct list_head alloc_list; 63 struct list_head alloc_list;
66 int use_count; 64 int use_count;
@@ -92,6 +90,30 @@ static inline void iio_trigger_get(struct iio_trigger *trig)
92} 90}
93 91
94/** 92/**
93 * iio_device_set_drvdata() - Set trigger driver data
94 * @trig: IIO trigger structure
95 * @data: Driver specific data
96 *
97 * Allows to attach an arbitrary pointer to an IIO trigger, which can later be
98 * retrieved by iio_trigger_get_drvdata().
99 */
100static inline void iio_trigger_set_drvdata(struct iio_trigger *trig, void *data)
101{
102 dev_set_drvdata(&trig->dev, data);
103}
104
105/**
106 * iio_trigger_get_drvdata() - Get trigger driver data
107 * @trig: IIO trigger structure
108 *
109 * Returns the data previously set with iio_trigger_set_drvdata()
110 */
111static inline void *iio_trigger_get_drvdata(struct iio_trigger *trig)
112{
113 return dev_get_drvdata(&trig->dev);
114}
115
116/**
95 * iio_trigger_register() - register a trigger with the IIO core 117 * iio_trigger_register() - register a trigger with the IIO core
96 * @trig_info: trigger to be registered 118 * @trig_info: trigger to be registered
97 **/ 119 **/