Skip to content

Commit 10dc62d

Browse files
committed
ARM: dts: droid4: Configure LED backlight for lm3532
With the LED backlight changes merged, we still need the dts configured to have backlight working for droid4. Based on an earlier patch from Pavel Machek <[email protected]>, let's configure the backlight but update the value range to be more usable. We have a range of 256 register values split into 8 steps, so we can generate the brightness levels backwards with: $ for i in 0 1 2 3 4 5 6 7; do echo "255 - ${i} * (256 / 8)" | bc; done To avoid more confusion why the LCD backlight is still not on, let's also enable LED backlight as a loadable module for omap2plus_defconfig. Cc: Merlijn Wajer <[email protected]> Cc: Pavel Machek <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent ae232e4 commit 10dc62d

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

arch/arm/boot/dts/motorola-mapphone-common.dtsi

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@
182182
pwm-names = "enable", "direction";
183183
direction-duty-cycle-ns = <10000000>;
184184
};
185+
186+
backlight: backlight {
187+
compatible = "led-backlight";
188+
189+
leds = <&backlight_led>;
190+
brightness-levels = <31 63 95 127 159 191 223 255>;
191+
default-brightness-level = <6>;
192+
};
185193
};
186194

187195
&dss {
@@ -205,6 +213,8 @@
205213
vddi-supply = <&lcd_regulator>;
206214
reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* gpio101 */
207215

216+
backlight = <&backlight>;
217+
208218
width-mm = <50>;
209219
height-mm = <89>;
210220

@@ -393,12 +403,11 @@
393403
ramp-up-us = <1024>;
394404
ramp-down-us = <8193>;
395405

396-
led@0 {
406+
backlight_led: led@0 {
397407
reg = <0>;
398408
led-sources = <2>;
399409
ti,led-mode = <0>;
400410
label = ":backlight";
401-
linux,default-trigger = "backlight";
402411
};
403412

404413
led@1 {

arch/arm/configs/omap2plus_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ CONFIG_BACKLIGHT_GENERIC=m
375375
CONFIG_BACKLIGHT_PWM=m
376376
CONFIG_BACKLIGHT_PANDORA=m
377377
CONFIG_BACKLIGHT_GPIO=m
378+
CONFIG_BACKLIGHT_LED=m
378379
CONFIG_FRAMEBUFFER_CONSOLE=y
379380
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
380381
CONFIG_LOGO=y

0 commit comments

Comments
 (0)