[PATCH v1 1/4] i2c: mux: Add i2c-arbitrator 'mux' driver
Stephen Warren
swarren at wwwdotorg.org
Fri Feb 15 11:16:29 EST 2013
On 02/14/2013 04:59 PM, Doug Anderson wrote:
> Stephen,
>
> On Thu, Feb 14, 2013 at 3:35 PM, Stephen Warren <swarren at wwwdotorg.org> wrote:
>>> [ 1.510000] platform-lcd supply lcd_vdd not found, using dummy regulator
>>
>> What prints that? I assume that's some error-handling logic in the
>> platform-lcd driver. It's probably not detecting an -EPROBE_DEFFERED
>> return from regulator_get() correctly, and hence proceeding with the
>> probe() when it should simply return and let the kernel retry the
>> probe() later.
>
> It's printed by "core.c" in drivers/regulator.
>
> pr_warn("%s supply %s not found, using dummy regulator\n",
> devname, id);
> rdev = dummy_regulator_rdev;
> goto found;
>
> We can avoid that logic with has_full_constraints. That will be some
> work to get done but also should be done at some point in time. Once
> we use has_full_constraints we'll get ERR_PTR(-EPROBE_DEFER);
That flag is normally set automatically:
static int __init regulator_init_complete(void)
...
/*
* Since DT doesn't provide an idiomatic mechanism for
* enabling full constraints and since it's much more natural
* with DT to provide them just assume that a DT enabled
* system has full constraints.
*/
if (of_have_populated_dt())
has_full_constraints = true;
Is of_have_populated_dt() not returning true for you? Perhaps when using
the initcall, your regulator_get()s are happening before
regulator_init_complete() gets called, which is the source of the problem?
More information about the devicetree-discuss
mailing list