From: Jonathan Cameron <jic23@kernel.org>
To: Roman Vivchar <rva333@protonmail.com>
Cc: "Joshua Crofts" <crofts@kernel.org>,
"Roman Vivchar via B4 Relay"
<devnull+rva333.protonmail.com@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>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] iio: light: stk3310: add vdd regulator support
Date: Sat, 21 Nov 2026 23:52:47 +0000 [thread overview]
Message-ID: <20261121235247.70fc8288@jic23-hlaptop> (raw)
In-Reply-To: <e-R4fXmiyMiZY43j027FJGyFhtgfke6qdOAsLOTr7VMAfx8pL5sjDimH44WdZ0tIvoxgb3-ZPWWbZb5DE8gMloPynRLs2ztiBLezfyijQg0=@protonmail.com>
On Thu, 19 Nov 2026 16:33:21 +0000
Roman Vivchar <rva333@protonmail.com> wrote:
> Hi Jonathan, Joshua,
>
> On Thursday, November 19th, 2026 at 5:32 AM, Jonathan Cameron <jic23@kernel.org> wrote:
>
> > On Wed, 18 Nov 2026 11:01:38 +0100
> > Joshua Crofts <crofts@kernel.org> wrote:
> >
> > > On Tue, 17 Nov 2026 20:08:37 +0200
> > > Roman Vivchar via B4 Relay <devnull+rva333.protonmail.com@kernel.org> wrote:
> > >
> > > > @@ -745,6 +746,10 @@ static int stk3310_probe(struct i2c_client *client)
> > > > device_property_read_u32(&client->dev, "proximity-near-level",
> > > > &data->ps_near_level);
> > > >
> > > > + ret = devm_regulator_get_enable(dev, "vdd");
> > > > + if (ret)
> > > > + return dev_err_probe(dev, ret, "failed to get vdd supply\n");
> > > > +
> > >
> > > IMO this should work, but I don't like the mixing of devm_* and non-devm_*
> > > functions, this may cause issues down the road. Consider moving the driver
> > > to all devm_* functions?
> >
> > In this particular case I agree with you because the conversion is very
> > simple. Generally the rule of thumb is that devm from start of probe
> > until you decide to stop, then no more devm. In that case the unwind
> > order should be correct. This change doesn't break that, but the
> > driver already breaks this wrt to the interrupt, so if Roman
> > doesn't mind would be great to fix it whilst touching the driver.
> >
>
> Sure, I will include one more patch for devm_* API migration before
> adding regulator and new chip support.
>
> I recently found another STK3337 variant on yet another development device,
> called STK3331. It seems to be exactly the same, except for the chip ID.
> Should I include it in the next revision, or send it as a separate series
> later?
Entirely up to you! If the change is small can certainly be an addition
to this series.
>
> Best regards,
> Roman
next prev parent reply other threads:[~2026-11-21 23:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 18:08 [PATCH v2 0/4] iio: light: stk3310: stk3337 support + vdd supply Roman Vivchar via B4 Relay
2026-11-17 18:08 ` [PATCH v2 1/4] dt-bindings: iio: light: stk33xx: add power supply support Roman Vivchar via B4 Relay
2026-11-18 18:12 ` Conor Dooley
2026-11-19 3:29 ` Jonathan Cameron
2026-11-19 16:37 ` Conor Dooley
2026-11-19 17:20 ` Roman Vivchar
2026-11-19 17:44 ` Conor Dooley
2026-11-17 18:08 ` [PATCH v2 2/4] dt-bindings: iio: light: stk33xx: add stk3337 Roman Vivchar via B4 Relay
2026-11-18 18:11 ` Conor Dooley
2026-11-17 18:08 ` [PATCH v2 3/4] iio: light: stk3310: add vdd regulator support Roman Vivchar via B4 Relay
2026-11-18 10:01 ` Joshua Crofts
2026-11-19 3:32 ` Jonathan Cameron
2026-11-19 16:33 ` Roman Vivchar
2026-11-21 23:52 ` Jonathan Cameron [this message]
2026-11-17 18:08 ` [PATCH v2 4/4] iio: light: stk3310: add stk3337 support Roman Vivchar via B4 Relay
2026-11-18 10:03 ` Joshua Crofts
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=20261121235247.70fc8288@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=crofts@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+rva333.protonmail.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=rva333@protonmail.com \
/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
all inboxes | Powered by JetHome®