Skip to content

Commit 6055e4c

Browse files
asdfugiljannau
authored andcommitted
gpu: drm: adp: Allow max brightness to be set via device tree
The max brightness between different summit panels may be different so allow the max brightness to be set via device tree. Tested-by: Sasha Finkelstein <fnkl.kernel@gmail.com> Signed-off-by: Nick Chan <towinchenmi@gmail.com>
1 parent 2064b9b commit 6055e4c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/adp/panel-summit.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ static int summit_probe(struct mipi_dsi_device *dsi)
4646

4747
mipi_dsi_set_drvdata(dsi, panel);
4848
panel->dsi = dsi;
49-
props.max_brightness = 255;
49+
50+
int ret = device_property_read_u32(dev, "max-brightness", &props.max_brightness);
51+
52+
if (ret)
53+
props.max_brightness = 255;
5054
props.type = BACKLIGHT_RAW;
5155

5256
panel->bl = devm_backlight_device_register(dev, dev_name(dev),

0 commit comments

Comments
 (0)