aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2013-02-27 14:43:52 -0500
committerJonathan Cameron <jic23@kernel.org>2013-03-17 15:49:44 -0400
commitb9606e2aa97d3d831d1236c0e789a33a2f867a8a (patch)
treebb08ece65aaa414377cbf917cd561df959f21be1 /include/linux/iio
parent066f90512ebfa3c59492f377cbb78c3b7231737c (diff)
iio:core drop info_mask from struct iio_info
This has been replaced by the pair of masks info_mask_separate and info_mask_shared_by_type. Other variants may follow. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/iio.h73
1 files changed, 1 insertions, 72 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 76976509d628..8d171f427632 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -38,76 +38,6 @@ enum iio_chan_info_enum {
38 IIO_CHAN_INFO_HYSTERESIS, 38 IIO_CHAN_INFO_HYSTERESIS,
39}; 39};
40 40
41#define IIO_CHAN_INFO_SHARED_BIT(type) BIT(type*2)
42#define IIO_CHAN_INFO_SEPARATE_BIT(type) BIT(type*2 + 1)
43#define IIO_CHAN_INFO_BITS(type) (IIO_CHAN_INFO_SHARED_BIT(type) | \
44 IIO_CHAN_INFO_SEPARATE_BIT(type))
45
46#define IIO_CHAN_INFO_RAW_SEPARATE_BIT \
47 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_RAW)
48#define IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT \
49 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PROCESSED)
50#define IIO_CHAN_INFO_SCALE_SEPARATE_BIT \
51 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SCALE)
52#define IIO_CHAN_INFO_SCALE_SHARED_BIT \
53 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SCALE)
54#define IIO_CHAN_INFO_OFFSET_SEPARATE_BIT \
55 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_OFFSET)
56#define IIO_CHAN_INFO_OFFSET_SHARED_BIT \
57 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_OFFSET)
58#define IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT \
59 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_CALIBSCALE)
60#define IIO_CHAN_INFO_CALIBSCALE_SHARED_BIT \
61 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_CALIBSCALE)
62#define IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT \
63 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_CALIBBIAS)
64#define IIO_CHAN_INFO_CALIBBIAS_SHARED_BIT \
65 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_CALIBBIAS)
66#define IIO_CHAN_INFO_PEAK_SEPARATE_BIT \
67 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PEAK)
68#define IIO_CHAN_INFO_PEAK_SHARED_BIT \
69 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PEAK)
70#define IIO_CHAN_INFO_PEAKSCALE_SEPARATE_BIT \
71 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PEAKSCALE)
72#define IIO_CHAN_INFO_PEAKSCALE_SHARED_BIT \
73 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PEAKSCALE)
74#define IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SEPARATE_BIT \
75 IIO_CHAN_INFO_SEPARATE_BIT( \
76 IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW)
77#define IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SHARED_BIT \
78 IIO_CHAN_INFO_SHARED_BIT( \
79 IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW)
80#define IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE_BIT \
81 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_AVERAGE_RAW)
82#define IIO_CHAN_INFO_AVERAGE_RAW_SHARED_BIT \
83 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_AVERAGE_RAW)
84#define IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SHARED_BIT \
85 IIO_CHAN_INFO_SHARED_BIT( \
86 IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY)
87#define IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SEPARATE_BIT \
88 IIO_CHAN_INFO_SEPARATE_BIT( \
89 IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY)
90#define IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT \
91 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SAMP_FREQ)
92#define IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT \
93 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SAMP_FREQ)
94#define IIO_CHAN_INFO_FREQUENCY_SEPARATE_BIT \
95 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_FREQUENCY)
96#define IIO_CHAN_INFO_FREQUENCY_SHARED_BIT \
97 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_FREQUENCY)
98#define IIO_CHAN_INFO_PHASE_SEPARATE_BIT \
99 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PHASE)
100#define IIO_CHAN_INFO_PHASE_SHARED_BIT \
101 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PHASE)
102#define IIO_CHAN_INFO_HARDWAREGAIN_SEPARATE_BIT \
103 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HARDWAREGAIN)
104#define IIO_CHAN_INFO_HARDWAREGAIN_SHARED_BIT \
105 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HARDWAREGAIN)
106#define IIO_CHAN_INFO_HYSTERESIS_SEPARATE_BIT \
107 IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HYSTERESIS)
108#define IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT \
109 IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HYSTERESIS)
110
111enum iio_endian { 41enum iio_endian {
112 IIO_CPU, 42 IIO_CPU,
113 IIO_BE, 43 IIO_BE,
@@ -281,8 +211,7 @@ struct iio_chan_spec {
281static inline bool iio_channel_has_info(const struct iio_chan_spec *chan, 211static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
282 enum iio_chan_info_enum type) 212 enum iio_chan_info_enum type)
283{ 213{
284 return (chan->info_mask & IIO_CHAN_INFO_BITS(type)) | 214 return (chan->info_mask_separate & type) |
285 (chan->info_mask_separate & type) |
286 (chan->info_mask_shared_by_type & type); 215 (chan->info_mask_shared_by_type & type);
287} 216}
288 217