Skip to contentSkip to conversation

Board breakage due to upstream patch

PATCH Lee Jones 2 participants 4 messages Mar 29, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Lee Jones

author
#0 lore raw

Hi Mark,

Your patch "regulator: Support driver probe deferral" (below) prevents my Snowball Development Board from booting.

What's the correct thing to do?

---------------------------------------------------------------------

Author: Mark Brown <[email protected]>
Date:   Sun Mar 11 13:07:56 2012 +0000

regulator: Support driver probe deferral

If we fail to locate a requested regulator return -EPROBE_DEFER. If drivers pass this error code through to their caller (which they really should) then this will ensure that the probe is retried later when further devices become available. In the unusual case where a driver doesn't want this it can override the default behaviour.

drivers/regulator/core.c +2 -2
index e9a83f8..fcde037 100644
@@ -1210,7 +1210,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
 {
        struct regulator_dev *rdev;
        struct regulator_map *map;
-       struct regulator *regulator = ERR_PTR(-ENODEV);
+       struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
        const char *devname = NULL;
        int ret;
 
@@ -2834,7 +2834,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
 
                if (!r) {
                        dev_err(dev, "Failed to find supply %s\n", supply);
-                       ret = -ENODEV;
+                       ret = -EPROBE_DEFER;
                        goto scrub;
                }
 

Kind regards,
Lee

Signature · 5 lines
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515 
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#1 lore raw
Quoted 3 lines · Lee Jones

Your patch "regulator: Support driver probe deferral" (below) prevents my Snowball Development Board from booting.

What's the correct thing to do?

Provide a report with a little more detail on the problem:

http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

It's possible the patch I posted yesterday which fixes a deadlock in error handling paths might help, though given that all we're doing is changing the error code here I'd say regulator support on your your board was broken anyway. Given the lack of any detail in your report I'm just guessing completely in the dark here.

author
#2 lore raw
Quoted 8 lines · Mark Brown
Quoted 3 lines · Lee Jones

Your patch "regulator: Support driver probe deferral" (below) prevents my Snowball Development Board from booting.

What's the correct thing to do?

Provide a report with a little more detail on the problem:

Quoted 7 lines

http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

It's possible the patch I posted yesterday which fixes a deadlock in error handling paths might help, though given that all we're doing is changing the error code here I'd say regulator support on your your board was broken anyway. Given the lack of any detail in your report I'm just guessing completely in the dark here.

I haven't undertaken any debugging of the issue, as I don't have the time, nor do I have the knowledge to be able to tell you what might be happening as a result of the change.

All I can tell you at this stage is that with your patch applied, my board doesn't boot past "Uncompressing Linux... done, booting the kernel..". Once reverted it boots again.

I'll try to find some time to have a dig around, in order to provide you with some more useful information.

Signature · 5 lines
Lee Jones
Linaro ST-Ericsson Landing Team Lead
M: +44 77 88 633 515
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw
Quoted 7 lines · Lee Jones

I haven't undertaken any debugging of the issue, as I don't have the time, nor do I have the knowledge to be able to tell you what might be happening as a result of the change.

All I can tell you at this stage is that with your patch applied, my board doesn't boot past "Uncompressing Linux... done, booting the kernel..". Once reverted it boots again.

Like I say I would expect that the board had some breakage in the first place - look for errors in the boot log for example.