After restoring to origin linux-sunxi stage/sunxi-3.4 branch's kernel &
sun7i_defconfig, the 'deferral' problem disappear. but

[    4.864677] Console: switching to colour frame buffer device 160x45
[    4.893154] axp20_buck3: incomplete constraints, leaving on
[    4.903500] axp20_buck2: incomplete constraints, leaving on
[    4.913747] axp20_ldo4: incomplete constraints, leaving on
[    4.923909] axp20_ldo3: incomplete constraints, leaving on
[    4.934070] axp20_ldo2: incomplete constraints, leaving on
[    4.944231] axp20_ldo1: incomplete constraints, leaving on





2014-03-31 10:26 GMT+08:00 Huang Benn <benn.hu...@gmail.com>:

>
>
>
> 2014-03-31 2:45 GMT+08:00 Olliver Schinagl <oliver+l...@schinagl.nl>:
>
> On 03/30/2014 03:22 PM, Huang Benn wrote:
>>
>>> for 3.4 kernel, it fail to get regulator. who know what happen. I was
>>> tracing the issue without success :P
>>> anyone can help ? thanks
>>>
>> On what hardware is this happening? all a10/a20 or all axp20* based
>> hardware?
>>
>> The bug you point out does look odd., I don't think your supposed to pass
>> NULL to it, but what do I know ;)
>>
> Both exist on Cubieboard2 and Cubietruck.
>
> When I found the following code, I get surprised. I think it's a mistake
> to pass NULL to regulator_get.
>
>          //drvdata->regulator = regulator_get(&pdev->dev, reg_id); //I've 
> tried this line, the same result.
>
> drvdata->regulator = regulator_get(NULL, reg_id); ----- Bug ?
>          //drvdata->regulator = regulator_get(NULL, "axp20_analog/fm");
>
>
>
>
>
>>
>> Olliver
>>
>>>
>>> kernel: linux-sunxi/stage/sunxi-3.4
>>>
>>>
>>> CODE:
>>>
>>> drivers/power/axp_power/virtual20.c
>>> static int regulator_virtual_consumer_probe(struct platform_device
>>> *pdev)
>>> {
>>>          char *reg_id = pdev->dev.platform_data;
>>>          struct virtual_consumer_data *drvdata;
>>>          int ret, i;
>>>
>>>          pr_warning("[%s] enter1, pdev=%s, reg_id=%s\n", __FUNCTION__,
>>> pdev->name, reg_id);
>>>
>>>          drvdata = kzalloc(sizeof(struct virtual_consumer_data),
>>> GFP_KERNEL);
>>>          if (drvdata == NULL) {
>>>                  pr_warning("[%s] enter 2\n", __FUNCTION__);
>>>                  ret = -ENOMEM;
>>>                  goto err;
>>>          }
>>>
>>>          mutex_init(&drvdata->lock);
>>>
>>>          pr_warning("[%s] pdev=%p, reg_id=%s\n", __FUNCTION__, pdev,
>>> reg_id);
>>>
>>>          //drvdata->regulator = regulator_get(&pdev->dev, reg_id);
>>> drvdata->regulator = regulator_get(NULL, reg_id); ----- Bug ?
>>>          //drvdata->regulator = regulator_get(NULL, "axp20_analog/fm");
>>>
>>>          if (IS_ERR(drvdata->regulator)) {
>>>                 ret = PTR_ERR(drvdata->regulator);
>>>                  pr_warning("[%s] enter3\n", __FUNCTION__);
>>>                  goto err;
>>>          }
>>>
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "linux-sunxi" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to linux-sunxi+unsubscr...@googlegroups.com
>>> <mailto:linux-sunxi+unsubscr...@googlegroups.com>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to linux-sunxi+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to