# \[PATCHv10\]\[ 2/7\] video: imxfb: Also add pwmr for the device tree.

- Subsystems: FRAMEBUFFER LAYER, OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, THE REST
- Maintainers: Helge Deller, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds
- Status: REVIEWED · 2 reviews, 0 by maintainers (Jean-Christophe PLAGNIOL-VILLARD Grant Likely)
- Reviewed.
- 2 review trailers.
- List: linux-fbdev
- 1 message, 1 author
- Page: https://ratatoskr.run/linux-fbdev/2013/11/8080035/t

## \[PATCHv10\]\[ 2/7\] video: imxfb: Also add pwmr for the device tree.

- From: Denis Carikli \<hidden\>
- Date: 2013-11-05 10:38:33 
- Message: https://ratatoskr.run/linux-fbdev/2013/11/8080035.md

```text
pwmr has to be set to get the imxfb backlight work,
though pwmr was only configurable trough the platform data.

Cc: Rob Herring <redacted>
Cc: Pawel Moll <redacted>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Stephen Warren <redacted>
Cc: Ian Campbell <redacted>
Cc: <redacted>
Cc: Jean-Christophe Plagniol-Villard <redacted>
Cc: Tomi Valkeinen <redacted>
Cc: <redacted>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: <redacted>
Cc: Eric BÃ©nard <redacted>
Signed-off-by: Denis Carikli <redacted>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Acked-by: Grant Likely <redacted>
---
 .../devicetree/bindings/video/fsl,imx-fb.txt       |    3 +++
 drivers/video/imxfb.c                              |    2 ++
 2 files changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt
index 46da08d..ac457ae 100644
--- a/Documentation/devicetree/bindings/video/fsl,imx-fb.txt
+++ b/Documentation/devicetree/bindings/video/fsl,imx-fb.txt
@@ -17,6 +17,9 @@ Required nodes:
 Optional properties:
 - fsl,dmacr: DMA Control Register value. This is optional. By default, the
 	register is not modified as recommended by the datasheet.
+- fsl,pwmr:  LCDC PWM Contrast Control Register value. That property is
+	optional, but defining it is necessary to get the backlight working. If that
+	property is ommited, the register is zeroed.
 - fsl,lscr1: LCDC Sharp Configuration Register value.
 
 Example:
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index a2fe8bd..d2447d2 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -835,6 +835,8 @@ static int imxfb_init_fbinfo(struct platform_device *pdev)
 
 		of_property_read_u32(np, "fsl,dmacr", &fbi->dmacr);
 
+		of_property_read_u32(np, "fsl,pwmr", &fbi->pwmr);
+
 		/* These two function pointers could be used by some specific
 		 * platforms. */
 		fbi->lcd_power = NULL;
-- 
1.7.9.5

```
