iio: core: Add hysteresis in channel spec
authorsrinivas pandruvada <srinivas.pandruvada@intel.com>
Wed, 5 Sep 2012 12:56:00 +0000 (13:56 +0100)
committerJonathan Cameron <jic23@kernel.org>
Thu, 6 Sep 2012 18:04:45 +0000 (19:04 +0100)
Added hysteresis to the list of channel info enumeration, shared
/separate bit defines and to postfix channel info strings.

Signed-off-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-core.c
include/linux/iio/iio.h

index fa3b9f5e6c45f188a6427d1f9f3e4d3c4bae9f55..0499330d6e98c12db457ecb5f0498c4dff8d66ea 100644 (file)
@@ -99,6 +99,7 @@ static const char * const iio_chan_info_postfix[] = {
        [IIO_CHAN_INFO_FREQUENCY] = "frequency",
        [IIO_CHAN_INFO_PHASE] = "phase",
        [IIO_CHAN_INFO_HARDWAREGAIN] = "hardwaregain",
+       [IIO_CHAN_INFO_HYSTERESIS] = "hysteresis",
 };
 
 const struct iio_chan_spec
index 057d60382eacbe15b11c702897ab7be09a95485f..30affa533a1f77162f13a5ba1288ed1b602a74a4 100644 (file)
@@ -35,6 +35,7 @@ enum iio_chan_info_enum {
        IIO_CHAN_INFO_FREQUENCY,
        IIO_CHAN_INFO_PHASE,
        IIO_CHAN_INFO_HARDWAREGAIN,
+       IIO_CHAN_INFO_HYSTERESIS,
 };
 
 #define IIO_CHAN_INFO_SHARED_BIT(type) BIT(type*2)
@@ -100,6 +101,10 @@ enum iio_chan_info_enum {
        IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HARDWAREGAIN)
 #define IIO_CHAN_INFO_HARDWAREGAIN_SHARED_BIT                  \
        IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HARDWAREGAIN)
+#define IIO_CHAN_INFO_HYSTERESIS_SEPARATE_BIT                  \
+       IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HYSTERESIS)
+#define IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT                    \
+       IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HYSTERESIS)
 
 enum iio_endian {
        IIO_CPU,