Linux LED subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] leds: lp55xx: Fix the LP5569 LED mapping table placement
@ 2026-10-26 13:55 Arthur Crepin Leblond
  2026-10-26 13:55 ` [PATCH 1/3] leds: lp55xx: Add program and mux base pages to the device config Arthur Crepin Leblond
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Arthur Crepin Leblond @ 2026-10-26 13:55 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Christian Marangi, Griffin Kroah-Hartman,
	Jonathan Corbet, Shuah Khan, Randy Dunlap
  Cc: linux-leds, linux-kernel, linux-doc, Arthur Crepin Leblond

The LP5569 and LP5523 keep a per-engine LED mapping table in the SRAM.
The table is read by the engine's map_* instructions.

On LP5569, the instruction loads a table from a 7-bits absolute SRAM
address (0-127), therefore the mapping table address must be in the
lower-half of the SRAM.

This series makes the layout configurable and fixes the LP5569:

  - lp55xx: Add program and mux base pages to the device config
    - Add prog_page_base and mux_page_base to struct
      lp55xx_device_config and use them for the engine program pages
      and for the mapping tables written by the engineN_leds attribute.
    - lp5569/lp5523/lp8501: set values matching their current layout,
      so their behavior is unchanged.

  - lp5569: Place the LED mapping table in the lower half of the SRAM
    - Place the mapping table at pages 0-2 (address 0x00/0x10/0x20)
    - Place the engine programs at addresses 0x30/0x70/0xb0 (4 pages
      per engine)

Tested on a Raspberry Pi Zero 2W.

Arthur Crepin Leblond

Signed-off-by: Arthur Crepin Leblond <arthur@marmottus.net>
---
Arthur Crepin Leblond (3):
      leds: lp55xx: Add program and mux base pages to the device config
      leds: leds-lp5569: Place the LED mapping table in the lower half of the SRAM
      Documentation: leds: lp55xx: Add an LP5569 example

 Documentation/leds/leds-lp55xx.rst | 24 +++++++++++++++++
 drivers/leds/leds-lp5523.c         |  4 +++
 drivers/leds/leds-lp5569.c         | 53 ++++++++++++++++++++++++++------------
 drivers/leds/leds-lp55xx-common.c  | 14 +++++-----
 drivers/leds/leds-lp55xx-common.h  |  6 +++++
 drivers/leds/leds-lp8501.c         |  2 ++
 6 files changed, 80 insertions(+), 23 deletions(-)
---
base-commit: c190ff288cb5c09e1b30db9e51a11d979d27f5b9
change-id: 20261026-lp55xx-1bdb2c9d8fc1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-26 14:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26 13:55 [PATCH 0/3] leds: lp55xx: Fix the LP5569 LED mapping table placement Arthur Crepin Leblond
2026-10-26 13:55 ` [PATCH 1/3] leds: lp55xx: Add program and mux base pages to the device config Arthur Crepin Leblond
2026-10-26 13:59   ` sashiko-bot
2026-10-26 13:55 ` [PATCH 2/3] leds: leds-lp5569: Place the LED mapping table in the lower half of the SRAM Arthur Crepin Leblond
2026-10-26 14:02   ` sashiko-bot
2026-10-26 13:55 ` [PATCH 3/3] Documentation: leds: lp55xx: Add an LP5569 example Arthur Crepin Leblond
2026-10-26 14:00   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox