diff mbox series

arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED

Message ID 20220425032824.211975-1-danct12@riseup.net (mailing list archive)
State Accepted
Headers show
Series arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED | expand

Commit Message

Dang Huynh April 25, 2022, 3:28 a.m. UTC
WLED is used for controlling display backlight on this phone.

Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Alexey Minnekhanov April 25, 2022, 1:13 p.m. UTC | #1
25.04.2022 06:28, Dang Huynh wrote:
> WLED is used for controlling display backlight on this phone.
> 

Hi!

Interacting with wled changes brightness indeed, but results in the 
following trace in dmesg:

```
[  499.906317] ------------[ cut here ]------------
[  499.906478] Unbalanced enable for IRQ 39
[  499.910118] WARNING: CPU: 4 PID: 74 at kernel/irq/manage.c:774 
__enable_irq+0x4c/0x80
[  499.914094] Modules linked in:
[  499.921705] CPU: 4 PID: 74 Comm: kworker/4:2 Not tainted 
5.17.0-sdm660-07615-gd33d148796b0-dirty #23
[  499.924800] Hardware name: Xiaomi Redmi Note 7 (DT)
[  499.933988] Workqueue: events wled_ovp_work
[  499.938571] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS 
BTYPE=--)
[  499.942803] pc : __enable_irq+0x4c/0x80
[  499.949687] lr : __enable_irq+0x4c/0x80
[  499.953506] sp : ffff800008a73d70
[  499.957311] x29: ffff800008a73d70 x28: 0000000000000000 x27: 
0000000000000000
[  499.960890] x26: ffffad5f9fa4efc0 x25: ffff60283e4baf05 x24: 
ffff602781f65130
[  499.968010] x23: ffff60283e4baf00 x22: ffff60283e4b7180 x21: 
0000000000000000
[  499.975128] x20: 0000000000000027 x19: ffff602781136600 x18: 
ffffffffffffffff
[  499.982243] x17: 0000000000000000 x16: 0000000000000000 x15: 
0000000000000001
[  499.989363] x14: 0000000000000000 x13: ffffad5f9f92fea8 x12: 
0000000000000357
[  499.996479] x11: 000000000000011d x10: ffffad5f9f987ea8 x9 : 
ffffad5f9f92fea8
[  500.003597] x8 : 00000000ffffefff x7 : ffffad5f9f987ea8 x6 : 
0000000000000000
[  500.010714] x5 : 000000000000bff4 x4 : 0000000000000000 x3 : 
0000000000000000
[  500.017832] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 
ffff6027820c8000
[  500.024954] Call trace:
[  500.047230]  __enable_irq+0x4c/0x80
[  500.062686]  enable_irq+0x48/0xa0
[  500.078190]  wled_ovp_work+0x14/0x20
[  500.093761]  process_one_work+0x1d0/0x320
[  500.105080]  worker_thread+0x14c/0x444
[  500.120700]  kthread+0x10c/0x110
[  500.136347]  ret_from_fork+0x10/0x20
[  500.151981] ---[ end trace 0000000000000000 ]---
```
Bjorn Andersson June 27, 2022, 8:02 p.m. UTC | #2
On Mon, 25 Apr 2022 10:28:24 +0700, Dang Huynh wrote:
> WLED is used for controlling display backlight on this phone.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: sdm660-xiaomi-lavender: Configure WLED
      commit: b74f7b8f174f0ce2261cc05050dcbfed3314ab1e

Best regards,
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index dcbaacf18f66..7a30008ee0dd 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -363,6 +363,14 @@  vreg_l19a_3p3: l19 {
 	};
 };
 
+&pm660l_wled {
+	status = "okay";
+
+	qcom,switching-freq = <800>;
+	qcom,current-limit-microamp = <20000>;
+	qcom,num-strings = <2>;
+};
+
 &sdhc_1 {
 	status = "okay";
 	supports-cqe;