Commit fd05e369 authored by ChiaEn Wu's avatar ChiaEn Wu Committed by Lee Jones
Browse files

leds: mt6360: Fix the second LED can not enable torch mode by V4L2



V4L2 will disable strobe mode of the LED device when enable torch mode,
but this logic will conflict with the "priv->fled_torch_used"
in "mt6360_strobe_set()". So after enabling torch mode of the first
LED, the second LED will not be able to enable torch mode correctly.

Therefore, at the beginning of "mt6360_strobe_set()", check whether the
state of the upcoming change and the current LED device state are the
same, so as to avoid the above problem.

Signed-off-by: default avatarChiaEn Wu <chiaen_wu@richtek.com>
Link: https://lore.kernel.org/r/28FE6F1712799128000.chiaen_wu@richtek.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent fc3b23fa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment