Skip to content

Commit

Permalink
gpu: drm: adp: Allow max brightness to be set via device tree
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Nick Chan <[email protected]>
  • Loading branch information
asdfugil authored and jannau committed Oct 3, 2024
1 parent 2064b9b commit 6055e4c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/adp/panel-summit.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ static int summit_probe(struct mipi_dsi_device *dsi)

mipi_dsi_set_drvdata(dsi, panel);
panel->dsi = dsi;
props.max_brightness = 255;

int ret = device_property_read_u32(dev, "max-brightness", &props.max_brightness);

if (ret)
props.max_brightness = 255;
props.type = BACKLIGHT_RAW;

panel->bl = devm_backlight_device_register(dev, dev_name(dev),
Expand Down

0 comments on commit 6055e4c

Please sign in to comment.