On 22/01/16 16:49, Jonathan Cameron wrote: > > > On 22 January 2016 14:37:33 GMT+00:00, "Sean Nyekjær" <sean.nyekjaer@xxxxxxxxx> wrote: >> Hi >> >> How do you register two channels for one channel? I got this a bit backwards reading it on the phone and thought we were dealing with an ADC rather than a DAC (oops!) I'm going to move the rest of this discussion into the reply to patch 2 as it will make more sense alongside your usecase there. <snip> > > >> Please give a quick example > Phone only so will get back to you tomorrow! > >> >> /Sean >> >> On 2016-01-22 15:14, Jonathan Cameron wrote: >>> Hi >>> >>> Quick gut feel response. Register two channels. >>> >>> Jonathan >>> >>> On 22 January 2016 12:54:55 GMT+00:00, Sean Nyekjaer >>> <sean.nyekjaer@xxxxxxxxx> wrote: >>> >>> Signed-off-by: Sean Nyekjaer <sean.nyekjaer@xxxxxxxxx> >>> --- >>> drivers/iio/industrialio-core.c | 2 ++ >>> include/linux/iio/iio.h | 1 + >>> include/uapi/linux/iio/types.h | 1 + >>> 3 files changed, 4 insertions(+) >>> >>> diff --git a/drivers/iio/industrialio-core.c >> b/drivers/iio/industrialio-core.c >>> index fd01f34..5e1beea 100644 >>> --- a/drivers/iio/industrialio-core.c >>> +++ b/drivers/iio/industrialio-core.c >>> @@ -77,6 +77,7 @@ static const char * const >> iio_chan_type_name_spec[] = { >>> [IIO_VELOCITY] = "velocity", >>> [IIO_CONCENTRATION] = "concentration", >>> [IIO_RESISTANCE] = "resistance", >>> + [IIO_DUAL_VOLTCUR] = "voltcur", >>> }; >>> >>> static const char * const iio_modifier_names[] = { >>> @@ -146,6 +147,7 @@ static const char * const >> iio_chan_info_postfix[] = { >>> [IIO_CHAN_INFO_DEBOUNCE_TIME] = "debounce_time", >>> [IIO_CHAN_INFO_CALIBEMISSIVITY] = "calibemissivity", >>> >>> [IIO_CHAN_INFO_OVERSAMPLING_RATIO] = "oversampling_ratio", >>> + [IIO_CHAN_INFO_MODE] = "mode", >>> }; >>> >>> /** >>> diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h >>> index b589411..ef4c7cd9 100644 >>> --- a/include/linux/iio/iio.h >>> +++ b/include/linux/iio/iio.h >>> @@ -46,6 +46,7 @@ enum iio_chan_info_enum { >>> IIO_CHAN_INFO_DEBOUNCE_TIME, >>> IIO_CHAN_INFO_CALIBEMISSIVITY, >>> IIO_CHAN_INFO_OVERSAMPLING_RATIO, >>> + IIO_CHAN_INFO_MODE, >>> }; >>> >>> enum iio_shared_by { >>> diff --git a/include/uapi/linux/iio/types.h >> b/include/uapi/linux/iio/types.h >>> index 7c63bd6..81e6a2a 100644 >>> --- a/include/uapi/linux/iio/types.h >>> +++ b/include/uapi/linux/iio/types.h >>> @@ -37,6 +37,7 @@ enum iio_chan_type { >>> IIO_VELOCITY, >>> IIO_CONCENTRATION, >>> IIO_RESISTANCE, >>> + IIO_DUAL_VOLTCUR, >>> }; >>> >>> enum iio_modifier { >>> >>> >>> -- >>> Sent from my Android device with K-9 Mail. Please excuse my brevity. >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-iio" in >> the body of a message to majordomo@xxxxxxxxxxxxxxx >> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html