Re: [PATCH v3 1/3] iio: adc: ti-ads112c14: add DRDY interrupt support

David Lechner <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/10/26 3:50 AM, Andy Shevchenko wrote:
> On Fri, Aug 07, 2026 at 04:19:46PM -0500, David Lechner (TI) wrote:
>> Add handling for the DRDY interrupt to wait for data ready events rather
>> than polling (only when it is wired up).
> 
> ...
> 
>> +static irqreturn_t ads112c14_drdy_irq_handler(int irq, void *private)
>> +{
>> +	struct iio_dev *indio_dev = private;
>> +	struct ads112c14_data *data = iio_priv(indio_dev);
> 
> I have seen some discussion about this, but what's the problem with the
> 
> 	struct ads112c14_data *data = iio_priv(private);
> 
> ?

indio_dev gets used in a later patch, so point is to avoid churn.

> 
>> +	complete(&data->drdy_completion);
>> +
>> +	return IRQ_HANDLED;
>> +}
> 
> ...
> 
>> +	if (device_property_present(dev, "interrupts")) {
> 
> Unfortunately this is no-go for ACPI-enabled systems.
> On ACPI we expect to have 'interrupt-names' but 'interrupts' is OF-only.

So device_property_present(dev, "interrupt-names") is OK?

> 
>> +		data->drdy_irq = fwnode_irq_get_byname(dev_fwnode(dev), "drdy");
>> +		if (data->drdy_irq < 0)
>> +			return dev_err_probe(dev, data->drdy_irq,
>> +					     "failed to get drdy interrupt\n");
>> +
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.