Re: [PATCH v4 6/7] iio: light: ltr501: Add ltr329 driver support
From: Andy Shevchenko
Date: Mon Aug 10 2026 - 15:57:19 EST
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