Re: [PATCH v4 6/7] iio: light: ltr501: Add ltr329 driver support

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Mon, Aug 10, 2026 at 09:11:16AM +0200, Esben Haabendal wrote:
> This adds support for the LTR-329ALS-01 chip, which is similar to
> LTR-303ALS-01, except for interrupt, which LTR-329ALS-01 chip does not
> have.

...

> static int ltr501_probe(struct i2c_client *client)

>  	if (client->irq > 0) {
> +		if (!ltr501_has_irq_support(data->chip_info)) {
> +			ret = dev_err_probe(&client->dev, -EINVAL,
> +					    "chip does not support irq\n");
> +			goto powerdown_on_error;
> +		}

Why making it fatal? Perhaps

	if (!ltr501_has_irq_support(data->chip_info) && client->irq > 0) {
		client->irq = 0;
		dev_warn(chip doesn't support IRQ);
	}


-- 
With Best Regards,
Andy Shevchenko
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.