Re: [PATCH v3 4/4] leds: bcm63138: Add some register defines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/4/24 00:59, Linus Walleij wrote:
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 <linus.walleij@xxxxxxxxxx>
---
  drivers/leds/blink/leds-bcm63138.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/blink/leds-bcm63138.c b/drivers/leds/blink/leds-bcm63138.c
index 9fe1af156c80..190d9774164b 100644
--- a/drivers/leds/blink/leds-bcm63138.c
+++ b/drivers/leds/blink/leds-bcm63138.c
@@ -21,8 +21,9 @@
  #define BCM63138_LEDS_PER_REG				(32 / BCM63138_LED_BITS)	/* 8 */
#define BCM63138_GLB_CTRL 0x00
-#define  BCM63138_GLB_CTRL_SERIAL_LED_DATA_PPOL		0x00000002
-#define  BCM63138_GLB_CTRL_SERIAL_LED_EN_POL		0x00000008
+#define  BCM63138_GLB_CTRL_SERIAL_LED_DATA_PPOL		BIT(1)

Want to add:

#define BCM63138_GLB_CTRL_SERIAL_LED_CLK_POL	BIT(2)

while at it?

+#define  BCM63138_GLB_CTRL_SERIAL_LED_EN_POL		BIT(3)
+#define  BCM63138_GLB_CTRL_SERIAL_LED_MSB_FIRST		BIT(4)
  #define BCM63138_MASK					0x04
  #define BCM63138_HW_LED_EN				0x08
  #define BCM63138_SERIAL_LED_SHIFT_SEL			0x0c
@@ -35,6 +36,7 @@
  #define BCM63138_BRIGHT_CTRL3				0x28
  #define BCM63138_BRIGHT_CTRL4				0x2c
  #define BCM63138_POWER_LED_CFG				0x30
+#define BCM63138_POWER_LUT				0x34 /* -> b0 */

Maybe BCM63138_POWER_LUT_BASE0, because it is an array on some chips, like 63138 and at offset 0x74 we have BCM63138_POWER_LUT_BASE1.
--
Florian




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux