leds: leds-qpnp-flash: provide runtime detection for torch LED
Torch LEDs were hard coded as 2, 3 in LED array and whenever torch is
in use, driver dereference LED node 2 and 3 to utilize it. However,
when there is only one flash LED, torch will be placed at index 1 in
LED array and driver cannot access torch at all. To address this issue
update switch node type when torch or flash is utilized to detect LED
in use is torch or flash.
Change-Id: I55c7088388fc7a651ab5c16cc9821759f46c8cc7
Signed-off-by:
Chun Zhang <chunz@codeaurora.org>
Loading
Please register or sign in to comment