Skip to content

Commit def9c8b

Browse files
Linus Walleijlag-linaro
authored andcommitted
leds: bcm63138: Add some register defines
The Power LUT (Look-up Table) register base was missing, also add the bit define for sending serial LED data in reverse order, and use the BIT() macro to define the bits in the control register. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 5f312fd commit def9c8b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/leds/blink/leds-bcm63138.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
#define BCM63138_LEDS_PER_REG (32 / BCM63138_LED_BITS) /* 8 */
2222

2323
#define BCM63138_GLB_CTRL 0x00
24-
#define BCM63138_GLB_CTRL_SERIAL_LED_DATA_PPOL 0x00000002
25-
#define BCM63138_GLB_CTRL_SERIAL_LED_EN_POL 0x00000008
24+
#define BCM63138_GLB_CTRL_SERIAL_LED_DATA_PPOL BIT(1)
25+
#define BCM63138_GLB_CTRL_SERIAL_LED_CLK_POL BIT(2)
26+
#define BCM63138_GLB_CTRL_SERIAL_LED_EN_POL BIT(3)
27+
#define BCM63138_GLB_CTRL_SERIAL_LED_MSB_FIRST BIT(4)
2628
#define BCM63138_MASK 0x04
2729
#define BCM63138_HW_LED_EN 0x08
2830
#define BCM63138_SERIAL_LED_SHIFT_SEL 0x0c
@@ -35,6 +37,7 @@
3537
#define BCM63138_BRIGHT_CTRL3 0x28
3638
#define BCM63138_BRIGHT_CTRL4 0x2c
3739
#define BCM63138_POWER_LED_CFG 0x30
40+
#define BCM63138_POWER_LUT_BASE0 0x34 /* -> b0 */
3841
#define BCM63138_HW_POLARITY 0xb4
3942
#define BCM63138_SW_DATA 0xb8
4043
#define BCM63138_SW_POLARITY 0xbc

0 commit comments

Comments
 (0)