Re: [PATCH v12 2/2] iio: adc: ad7173: add AD7173 driver

From: Ceclan Dumitru
Date: Mon Jan 22 2024 - 05:03:42 EST




On 1/21/24 17:50, Jonathan Cameron wrote:
>> + ret = devm_ad_sd_setup_buffer_and_trigger(dev, indio_dev);
> If the error interrupt is provided either first, or as the only interrupt
> this is going to use the wrong one.
>
> Probably need to have a variant of that which takes an explicit irq so that
> figuring out which irq is relevant becomes a driver problem rather than the
> library having a go based on spi->irq.

Would it be acceptable to check if spi->irq interrupt number is equal to
fwnode_irq_get_byname(dev_fwnode(dev), "rdy")?

If not, a message could be passed that specifies either that "rdy" is
needed or that it must be placed first.


Another alternative would be adding irq to ad_sigma_delta_info so a
driver could specify the desired interrupt to be used for conversions.