Skip to content

Commit 4556fe8

Browse files
Mis012Lee Jones
authored andcommitted
mfd: rt5033: Fix errorneous defines
Fix regulators on rt5033 by converting some values to bitmasks which were errorneously not defined as such in the header file. Cc: Beomho Seo <beomho.seo@samsung.com> Fixes: 0b27125 ("mfd: rt5033: Add Richtek RT5033 driver core.") Signed-off-by: Michael Srba <Michael.Srba@seznam.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 15ad304 commit 4556fe8

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎include/linux/mfd/rt5033-private.h‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ enum rt5033_reg {
9191
#define RT5033_RT_HZ_MASK 0x01
9292

9393
/* RT5033 control register */
94-
#define RT5033_CTRL_FCCM_BUCK_MASK 0x00
95-
#define RT5033_CTRL_BUCKOMS_MASK 0x01
96-
#define RT5033_CTRL_LDOOMS_MASK 0x02
97-
#define RT5033_CTRL_SLDOOMS_MASK 0x03
98-
#define RT5033_CTRL_EN_BUCK_MASK 0x04
99-
#define RT5033_CTRL_EN_LDO_MASK 0x05
100-
#define RT5033_CTRL_EN_SAFE_LDO_MASK 0x06
101-
#define RT5033_CTRL_LDO_SLEEP_MASK 0x07
94+
#define RT5033_CTRL_FCCM_BUCK_MASK BIT(0)
95+
#define RT5033_CTRL_BUCKOMS_MASK BIT(1)
96+
#define RT5033_CTRL_LDOOMS_MASK BIT(2)
97+
#define RT5033_CTRL_SLDOOMS_MASK BIT(3)
98+
#define RT5033_CTRL_EN_BUCK_MASK BIT(4)
99+
#define RT5033_CTRL_EN_LDO_MASK BIT(5)
100+
#define RT5033_CTRL_EN_SAFE_LDO_MASK BIT(6)
101+
#define RT5033_CTRL_LDO_SLEEP_MASK BIT(7)
102102

103103
/* RT5033 BUCK control register */
104104
#define RT5033_BUCK_CTRL_MASK 0x1f
@@ -247,11 +247,11 @@ enum rt5033_fuel_reg {
247247
#define RT5033_FUEL_BAT_PRESENT 0x02
248248

249249
/* RT5033 PMIC interrupts */
250-
#define RT5033_PMIC_IRQ_BUCKOCP 2
251-
#define RT5033_PMIC_IRQ_BUCKLV 3
252-
#define RT5033_PMIC_IRQ_SAFELDOLV 4
253-
#define RT5033_PMIC_IRQ_LDOLV 5
254-
#define RT5033_PMIC_IRQ_OT 6
255-
#define RT5033_PMIC_IRQ_VDDA_UV 7
250+
#define RT5033_PMIC_IRQ_BUCKOCP BIT(2)
251+
#define RT5033_PMIC_IRQ_BUCKLV BIT(3)
252+
#define RT5033_PMIC_IRQ_SAFELDOLV BIT(4)
253+
#define RT5033_PMIC_IRQ_LDOLV BIT(5)
254+
#define RT5033_PMIC_IRQ_OT BIT(6)
255+
#define RT5033_PMIC_IRQ_VDDA_UV BIT(7)
256256

257257
#endif /* __RT5033_PRIVATE_H__ */

0 commit comments

Comments
 (0)