aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-12-07 05:45:00 -0500
committerJonathan Cameron <jic23@kernel.org>2013-12-08 08:13:52 -0500
commitcb955852a48c29ef7bd847ce993102e2b58295d4 (patch)
treeed64e5c2f4510d90ab09724aa726d9689061a33b /include
parentbb7f9d90a5c0c29885cc37418ae208118e04bd4f (diff)
iio: Remove support for the legacy event config interface
Now that all drivers have been converted to the new event config interface we can remove for the legacy event config interface. Also drop the '_new' suffix for the event config interface callbacks, since those are the only callbacks now. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/iio/events.h4
-rw-r--r--include/linux/iio/iio.h34
2 files changed, 5 insertions, 33 deletions
diff --git a/include/linux/iio/events.h b/include/linux/iio/events.h
index 5dab2c41031f..8bbd7bc1043d 100644
--- a/include/linux/iio/events.h
+++ b/include/linux/iio/events.h
@@ -46,10 +46,6 @@ struct iio_event_data {
46 ((u16)chan)) 46 ((u16)chan))
47 47
48 48
49#define IIO_EV_DIR_MAX 4
50#define IIO_EV_BIT(type, direction) \
51 (1 << (type*IIO_EV_DIR_MAX + direction))
52
53/** 49/**
54 * IIO_MOD_EVENT_CODE() - create event identifier for modified channels 50 * IIO_MOD_EVENT_CODE() - create event identifier for modified channels
55 * @chan_type: Type of the channel. Should be one of enum iio_chan_type. 51 * @chan_type: Type of the channel. Should be one of enum iio_chan_type.
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 5b125fd554e4..75a8a20c8179 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -185,7 +185,6 @@ struct iio_event_spec {
185 * by all channels of the same direction. 185 * by all channels of the same direction.
186 * @info_mask_shared_by_all: What information is to be exported that is shared 186 * @info_mask_shared_by_all: What information is to be exported that is shared
187 * by all channels. 187 * by all channels.
188 * @event_mask: What events can this channel produce.
189 * @event_spec: Array of events which should be registered for this 188 * @event_spec: Array of events which should be registered for this
190 * channel. 189 * channel.
191 * @num_event_specs: Size of the event_spec array. 190 * @num_event_specs: Size of the event_spec array.
@@ -226,7 +225,6 @@ struct iio_chan_spec {
226 long info_mask_shared_by_type; 225 long info_mask_shared_by_type;
227 long info_mask_shared_by_dir; 226 long info_mask_shared_by_dir;
228 long info_mask_shared_by_all; 227 long info_mask_shared_by_all;
229 long event_mask;
230 const struct iio_event_spec *event_spec; 228 const struct iio_event_spec *event_spec;
231 unsigned int num_event_specs; 229 unsigned int num_event_specs;
232 const struct iio_chan_spec_ext_info *ext_info; 230 const struct iio_chan_spec_ext_info *ext_info;
@@ -307,16 +305,8 @@ struct iio_dev;
307 * returns IIO_VAL_INT_PLUS_MICRO. 305 * returns IIO_VAL_INT_PLUS_MICRO.
308 * @read_event_config: find out if the event is enabled. 306 * @read_event_config: find out if the event is enabled.
309 * @write_event_config: set if the event is enabled. 307 * @write_event_config: set if the event is enabled.
310 * @read_event_value: read a value associated with the event. Meaning 308 * @read_event_value: read a configuration value associated with the event.
311 * is event dependant. event_code specifies which event. 309 * @write_event_value: write a configuration value for the event.
312 * @write_event_value: write the value associated with the event.
313 * Meaning is event dependent.
314 * @read_event_config_new: find out if the event is enabled. New style interface.
315 * @write_event_config_new: set if the event is enabled. New style interface.
316 * @read_event_value_new: read a configuration value associated with the event.
317 * New style interface.
318 * @write_event_value_new: write a configuration value for the event. New style
319 * interface.
320 * @validate_trigger: function to validate the trigger when the 310 * @validate_trigger: function to validate the trigger when the
321 * current trigger gets changed. 311 * current trigger gets changed.
322 * @update_scan_mode: function to configure device and scan buffer when 312 * @update_scan_mode: function to configure device and scan buffer when
@@ -345,37 +335,23 @@ struct iio_info {
345 long mask); 335 long mask);
346 336
347 int (*read_event_config)(struct iio_dev *indio_dev, 337 int (*read_event_config)(struct iio_dev *indio_dev,
348 u64 event_code);
349
350 int (*write_event_config)(struct iio_dev *indio_dev,
351 u64 event_code,
352 int state);
353
354 int (*read_event_value)(struct iio_dev *indio_dev,
355 u64 event_code,
356 int *val);
357 int (*write_event_value)(struct iio_dev *indio_dev,
358 u64 event_code,
359 int val);
360
361 int (*read_event_config_new)(struct iio_dev *indio_dev,
362 const struct iio_chan_spec *chan, 338 const struct iio_chan_spec *chan,
363 enum iio_event_type type, 339 enum iio_event_type type,
364 enum iio_event_direction dir); 340 enum iio_event_direction dir);
365 341
366 int (*write_event_config_new)(struct iio_dev *indio_dev, 342 int (*write_event_config)(struct iio_dev *indio_dev,
367 const struct iio_chan_spec *chan, 343 const struct iio_chan_spec *chan,
368 enum iio_event_type type, 344 enum iio_event_type type,
369 enum iio_event_direction dir, 345 enum iio_event_direction dir,
370 int state); 346 int state);
371 347
372 int (*read_event_value_new)(struct iio_dev *indio_dev, 348 int (*read_event_value)(struct iio_dev *indio_dev,
373 const struct iio_chan_spec *chan, 349 const struct iio_chan_spec *chan,
374 enum iio_event_type type, 350 enum iio_event_type type,
375 enum iio_event_direction dir, 351 enum iio_event_direction dir,
376 enum iio_event_info info, int *val, int *val2); 352 enum iio_event_info info, int *val, int *val2);
377 353
378 int (*write_event_value_new)(struct iio_dev *indio_dev, 354 int (*write_event_value)(struct iio_dev *indio_dev,
379 const struct iio_chan_spec *chan, 355 const struct iio_chan_spec *chan,
380 enum iio_event_type type, 356 enum iio_event_type type,
381 enum iio_event_direction dir, 357 enum iio_event_direction dir,