Skip to content

power: supply: power-supply-leds: Add activate() callback to triggers

Hans de Goede linux-leds linux-pm platform-driver-x86 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesApplied
  2. v13 patches 5 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3power: supply: power-supply-leds: Add power_supply_[un]register_led_trigger()drivers/power/supply/power_supply_leds.c include/linux/power_supply.h+86 -770 replies
2/3power: supply: power-supply-leds: Share trig pointer for online and charging_fulldrivers/power/supply/power_supply_leds.c include/linux/power_supply.h+10 -110 replies
3/3power: supply: power-supply-leds: Add activate() callback to triggersdrivers/power/supply/power_supply_leds.c+11 -00 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy Shevchenko
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] power: supply: power-supply-leds: Add activate() callback to triggers

Hi All,

This series adds an activate callback to the power-supply LED triggers to ensure that power-supply LEDs get the correct initial value when the LED gets registered after the power_supply has been registered.

Note that in 6.10-rc1 commit 822c91e72eac ("leds: trigger: Store brightness set by led_trigger_event()") already solves this for the case were the trigger only changes only the brightness. Since the power-supply triggers can also set blinking and colors of mc LEDs that is not enough.

Patches 1-2 do some refactoring / prep work and patch 3 adds the actual activate callback.

This series applies on top of 6.10-rc1 + "[PATCH v10 0/6] KTD2026 indicator LED for X86 Xiaomi Pad2" that series should show up in
https://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git/

soon, since this is also LED related I guess this could be merged through the LED tree too. Or Lee could provide an IB branch for Sebastian to merge that branch + this series through the psy tree. Sebastian, what has your preference ?

Regards,

Hans

Hans de Goede (3):
power: supply: power-supply-leds: Add
power_supply_[un]register_led_trigger()
power: supply: power-supply-leds: Share trig pointer for online and
charging_full
power: supply: power-supply-leds: Add activate() callback to triggers

 drivers/power/supply/power_supply_leds.c | 178 +++++++++++++----------
 include/linux/power_supply.h             |   9 +-
 2 files changed, 103 insertions(+), 84 deletions(-)
Signature · 1 line
2.45.1