Thread (6 messages) 6 messages, 3 authors, 2016-02-26

Re: [PATCH v2 3/3] fbdev: omap2: panel-dpi: implement support for a vcc regulator

From: Tomi Valkeinen <hidden>
Date: 2016-02-26 10:13:07

On 16/02/16 15:48, Uwe Kleine-König wrote:
Hello Tomi,

On Tue, Feb 16, 2016 at 03:00:00PM +0200, Tomi Valkeinen wrote:
quoted
On 20/12/15 13:13, Uwe Kleine-König wrote:
quoted
@@ -223,6 +232,10 @@ static int panel_dpi_probe_of(struct platform_device *pdev)
 	if (IS_ERR(gpio))
 		return PTR_ERR(gpio);
 
+	ddata->vcc_supply = devm_regulator_get(&pdev->dev, "vcc");
+	if (IS_ERR(ddata->vcc_supply))
+		return PTR_ERR(ddata->vcc_supply);
devm_regulator_get_optional()?
That would make the specification of a vcc supply obligatory IIUC. (Yes,
the semantic difference between regulator_get vs. regulator_get_optional
is reversed when comparing to gpio_get vs. gpio_get_optional.)
This is a bit confusing...

So, is regulator_get_optional() meant for cases where the device can
truly function without the supply in question? And regulator_get()
should be used when the device needs the supply, even if the supply
cannot be controlled via SW, and thus we may not even have the supply
visible in the SW side (leading to using dummy regulator)?

 Tomi

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