Skip to content

Commit 3be62b9

Browse files
janaszewskiLee Jones
authored andcommitted
mfd: max77693: Adjust FLASH_EN_SHIFT and TORCH_EN_SHIFT macros
Modify FLASH_EN_SHIFT and TORCH_EN_SHIFT macros to work properly when passed enum max77693_fled values (0 for FLED1 and 1 for FLED2) from leds-max77693 driver. Previous definitions were compatible with one of the previous RFC versions of leds-max77693.c driver, which was not merged. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 60ae5b9 commit 3be62b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ enum max77693_pmic_reg {
113113
#define FLASH_EN_FLASH 0x1
114114
#define FLASH_EN_TORCH 0x2
115115
#define FLASH_EN_ON 0x3
116-
#define FLASH_EN_SHIFT(x) (6 - ((x) - 1) * 2)
117-
#define TORCH_EN_SHIFT(x) (2 - ((x) - 1) * 2)
116+
#define FLASH_EN_SHIFT(x) (6 - (x) * 2)
117+
#define TORCH_EN_SHIFT(x) (2 - (x) * 2)
118118

119119
/* MAX77693 MAX_FLASH1 register */
120120
#define MAX_FLASH1_MAX_FL_EN 0x80

0 commit comments

Comments
 (0)