@@ -183,36 +183,34 @@ static irqreturn_t iio_simple_dummy_event_handler(int irq, void *private)
183
183
switch (st -> regs -> reg_data ) {
184
184
case 0 :
185
185
iio_push_event (indio_dev ,
186
- IIO_EVENT_CODE (IIO_VOLTAGE , 0 , 0 ,
187
- IIO_EV_DIR_RISING ,
188
- IIO_EV_TYPE_THRESH , 0 , 0 , 0 ),
186
+ IIO_UNMOD_EVENT_CODE (IIO_VOLTAGE , 0 ,
187
+ IIO_EV_TYPE_THRESH ,
188
+ IIO_EV_DIR_RISING ),
189
189
st -> event_timestamp );
190
190
break ;
191
191
case 1 :
192
192
if (st -> activity_running > st -> event_val )
193
193
iio_push_event (indio_dev ,
194
- IIO_EVENT_CODE (IIO_ACTIVITY , 0 ,
195
- IIO_MOD_RUNNING ,
196
- IIO_EV_DIR_RISING ,
197
- IIO_EV_TYPE_THRESH ,
198
- 0 , 0 , 0 ),
194
+ IIO_MOD_EVENT_CODE (IIO_ACTIVITY , 0 ,
195
+ IIO_MOD_RUNNING ,
196
+ IIO_EV_TYPE_THRESH ,
197
+ IIO_EV_DIR_RISING ),
199
198
st -> event_timestamp );
200
199
break ;
201
200
case 2 :
202
201
if (st -> activity_walking < st -> event_val )
203
202
iio_push_event (indio_dev ,
204
- IIO_EVENT_CODE (IIO_ACTIVITY , 0 ,
205
- IIO_MOD_WALKING ,
206
- IIO_EV_DIR_FALLING ,
207
- IIO_EV_TYPE_THRESH ,
208
- 0 , 0 , 0 ),
203
+ IIO_MOD_EVENT_CODE (IIO_ACTIVITY , 0 ,
204
+ IIO_MOD_WALKING ,
205
+ IIO_EV_TYPE_THRESH ,
206
+ IIO_EV_DIR_FALLING ),
209
207
st -> event_timestamp );
210
208
break ;
211
209
case 3 :
212
210
iio_push_event (indio_dev ,
213
- IIO_EVENT_CODE (IIO_STEPS , 0 , IIO_NO_MOD ,
214
- IIO_EV_DIR_NONE ,
215
- IIO_EV_TYPE_CHANGE , 0 , 0 , 0 ),
211
+ IIO_UNMOD_EVENT_CODE (IIO_STEPS , 0 ,
212
+ IIO_EV_TYPE_CHANGE ,
213
+ IIO_EV_DIR_NONE ),
216
214
st -> event_timestamp );
217
215
break ;
218
216
default :
0 commit comments