Commit ae60e6a9 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: hi6421: Use correct variable type for regmap api val argument

Use unsigned int instead of u32 for regmap_read/regmap_update_bits val
argument.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210619124133.4096683-1-axel.lin@ingics.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7740ab84
...@@ -386,7 +386,7 @@ static int hi6421_regulator_enable(struct regulator_dev *rdev) ...@@ -386,7 +386,7 @@ static int hi6421_regulator_enable(struct regulator_dev *rdev)
static unsigned int hi6421_regulator_ldo_get_mode(struct regulator_dev *rdev) static unsigned int hi6421_regulator_ldo_get_mode(struct regulator_dev *rdev)
{ {
struct hi6421_regulator_info *info = rdev_get_drvdata(rdev); struct hi6421_regulator_info *info = rdev_get_drvdata(rdev);
u32 reg_val; unsigned int reg_val;
regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val); regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val);
if (reg_val & info->mode_mask) if (reg_val & info->mode_mask)
...@@ -398,7 +398,7 @@ static unsigned int hi6421_regulator_ldo_get_mode(struct regulator_dev *rdev) ...@@ -398,7 +398,7 @@ static unsigned int hi6421_regulator_ldo_get_mode(struct regulator_dev *rdev)
static unsigned int hi6421_regulator_buck_get_mode(struct regulator_dev *rdev) static unsigned int hi6421_regulator_buck_get_mode(struct regulator_dev *rdev)
{ {
struct hi6421_regulator_info *info = rdev_get_drvdata(rdev); struct hi6421_regulator_info *info = rdev_get_drvdata(rdev);
u32 reg_val; unsigned int reg_val;
regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val); regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val);
if (reg_val & info->mode_mask) if (reg_val & info->mode_mask)
...@@ -411,7 +411,7 @@ static int hi6421_regulator_ldo_set_mode(struct regulator_dev *rdev, ...@@ -411,7 +411,7 @@ static int hi6421_regulator_ldo_set_mode(struct regulator_dev *rdev,
unsigned int mode) unsigned int mode)
{ {
struct hi6421_regulator_info *info = rdev_get_drvdata(rdev); struct hi6421_regulator_info *info = rdev_get_drvdata(rdev);
u32 new_mode; unsigned int new_mode;
switch (mode) { switch (mode) {
case REGULATOR_MODE_NORMAL: case REGULATOR_MODE_NORMAL:
...@@ -435,7 +435,7 @@ static int hi6421_regulator_buck_set_mode(struct regulator_dev *rdev, ...@@ -435,7 +435,7 @@ static int hi6421_regulator_buck_set_mode(struct regulator_dev *rdev,
unsigned int mode) unsigned int mode)
{ {
struct hi6421_regulator_info *info = rdev_get_drvdata(rdev); struct hi6421_regulator_info *info = rdev_get_drvdata(rdev);
u32 new_mode; unsigned int new_mode;
switch (mode) { switch (mode) {
case REGULATOR_MODE_NORMAL: case REGULATOR_MODE_NORMAL:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment