[PATCH 0/4] leds: leds-qcom-lpg: Add several fixes and the PWM frequency mode support
From: Fenglin Wu
Date: Tue Nov 17 2026 - 04:32:39 EST
This series of changes combines and rebased these 2 series as they were
changing the same driver file. It is easier to send them together to handle
the dependency:
https://lore.kernel.org/linux-leds/20260716-lpg-rgb-color-balance-fix-v6-1-b49d51528f61@xxxxxxxxxxxxxxxx/
https://lore.kernel.org/linux-leds/20260827-lpg-pwm-fm-support-v3-1-88ae5208c57b@xxxxxxxxxxxxxxxx/
Also, a new change is added to close the discussion in here:
https://lore.kernel.org/linux-leds/20260827133753.GM770273@xxxxxxxxxx/
Following are the Changes in this series after the combination:
- Added changes to scale the pattern when the brightness and
multi_intensity is updated while the pattern is active.
- Added a new change for explicit LUT ownership tracking to fix single-entry
LUT leaks during pattern cleanup.
- Skipped LUT allocation for zero-intensity multicolor channels to fix
comments from Konrad.
- Renamed Frequency Mode identifiers consistently from `fm_*`/`frequency_mode`
to `freq_mode_*', and clean up the code and fix the naming issues to address
the review comments from Lee.
- Added logic to compare the timing accuracy between standard pwm mode and
frequency mode and select the better one.
The change series was tested on Maili QRD device with pmh0101 in these scenarios:
1. Tested the RGB LEDs by randomly adjusting the brightness, hw_pattern, and
multi_intensity when it is working in HW pattern mode, and the LED pattern
and color were confirmed to update correctly every time.
2. Exercised the PWM4 channel on pmh0101 by requesting it at different periods
with a 50% duty cycle, confirming that the frequency mode could be configured
correctly.
Signed-off-by: Fenglin Wu <fenglin.wu@xxxxxxxxxxxxxxxx>
---
Fenglin Wu (4):
leds: rgb: leds-qcom-lpg: Fix single-entry LUT leak
leds: rgb: leds-qcom-lpg: Fix LED color balancing in HW pattern mode
leds: rgb: leds-qcom-lpg: add mutex lock in lpg_pwm_get_state()
leds: rgb: leds-qcom-lpg: Add PWM frequency mode support
drivers/leds/rgb/leds-qcom-lpg.c | 643 ++++++++++++++++++++++++++++++++++-----
1 file changed, 562 insertions(+), 81 deletions(-)
---
base-commit: 4e88404a72e5e26720539e5555c383069cefb486
change-id: 20261103-led-qcom-leds-multiple-fixes-and-pwm-fm-support-3a04f85c60b9
Best regards,
--
Fenglin Wu <fenglin.wu@xxxxxxxxxxxxxxxx>