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
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; } and I found the error "platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral" is caused by the function static int really_probe(struct device *dev, struct device_driver *drv) at drivers/base/dd.c LOGS: [ 4.604562] Registering the dns_resolver key type <6>VFP support v0.3: [ 4.611237] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 r4 implementor 41 architecture 2 part 30 variant 7 rev 4 <5>Registering SWP/SWPB emulation handler [ 4.627459] Registering SWP/SWPB emulation handler <4>[_regulator_get] 2 [ 4.634326] [_regulator_get] 2 <4>[_regulator_get] 3 [ 4.639396] [_regulator_get] 3 <3>[cpu_freq] ERR:try to get regulator failed, core vdd will not changed! [ 4.648956] [cpu_freq] ERR:try to get regulator failed, core vdd will not changed! <6>[cpu_freq] INF:-------------------V-F Table------------------- [ 4.662395] [cpu_freq] INF:-------------------V-F Table------------------- <6>[cpu_freq] INF: voltage = 1450mv frequency = 1008MHz [ 4.674309] [cpu_freq] INF: voltage = 1450mv frequency = 1008MHz <6>[cpu_freq] INF: voltage = 1425mv frequency = 912MHz [ 4.685442] [cpu_freq] INF: voltage = 1425mv frequency = 912MHz <6>[cpu_freq] INF: voltage = 1350mv frequency = 864MHz [ 4.696585] [cpu_freq] INF: voltage = 1350mv frequency = 864MHz <6>[cpu_freq] INF: voltage = 1250mv frequency = 720MHz [ 4.707732] [cpu_freq] INF: voltage = 1250mv frequency = 720MHz <6>[cpu_freq] INF: voltage = 1150mv frequency = 528MHz [ 4.718871] [cpu_freq] INF: voltage = 1150mv frequency = 528MHz <6>[cpu_freq] INF: voltage = 1100mv frequency = 312MHz [ 4.730004] [cpu_freq] INF: voltage = 1100mv frequency = 312MHz <6>[cpu_freq] INF: voltage = 1050mv frequency = 144MHz [ 4.741137] [cpu_freq] INF: voltage = 1050mv frequency = 144MHz <6>[cpu_freq] INF: voltage = 1000mv frequency = 0MHz [ 4.752272] [cpu_freq] INF: voltage = 1000mv frequency = 0MHz <6>[cpu_freq] INF:----------------------------------------------- [ 4.764188] [cpu_freq] INF:----------------------------------------------- <6>[cpu_freq] INF:sunxi_cpufreq_initcall, get cpu frequency from sysconfig, max freq: 1008MHz, min freqz [ 4.780882] [cpu_freq] INF:sunxi_cpufreq_initcall, get cpu frequency from sysconfig, max freq: 1008Mz <6>registered taskstats version 1 [ 4.795506] registered taskstats version 1 <4>[really_probe] hdmi, hdmi [ 4.803665] [really_probe] hdmi, hdmi <6>I2C: i2c-5: HDMI I2C adapter [ 4.810606] I2C: i2c-5: HDMI I2C adapter <6>disp clks: lcd 74250000 pre_scale 1 hdmi 74250000 pll 297000000 2x 0 [ 4.843568] disp clks: lcd 74250000 pre_scale 1 hdmi 74250000 pll 297000000 2x 0 <6>Console: switching to colour frame buffer device 160x45 [ 5.405836] Console: switching to colour frame buffer device 160x45 <4>[really_probe] 5 [ 5.431016] [really_probe] 5 <6>sunxi-rtc sunxi-rtc: setting system clock to 2010-01-01 00:00:00 UTC (1262304000) [ 5.441668] sunxi-rtc sunxi-rtc: setting system clock to 2010-01-01 00:00:00 UTC (1262304000) <4>BENN axp_regulator_init [ 5.452640] BENN axp_regulator_init <4>BENN axp_battery_init [ 5.458493] BENN axp_battery_init <4>BENN regulator_virtual_consumer_init [ 5.465433] BENN regulator_virtual_consumer_init <4>BENN virtual_init [ 5.472241] BENN virtual_init <4>[really_probe] reg-20-cs-ldo2, reg-20-cs-ldo2 [ 5.479698] [really_probe] reg-20-cs-ldo2, reg-20-cs-ldo2 <4>[regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-ldo2, reg_id=axp20_analog/fm [ 5.493018] [regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-ldo2, reg_id=axp20_analog/fm <4>[regulator_virtual_consumer_probe] pdev=c08b7378, reg_id=axp20_analog/fm [ 5.508675] [regulator_virtual_consumer_probe] pdev=c08b7378, reg_id=axp20_analog/fm <4>[_regulator_get] 2 [ 5.518428] [_regulator_get] 2 <4>[_regulator_get] 3 [ 5.523488] [_regulator_get] 3 <4>[regulator_virtual_consumer_probe] enter3 [ 5.530536] [regulator_virtual_consumer_probe] enter3 <4>[regulator_virtual_consumer_probe] enter5 [ 5.539595] [regulator_virtual_consumer_probe] enter5 <4>[really_probe] 4 [ 5.546479] [really_probe] 4 <6>platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral [ 5.560895] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral <4>[really_probe] reg-20-cs-ldo3, reg-20-cs-ldo3 [ 5.572935] [really_probe] reg-20-cs-ldo3, reg-20-cs-ldo3 <4>[regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-ldo3, reg_id=axp20_pll [ 5.585738] [regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-ldo3, reg_id=axp20_pll <4>[regulator_virtual_consumer_probe] pdev=c08b7510, reg_id=axp20_pll [ 5.600403] [regulator_virtual_consumer_probe] pdev=c08b7510, reg_id=axp20_pll <4>[_regulator_get] 2 [ 5.609638] [_regulator_get] 2 <4>[_regulator_get] 3 [ 5.614695] [_regulator_get] 3 <4>[regulator_virtual_consumer_probe] enter3 [ 5.621753] [regulator_virtual_consumer_probe] enter3 <4>[regulator_virtual_consumer_probe] enter5 [ 5.630798] [regulator_virtual_consumer_probe] enter5 <4>[really_probe] 4 [ 5.637687] [really_probe] 4 <6>platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral [ 5.647102] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral <4>[really_probe] reg-20-cs-ldo4, reg-20-cs-ldo4 [ 5.659153] [really_probe] reg-20-cs-ldo4, reg-20-cs-ldo4 <4>[regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-ldo4, reg_id=axp20_hdmi [ 5.672041] [regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-ldo4, reg_id=axp20_hdmi <4>[regulator_virtual_consumer_probe] pdev=c08b76a8, reg_id=axp20_hdmi [ 5.686828] [regulator_virtual_consumer_probe] pdev=c08b76a8, reg_id=axp20_hdmi <4>[_regulator_get] 2 [ 5.696147] [_regulator_get] 2 <4>[_regulator_get] 3 [ 5.701221] [_regulator_get] 3 <4>[regulator_virtual_consumer_probe] enter3 [ 5.708268] [regulator_virtual_consumer_probe] enter3 <4>[regulator_virtual_consumer_probe] enter5 [ 5.717334] [regulator_virtual_consumer_probe] enter5 <4>[really_probe] 4 [ 5.724219] [really_probe] 4 <6>platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral [ 5.733623] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral <4>[really_probe] reg-20-cs-buck2, reg-20-cs-buck2 [ 5.745818] [really_probe] reg-20-cs-buck2, reg-20-cs-buck2 <4>[regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-buck2, reg_id=Vcore [ 5.758531] [regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-buck2, reg_id=Vcore <4>[regulator_virtual_consumer_probe] pdev=c08b7840, reg_id=Vcore [ 5.772537] [regulator_virtual_consumer_probe] pdev=c08b7840, reg_id=Vcore <4>[_regulator_get] 2 [ 5.781423] [_regulator_get] 2 <4>[_regulator_get] 3 [ 5.786475] [_regulator_get] 3 <4>[regulator_virtual_consumer_probe] enter3 [ 5.793570] [regulator_virtual_consumer_probe] enter3 <4>[regulator_virtual_consumer_probe] enter5 [ 5.802633] [regulator_virtual_consumer_probe] enter5 <4>[really_probe] 4 [ 5.809520] [really_probe] 4 <6>platform reg-20-cs-buck2: Driver reg-20-cs-buck2 requests probe deferral [ 5.819091] platform reg-20-cs-buck2: Driver reg-20-cs-buck2 requests probe deferral <4>[really_probe] reg-20-cs-buck3, reg-20-cs-buck3 [ 5.831454] [really_probe] reg-20-cs-buck3, reg-20-cs-buck3 <4>[regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-buck3, reg_id=axp20_ddr [ 5.844520] [regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-buck3, reg_id=axp20_ddr <4>[regulator_virtual_consumer_probe] pdev=c08b79d8, reg_id=axp20_ddr [ 5.864218] [regulator_virtual_consumer_probe] pdev=c08b79d8, reg_id=axp20_ddr <4>[_regulator_get] 2 [ 5.873452] [_regulator_get] 2 <4>[_regulator_get] 3 [ 5.878512] [_regulator_get] 3 <4>[regulator_virtual_consumer_probe] enter3 [ 5.885570] [regulator_virtual_consumer_probe] enter3 <4>[regulator_virtual_consumer_probe] enter5 [ 5.894625] [regulator_virtual_consumer_probe] enter5 <4>[really_probe] 4 [ 5.901519] [really_probe] 4 <6>platform reg-20-cs-buck3: Driver reg-20-cs-buck3 requests probe deferral [ 5.911086] platform reg-20-cs-buck3: Driver reg-20-cs-buck3 requests probe deferral <4>[really_probe] reg-20-cs-ldoio0, reg-20-cs-ldoio0 [ 5.923632] [really_probe] reg-20-cs-ldoio0, reg-20-cs-ldoio0 <4>[regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-ldoio0, reg_id=axp20_mic [ 5.936962] [regulator_virtual_consumer_probe] enter1, pdev=reg-20-cs-ldoio0, reg_id=axp20_mic <4>[regulator_virtual_consumer_probe] pdev=c08b7b70, reg_id=axp20_mic [ 5.951752] [regulator_virtual_consumer_probe] pdev=c08b7b70, reg_id=axp20_mic <4>[_regulator_get] 2 [ 5.960985] [_regulator_get] 2 <4>[_regulator_get] 3 [ 5.966038] [_regulator_get] 3 <4>[regulator_virtual_consumer_probe] enter3 [ 5.973095] [regulator_virtual_consumer_probe] enter3 <4>[regulator_virtual_consumer_probe] enter5 [ 5.982154] [regulator_virtual_consumer_probe] enter5 <4>[really_probe] 4 [ 5.989071] [really_probe] 4 <6>platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral [ 5.998822] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral <6>ALSA device list: [ 6.008772] ALSA device list: <6> #0: sunxi-CODEC Audio Codec -- 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.