Thread (5 messages) 5 messages, 3 authors, 2021-11-26

Re: [PATCH v2] media: i2c: dw9714: add optional regulator support

From: Mark Brown <broonie@kernel.org>
Date: 2021-11-26 13:07:16
Also in: linux-media, lkml

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.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help