From: Esben Haabendal <esben@geanix.com>
To: "Joshua Crofts" <joshua.crofts1@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Nikita Travkin" <nikita@trvn.ru>,
"Maslov Dmitry" <maslovdmitry@seeed.cc>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: light: ltr501: Add ltr329 driver support
Date: Wed, 15 Jul 2026 14:25:19 +0200 [thread overview]
Message-ID: <877bmwo2xc.fsf@geanix.com> (raw)
In-Reply-To: <20260715110046.00001aa8@gmail.com> (Joshua Crofts's message of "Wed, 15 Jul 2026 11:00:46 +0200")
"Joshua Crofts" <joshua.crofts1@gmail.com> writes:
> On Wed, 15 Jul 2026 10:23:50 +0200
> Esben Haabendal <esben@geanix.com> wrote:
>> @@ -1257,6 +1269,18 @@ static const struct ltr501_chip_info ltr501_chip_info_tbl[] = {
>> .channels = ltr301_channels,
>> .no_channels = ARRAY_SIZE(ltr301_channels),
>> },
>> + [ltr329] = {
>> + .partid = 0x0A,
>> + .als_gain = ltr559_als_gain_tbl,
>> + .als_gain_tbl_size = ARRAY_SIZE(ltr559_als_gain_tbl),
>
> While you're at it, add `#include <linux/array_size.h>`
Will do.
>> + .als_mode_active = BIT(0),
>> + .als_gain_mask = BIT(2) | BIT(3) | BIT(4),
>> + .als_gain_shift = 2,
>> + .info = <r301_info_no_irq,
>> + .info_no_irq = <r301_info_no_irq,
>> + .channels = ltr301_channels,
>> + .no_channels = ARRAY_SIZE(ltr301_channels),
>> + },
>> };
>>
>> static int ltr501_write_contr(struct ltr501_data *data, u8 als_val, u8 ps_val)
>> @@ -1531,6 +1555,11 @@ static int ltr501_probe(struct i2c_client *client)
>> return ret;
>>
>> if (client->irq > 0) {
>> + if (!ltr501_has_irq_support(data->chip_info)) {
>> + dev_err(&client->dev, "chip does not support irq\n");
>> + return -EINVAL;
>
> Shouldn't this jump to the powerdown_on_error label instead of returning?
Yes.
And I will add a similar change for the devm_request_threaded_irq()
error handling where I think we should do that as well.
/Esben
prev parent reply other threads:[~2026-07-15 12:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 8:23 [PATCH 0/3] iio: light: ltr501: Add ltr329 support Esben Haabendal
2026-07-15 8:23 ` [PATCH 1/3] dt-bindings: iio: light: ltr501: Add missing ltr303 compatible Esben Haabendal
2026-07-15 8:23 ` [PATCH 2/3] dt-bindings: iio: light: ltr501: Add ltr329 compatible Esben Haabendal
2026-07-15 8:27 ` sashiko-bot
2026-07-15 8:23 ` [PATCH 3/3] iio: light: ltr501: Add ltr329 driver support Esben Haabendal
2026-07-15 8:38 ` sashiko-bot
2026-07-15 11:53 ` Esben Haabendal
2026-07-15 9:00 ` Joshua Crofts
2026-07-15 12:25 ` Esben Haabendal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877bmwo2xc.fsf@geanix.com \
--to=esben@geanix.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=joshua.crofts1@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maslovdmitry@seeed.cc \
--cc=nikita@trvn.ru \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.