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

Esben Haabendal <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
"Andy Shevchenko" <[email protected]> writes:

> 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?

Good point. Probably a bit too harsh. A warning should be fine.

And with the addition of dt schema validation of this, on the odd chance
that people validates their devicetree, they will be told about this
problem already there.

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

Added for v5.

/Esben
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.