diff options
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/pmic/rk8xx.c | 1 | ||||
-rw-r--r-- | drivers/power/regulator/pwm_regulator.c | 8 | ||||
-rw-r--r-- | drivers/power/regulator/rk8xx.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c index 09b9b54c62..eb3ec0f601 100644 --- a/drivers/power/pmic/rk8xx.c +++ b/drivers/power/pmic/rk8xx.c @@ -111,6 +111,7 @@ U_BOOT_DRIVER(pmic_rk8xx) = { #if CONFIG_IS_ENABLED(PMIC_CHILDREN) .bind = rk8xx_bind, #endif + .priv_auto_alloc_size = sizeof(struct rk8xx_priv), .probe = rk8xx_probe, .ops = &rk8xx_ops, }; diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c index a6c9fccd68..00a7cca7f7 100644 --- a/drivers/power/regulator/pwm_regulator.c +++ b/drivers/power/regulator/pwm_regulator.c @@ -32,13 +32,13 @@ struct pwm_regulator_info { bool polarity; struct udevice *pwm; /* initialize voltage of regulator */ - unsigned int init_voltage; + int init_voltage; /* the maximum voltage of regulator */ - unsigned int max_voltage; + int max_voltage; /* the minimum voltage of regulator */ - unsigned int min_voltage; + int min_voltage; /* the current voltage of regulator */ - unsigned int volt_uV; + int volt_uV; }; static int pwm_regulator_enable(struct udevice *dev, bool enable) diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c index e655c2d91f..c1ece96b66 100644 --- a/drivers/power/regulator/rk8xx.c +++ b/drivers/power/regulator/rk8xx.c @@ -92,9 +92,9 @@ static const struct rk8xx_reg_info *get_ldo_reg(struct udevice *pmic, struct rk8xx_priv *priv = dev_get_priv(pmic); switch (priv->variant) { case RK818_ID: - return &rk818_ldo[num - 1]; + return &rk818_ldo[num]; default: - return &rk808_ldo[num - 1]; + return &rk808_ldo[num]; } } |