leds: leds-lp55xx: Generalize update_program_memory function
LED Driver based on lp55xx all use the same logic to write memory in SMEM. The only difference is that legacy chip doesn't support pages and have the engine regs one after another. To handle this apply the same logic used for load_engine also for update_program_memory. Introduce a new config in device_config, base_prog. For LED chip that doesn't support pages, offset this values of 32 for each engine. Update all lp55xx based LED driver to use this new function and define all the required bits. Suggested-by:Lee Jones <lee@kernel.org> Signed-off-by:
Christian Marangi <ansuelsmth@gmail.com> Link: https://lore.kernel.org/r/20240626160027.19703-9-ansuelsmth@gmail.comSigned-off-by:
Lee Jones <lee@kernel.org>
Showing
Please register or sign in to comment