iio: add IIO_ALTCURRENT channel type
Add support for IIO_ALTCURRENT channel type to distinguish AC current measurements from DC current measurements. This follows the same pattern as IIO_VOLTAGE and IIO_ALTVOLTAGE. Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>pull/1354/merge
parent
abe629ebda
commit
f15bc37d8c
|
|
@ -97,6 +97,7 @@ static const char * const iio_chan_type_name_spec[] = {
|
|||
[IIO_COLORTEMP] = "colortemp",
|
||||
[IIO_CHROMATICITY] = "chromaticity",
|
||||
[IIO_ATTENTION] = "attention",
|
||||
[IIO_ALTCURRENT] = "altcurrent",
|
||||
};
|
||||
|
||||
static const char * const iio_modifier_names[] = {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ enum iio_chan_type {
|
|||
IIO_COLORTEMP,
|
||||
IIO_CHROMATICITY,
|
||||
IIO_ATTENTION,
|
||||
IIO_ALTCURRENT,
|
||||
};
|
||||
|
||||
enum iio_modifier {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ static const char * const iio_chan_type_name_spec[] = {
|
|||
[IIO_COLORTEMP] = "colortemp",
|
||||
[IIO_CHROMATICITY] = "chromaticity",
|
||||
[IIO_ATTENTION] = "attention",
|
||||
[IIO_ALTCURRENT] = "altcurrent",
|
||||
};
|
||||
|
||||
static const char * const iio_ev_type_text[] = {
|
||||
|
|
@ -187,6 +188,7 @@ static bool event_is_known(struct iio_event_data *event)
|
|||
case IIO_COLORTEMP:
|
||||
case IIO_CHROMATICITY:
|
||||
case IIO_ATTENTION:
|
||||
case IIO_ALTCURRENT:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue