Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 0b271258544b ("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>

authored by

Michael Srba and committed by
Lee Jones
4556fe8f 15ad3048

+14 -14
+14 -14
include/linux/mfd/rt5033-private.h
··· 91 91 #define RT5033_RT_HZ_MASK 0x01 92 92 93 93 /* 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) 102 102 103 103 /* RT5033 BUCK control register */ 104 104 #define RT5033_BUCK_CTRL_MASK 0x1f ··· 247 247 #define RT5033_FUEL_BAT_PRESENT 0x02 248 248 249 249 /* 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) 256 256 257 257 #endif /* __RT5033_PRIVATE_H__ */