By introducing IIO_EV_TYPE_CHANGE, IIO_EV_TYPE_INSTANCE becomes redundant.
The effect of IIO_EV_TYPE_INSTANCE can be obtained by using IIO_EV_TYPE_CHANGE
with IIO_EV_INFO_VALUE set to 1.
Remove all instances of IIO_EV_TYPE_INSTANCE and replace them with
IIO_EV_TYPE_CHANGE where needed.
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
[IIO_EV_TYPE_ROC] = "roc",
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
- [IIO_EV_TYPE_INSTANCE] = "instance",
[IIO_EV_TYPE_CHANGE] = "change",
};
[IIO_EV_TYPE_ROC] = "roc",
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
- [IIO_EV_TYPE_INSTANCE] = "instance",
[IIO_EV_TYPE_CHANGE] = "change",
};
case IIO_EV_TYPE_ROC:
case IIO_EV_TYPE_THRESH_ADAPTIVE:
case IIO_EV_TYPE_MAG_ADAPTIVE:
- case IIO_EV_TYPE_INSTANCE:
case IIO_EV_TYPE_CHANGE:
break;
default:
* simple step detect event - triggered when a step is detected
*/
static const struct iio_event_spec step_detect_event = {
- .type = IIO_EV_TYPE_INSTANCE,
+ .type = IIO_EV_TYPE_CHANGE,
.dir = IIO_EV_DIR_NONE,
.mask_separate = BIT(IIO_EV_INFO_ENABLE),
};
}
case IIO_STEPS:
switch (type) {
- case IIO_EV_TYPE_INSTANCE:
+ case IIO_EV_TYPE_CHANGE:
st->event_en = state;
break;
default:
iio_push_event(indio_dev,
IIO_EVENT_CODE(IIO_STEPS, 0, IIO_NO_MOD,
IIO_EV_DIR_NONE,
- IIO_EV_TYPE_INSTANCE, 0, 0, 0),
+ IIO_EV_TYPE_CHANGE, 0, 0, 0),
iio_get_time_ns());
break;
default:
IIO_EV_TYPE_ROC,
IIO_EV_TYPE_THRESH_ADAPTIVE,
IIO_EV_TYPE_MAG_ADAPTIVE,
- IIO_EV_TYPE_INSTANCE,
IIO_EV_TYPE_CHANGE,
};