static struct regulator_init_data tps65910_ldo5 = {
.constraints = {
.name = "VAUX33",
.min_uV = 1800000,
.max_uV = 3300000,
.apply_uV = 1,
.always_on = 0, //由于在头文件中已经赋值,那么在此处需要重新赋值为0
.valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_MODE,
.valid_modes_mask = REGULATOR_MODE_STANDBY | REGULATOR_MODE_NORMAL,
},
.num_consumer_supplies = ARRAY_SIZE(tps65910_ldo5_supply),
.consumer_supplies = tps65910_ldo5_supply,
};
struct regulation_constraints {
char *name;
/* voltage output range (inclusive) - for voltage control */
int min_uV;
int max_uV;
int uV_offset;
/* current output range (inclusive) - for current control */
int min_uA;
int max_uA;
/* valid regulator operating modes for this machine */
unsigned int valid_modes_mask;
/* valid operations for regulator on this machine */
unsigned int valid_ops_mask;
/* regulator input voltage - only if supply is another regulator */
int input_uV;
/* regulator suspend states for global PMIC STANDBY/HIBERNATE */
struct regulator_state state_disk;
struct regulator_state state_mem;
struct regulator_state state_standby;
suspend_state_t initial_state; /* suspend state to set at init */
/* mode to set on startup */
unsigned int initial_mode;
/* constraint flags */
unsigned always_on:1; /* regulator never off when system is on */这个是系统电压永远打开,在头文件中已经赋值
unsigned boot_on:1; /* bootloader/firmware enabled regulator */
unsigned apply_uV:1; /* apply uV constraint if min == max */
};