Hello experts,
I have some components that are powered by the VGEN LDOs in PFUZE0100
Currently I enable them in U-Boot, but I need to have control over them during runtime in Linux.
I tried regulator_get("vgen1") or regulator_get("PFUZE100_VGEN1"), but both fail.
How can I get control these?
Regards,
Erez
已解决! 转到解答。
mx6q_sabresd_pmic_pfuze100.c:
static struct regulator_consumer_supply vgen1_consumers[] = {
{
.supply = "VGEN1_1V5",
}
};
Hi Erez
I think you can look at cpu_vdd3p0 example :
arch/arm/mach-mx6/mx6_anatop_regulator.c:
/* USB phy 3P0 */
static struct regulator_consumer_supply vdd3p0_consumers[] = {
{
.supply = "cpu_vdd3p0",
},
};
pm.c pm_init( ) :
..
vdd3p0_regulator = regulator_get(NULL, "cpu_vdd3p0"); |
if (IS_ERR(vdd3p0_regulator)) {
printk(KERN_ERR "%s: failed to get 3p0 regulator Err: %d\n", | |||||
__func__, ret); | |||||
return PTR_ERR(vdd3p0_regulator); |
}
ret = regulator_set_voltage(vdd3p0_regulator, VDD3P0_VOLTAGE,
VDD3P0_VOLTAGE); |
if (ret) {
printk(KERN_ERR "%s: failed to set 3p0 regulator voltage Err: %d\n", | |||||
__func__, ret); |
}
ret = regulator_enable(vdd3p0_regulator);
if (ret) {
printk(KERN_ERR "%s: failed to enable 3p0 regulator Err: %d\n", | |||||
__func__, ret); |
}
Best regards
igor