leds: flash: leds-qcom-flash: Limit LED current based on thermal condition
authorFenglin Wu <quic_fenglinw@quicinc.com>
Fri, 5 Jul 2024 07:55:01 +0000 (15:55 +0800)
committerLee Jones <lee@kernel.org>
Thu, 1 Aug 2024 12:40:08 +0000 (13:40 +0100)
commita0864cf32044233e56247fa0eed3ac660f15db9e
tree6cd87c39205ec81941b7834dac097616fcf76ed5
parent10cc487692e7e3dea793a75af499696cc059f11d
leds: flash: leds-qcom-flash: Limit LED current based on thermal condition

The flash module has status bits to indicate different thermal
conditions which are called as OTSTx. For each OTSTx status,
there is a recommended total flash current for all channels to
prevent the flash module entering into higher thermal level.
For example, the total flash current should be limited to 1000mA/500mA
respectively when the HW reaches the OTST1/OTST2 thermal level.

Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Link: https://lore.kernel.org/r/20240705-qcom_flash_thermal_derating-v3-1-8e2e2783e3a6@quicinc.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/flash/leds-qcom-flash.c