iio: core: Introduce IIO_ALTVOLTAGE and appropriate channel info elements
authorMichael Hennerich <michael.hennerich@analog.com>
Fri, 27 Apr 2012 08:58:34 +0000 (10:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Apr 2012 01:26:17 +0000 (21:26 -0400)
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/industrialio-core.c
include/linux/iio/iio.h
include/linux/iio/types.h

index e8e280d642959bec6ecd8e877ee2582bf7c0d662..47a72473d0b5d429a88a58fae5105bfc18c63c13 100644 (file)
@@ -63,6 +63,7 @@ static const char * const iio_chan_type_name_spec[] = {
        [IIO_ANGL] = "angl",
        [IIO_TIMESTAMP] = "timestamp",
        [IIO_CAPACITANCE] = "capacitance",
+       [IIO_ALTVOLTAGE] = "altvoltage",
 };
 
 static const char * const iio_modifier_names[] = {
@@ -88,6 +89,8 @@ static const char * const iio_chan_info_postfix[] = {
        [IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY]
        = "filter_low_pass_3db_frequency",
        [IIO_CHAN_INFO_SAMP_FREQ] = "sampling_frequency",
+       [IIO_CHAN_INFO_FREQUENCY] = "frequency",
+       [IIO_CHAN_INFO_PHASE] = "phase",
 };
 
 const struct iio_chan_spec
index d21833909327f40715ff01cb0ddb76d1248fb344..43002b2b1e385cbbcbea1d77babb74170e990ac4 100644 (file)
@@ -32,6 +32,8 @@ enum iio_chan_info_enum {
        IIO_CHAN_INFO_AVERAGE_RAW,
        IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY,
        IIO_CHAN_INFO_SAMP_FREQ,
+       IIO_CHAN_INFO_FREQUENCY,
+       IIO_CHAN_INFO_PHASE,
 };
 
 #define IIO_CHAN_INFO_SHARED_BIT(type) BIT(type*2)
@@ -85,6 +87,14 @@ enum iio_chan_info_enum {
        IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SAMP_FREQ)
 #define IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT                     \
        IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SAMP_FREQ)
+#define IIO_CHAN_INFO_FREQUENCY_SEPARATE_BIT                   \
+       IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_FREQUENCY)
+#define IIO_CHAN_INFO_FREQUENCY_SHARED_BIT                     \
+       IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_FREQUENCY)
+#define IIO_CHAN_INFO_PHASE_SEPARATE_BIT                       \
+       IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PHASE)
+#define IIO_CHAN_INFO_PHASE_SHARED_BIT                 \
+       IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PHASE)
 
 enum iio_endian {
        IIO_CPU,
index 0c32136669019b2092e60c8d6233587eb3d00bf9..a471fd5a4d9541d66c282fb66f0496cccfea3f1e 100644 (file)
@@ -27,6 +27,7 @@ enum iio_chan_type {
        IIO_ANGL,
        IIO_TIMESTAMP,
        IIO_CAPACITANCE,
+       IIO_ALTVOLTAGE,
 };
 
 enum iio_modifier {