/** * adis16260_data_rdy_trigger_set_state() set datardy interrupt state **/ static int adis16260_data_rdy_trigger_set_state(struct iio_trigger *trig, bool state) { struct iio_dev *indio_dev = trig->private_data; dev_dbg(&indio_dev->dev, "%s (%d)\n", __func__, state); return adis16260_set_irq(indio_dev, state); }
/** * adis16260_data_rdy_trigger_set_state() set datardy interrupt state **/ static int adis16260_data_rdy_trigger_set_state(struct iio_trigger *trig, bool state) { struct adis16260_state *st = trig->private_data; struct iio_dev *indio_dev = st->indio_dev; int ret = 0; dev_dbg(&indio_dev->dev, "%s (%d)\n", __func__, state); ret = adis16260_set_irq(&st->indio_dev->dev, state); if (state == false) { iio_remove_event_from_list(&iio_event_data_rdy_trig, &indio_dev->interrupts[0] ->ev_list); flush_scheduled_work(); } else { iio_add_event_to_list(&iio_event_data_rdy_trig, &indio_dev->interrupts[0]->ev_list); } return ret; }