Lines Matching refs:adis
20 struct adis *adis = iio_trigger_get_drvdata(trig); in adis_data_rdy_trigger_set_state() local
22 return adis_enable_irq(adis, state); in adis_data_rdy_trigger_set_state()
29 static int adis_validate_irq_flag(struct adis *adis) in adis_validate_irq_flag() argument
31 unsigned long direction = adis->irq_flag & IRQF_TRIGGER_MASK; in adis_validate_irq_flag()
34 if (adis->data->unmasked_drdy) in adis_validate_irq_flag()
35 adis->irq_flag |= IRQF_NO_AUTOEN; in adis_validate_irq_flag()
44 adis->irq_flag |= IRQF_TRIGGER_RISING; in adis_validate_irq_flag()
48 dev_err(&adis->spi->dev, "Invalid IRQ mask: %08lx\n", in adis_validate_irq_flag()
49 adis->irq_flag); in adis_validate_irq_flag()
63 int devm_adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev) in devm_adis_probe_trigger() argument
67 adis->trig = devm_iio_trigger_alloc(&adis->spi->dev, "%s-dev%d", in devm_adis_probe_trigger()
70 if (!adis->trig) in devm_adis_probe_trigger()
73 adis->trig->ops = &adis_trigger_ops; in devm_adis_probe_trigger()
74 iio_trigger_set_drvdata(adis->trig, adis); in devm_adis_probe_trigger()
76 ret = adis_validate_irq_flag(adis); in devm_adis_probe_trigger()
80 ret = devm_request_irq(&adis->spi->dev, adis->spi->irq, in devm_adis_probe_trigger()
82 adis->irq_flag, in devm_adis_probe_trigger()
84 adis->trig); in devm_adis_probe_trigger()
88 return devm_iio_trigger_register(&adis->spi->dev, adis->trig); in devm_adis_probe_trigger()