From: Lee Jones <lee@kernel.org>
To: Lukas Timmermann <linux@timmermann.space>
Cc: pavel@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, linux-leds@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 2/2] leds: as3668: Driver for the ams Osram 4-channel i2c LED driver
Date: Tue, 25 Nov 2025 12:58:42 +0000 [thread overview]
Message-ID: <20251125125842.GB1127788@google.com> (raw)
In-Reply-To: <gk6v5x5jwapaafsppq2svukviidibvsmdwwp2vizfd7yetb5fh@gaov2dqfxp34>
On Fri, 21 Nov 2025, Lukas Timmermann wrote:
> On Thu, Nov 20, 2025 at 12:07:04PM +0000, Lee Jones wrote:
> > On Mon, 17 Nov 2025, Lukas Timmermann wrote:
> >
> > > Since there were no existing drivers for the AS3668 or related devices,
> > > a new driver was introduced in a separate file. Similar devices were
> > > reviewed, but none shared enough characteristics to justify code reuse.
> > > As a result, this driver is written specifically for the AS3668.
> > >
> > > Signed-off-by: Lukas Timmermann <linux@timmermann.space>
> > > ---
> > > MAINTAINERS | 1 +
> > > drivers/leds/Kconfig | 13 +++
> > > drivers/leds/Makefile | 1 +
> > > drivers/leds/leds-as3668.c | 222 +++++++++++++++++++++++++++++++++++++
> > > 4 files changed, 237 insertions(+)
> > > create mode 100644 drivers/leds/leds-as3668.c
[...]
> > > + if (reg < 0) {
> > > + dev_err(&as3668->client->dev, "failed to read channel modes\n");
> > > + return;
> > > + }
> > > +
> > > + switch (led_id) {
> > > + case 0:
> > > + reg &= ~AS3668_CURR1_MODE_MASK;
> > > + reg |= FIELD_PREP(AS3668_CURR1_MODE_MASK, mode);
> > > + break;
> > > + case 1:
> > > + reg &= ~AS3668_CURR2_MODE_MASK;
> > > + reg |= FIELD_PREP(AS3668_CURR2_MODE_MASK, mode);
> > > + break;
> > > + case 2:
> > > + reg &= ~AS3668_CURR3_MODE_MASK;
> > > + reg |= FIELD_PREP(AS3668_CURR3_MODE_MASK, mode);
> > > + break;
> > > + case 3:
> > > + reg &= ~AS3668_CURR4_MODE_MASK;
> > > + reg |= FIELD_PREP(AS3668_CURR4_MODE_MASK, mode);
> > > + break;
> > > + default:
> > > + return;
> > > + }
> > > +
> > > + err = i2c_smbus_write_byte_data(as3668->client, AS3668_CURR_MODE_REG, reg);
> >
> > Either it's an error or it's not. Why isn't it being propagated?
> >
> My patch had a dev_err() call here. It's missing in your citation.
> Was using dev_err() here wrong?
Yes. It's preferable that you propagate (return) the error.
If you don't do that, it's just a warning.
--
Lee Jones [李琼斯]
prev parent reply other threads:[~2025-11-25 12:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 2:00 [PATCH v10 0/2] Support for Osram as3668 LED driver Lukas Timmermann
2025-11-17 2:00 ` [PATCH v10 1/2] dt-bindings: leds: Add new as3668 support Lukas Timmermann
2025-11-17 2:00 ` [PATCH v10 2/2] leds: as3668: Driver for the ams Osram 4-channel i2c LED driver Lukas Timmermann
2025-11-20 11:43 ` Lukas Timmermann
2025-11-20 13:31 ` Lee Jones
2025-11-25 11:20 ` Lukas Timmermann
2025-11-20 12:07 ` Lee Jones
2025-11-21 14:05 ` Lukas Timmermann
2025-11-25 12:58 ` Lee Jones [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=20251125125842.GB1127788@google.com \
--to=lee@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux@timmermann.space \
--cc=pavel@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).