diff options
author | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2023-04-06 20:18:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-26 15:29:56 +0300 |
commit | bf5037b69cb1fc54b71177b3f41bb6bbe4efacce (patch) | |
tree | a248d1248795332d511f9501528345734106e166 /drivers/regulator | |
parent | 2e3947589eb3b9629bb1b4f0b982085273f7a3d1 (diff) | |
download | linux-bf5037b69cb1fc54b71177b3f41bb6bbe4efacce.tar.xz |
regulator: fan53555: Fix wrong TCS_SLEW_MASK
[ Upstream commit c5d5b55b3c1a314137a251efc1001dfd435c6242 ]
The support for TCS4525 regulator has been introduced with a wrong
ramp-rate mask, which has been defined as a logical expression instead
of a bit shift operation.
For clarity, fix it using GENMASK() macro.
Fixes: 914df8faa7d6 ("regulator: fan53555: Add TCS4525 DCDC support")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://lore.kernel.org/r/20230406171806.948290-4-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/fan53555.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 45f07d2ad1c5..41537c45f036 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -61,7 +61,7 @@ #define TCS_VSEL1_MODE (1 << 6) #define TCS_SLEW_SHIFT 3 -#define TCS_SLEW_MASK (0x3 < 3) +#define TCS_SLEW_MASK GENMASK(4, 3) enum fan53555_vendor { FAN53526_VENDOR_FAIRCHILD = 0, |