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,
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