From: Mark Brown <broonie@kernel.org>
To: Martin Kepplinger <martin.kepplinger@puri.sm>
Cc: mchehab@kernel.org, sakari.ailus@linux.intel.com, kernel@puri.sm,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-pm@vger.kernel.org, Angus Ainslie <angus@akkea.ca>
Subject: Re: [PATCH v2] media: i2c: dw9714: add optional regulator support
Date: Fri, 26 Nov 2021 13:05:09 +0000 [thread overview]
Message-ID: <YaDbhSsh5vKBsZai@sirena.org.uk> (raw)
In-Reply-To: <20211126090107.1243558-1-martin.kepplinger@puri.sm>
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
On Fri, Nov 26, 2021 at 10:01:07AM +0100, Martin Kepplinger wrote:
> + dw9714_dev->vcc = devm_regulator_get_optional(&client->dev, "vcc");
> + if (IS_ERR(dw9714_dev->vcc)) {
> + dev_dbg(&client->dev, "No vcc regulator found: %ld\n",
> + PTR_ERR(dw9714_dev->vcc));
> + dw9714_dev->vcc = NULL;
> + }
To repeat my original feedback: unless the supply can be physically
absent you should use regulator_get(). The _optional variants are only
for cases where the supply might be physically absent.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2021-11-26 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 9:01 [PATCH v2] media: i2c: dw9714: add optional regulator support Martin Kepplinger
2021-11-26 10:44 ` Sakari Ailus
2021-11-26 11:06 ` Martin Kepplinger
2021-11-26 12:28 ` Sakari Ailus
2021-11-26 13:05 ` Mark Brown [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=YaDbhSsh5vKBsZai@sirena.org.uk \
--to=broonie@kernel.org \
--cc=angus@akkea.ca \
--cc=kernel@puri.sm \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=martin.kepplinger@puri.sm \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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;
as well as URLs for NNTP newsgroup(s).