]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
regulator: fan53555: Fix wrong TCS_SLEW_MASK
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Thu, 6 Apr 2023 17:18:01 +0000 (20:18 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Jun 2023 12:57:52 +0000 (14:57 +0200)
BugLink: https://bugs.launchpad.net/bugs/2023929
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/regulator/fan53555.c

index 45f07d2ad1c58bf5252e00806ea23123a6f531c1..41537c45f0367dd4b0301ecb8c445925d3c858c8 100644 (file)
@@ -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,