regulator: mpq7920: Fix Woverflow warning on conversion

Fix warning Woverflow on type conversion reported on x86.

Fixes: 6501c1f54a (regulator: mpq7920: add mpq7920 regulator driver)
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Link: https://lore.kernel.org/r/20200110102220.7163-1-sravanhome@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Saravanan Sekar 2020-01-10 11:22:20 +01:00 committed by Mark Brown
parent b83380512e
commit 686f63616f
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 3 additions and 1 deletions

View File

@ -221,7 +221,7 @@ static int mpq7920_parse_cb(struct device_node *np,
if (of_property_read_bool(np, "mps,buck-ovp-disable")) {
regmap_update_bits(config->regmap,
MPQ7920_BUCK1_REG_B + (rdesc->id * 4),
BIT(6), ~BIT(6));
MPQ7920_MASK_OVP, MPQ7920_OVP_DISABLE);
}
ret = of_property_read_u8(np, "mps,buck-phase-delay", &val);

View File

@ -55,6 +55,8 @@
#define MPQ7920_MASK_SWITCH_FREQ 0x30
#define MPQ7920_MASK_BUCK_PHASE_DEALY 0x30
#define MPQ7920_MASK_DVS_SLEWRATE 0xc0
#define MPQ7920_MASK_OVP 0x40
#define MPQ7920_OVP_DISABLE ~(0x40)
#define MPQ7920_DISCHARGE_ON 0x1
#define MPQ7920_REGULATOR_EN_OFFSET 7