projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ae8dc1
)
leds: flash: leds-qcom-flash: Disable LED when changing brightness
author
Dylan Van Assche
<me@dylanvanassche.be>
Sun, 7 May 2023 17:29:41 +0000
(19:29 +0200)
committer
Lee Jones
<lee@kernel.org>
Thu, 25 May 2023 11:16:20 +0000
(12:16 +0100)
The Qualcomm PMI8998 PMIC requires the LED to be disabled when configuring
the brightness. Always disable the LED when setting the brightness and
re-enable it afterwards.
Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
Link:
https://lore.kernel.org/r/20230507172941.364852-3-me@dylanvanassche.be
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/flash/leds-qcom-flash.c
patch
|
blob
|
history
diff --git
a/drivers/leds/flash/leds-qcom-flash.c
b/drivers/leds/flash/leds-qcom-flash.c
index 16045b5d89b1a13cbb3290ed13802dbb4b990d9c..c8d41a3caf38771368ae21f11d40e312805f84ad 100644
(file)
--- a/
drivers/leds/flash/leds-qcom-flash.c
+++ b/
drivers/leds/flash/leds-qcom-flash.c
@@
-417,6
+417,14
@@
static int qcom_flash_led_brightness_set(struct led_classdev *led_cdev,
bool enable = !!brightness;
int rc;
+ rc = set_flash_strobe(led, SW_STROBE, false);
+ if (rc)
+ return rc;
+
+ rc = set_flash_module_en(led, false);
+ if (rc)
+ return rc;
+
rc = set_flash_current(led, current_ma, TORCH_MODE);
if (rc)
return rc;