Commit 7f75eb22 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/panel: panel-samsung-s6e3ha2: Use backlight power constants

Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Cc: Jessica Zhang <quic_jesszhan@quicinc.com>
Reviewed-by: default avatarJessica Zhang <quic_jesszhan@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240731122311.1143153-7-tzimmermann@suse.de
parent 21d63768
...@@ -458,7 +458,7 @@ static int s6e3ha2_set_brightness(struct backlight_device *bl_dev) ...@@ -458,7 +458,7 @@ static int s6e3ha2_set_brightness(struct backlight_device *bl_dev)
return -EINVAL; return -EINVAL;
} }
if (bl_dev->props.power > FB_BLANK_NORMAL) if (bl_dev->props.power > BACKLIGHT_POWER_REDUCED)
return -EPERM; return -EPERM;
s6e3ha2_call_write_func(ret, s6e3ha2_test_key_on_f0(ctx)); s6e3ha2_call_write_func(ret, s6e3ha2_test_key_on_f0(ctx));
...@@ -508,7 +508,7 @@ static int s6e3ha2_disable(struct drm_panel *panel) ...@@ -508,7 +508,7 @@ static int s6e3ha2_disable(struct drm_panel *panel)
s6e3ha2_call_write_func(ret, mipi_dsi_dcs_set_display_off(dsi)); s6e3ha2_call_write_func(ret, mipi_dsi_dcs_set_display_off(dsi));
msleep(40); msleep(40);
ctx->bl_dev->props.power = FB_BLANK_NORMAL; ctx->bl_dev->props.power = BACKLIGHT_POWER_REDUCED;
return 0; return 0;
} }
...@@ -554,7 +554,7 @@ static int s6e3ha2_prepare(struct drm_panel *panel) ...@@ -554,7 +554,7 @@ static int s6e3ha2_prepare(struct drm_panel *panel)
if (ret < 0) if (ret < 0)
goto err; goto err;
ctx->bl_dev->props.power = FB_BLANK_NORMAL; ctx->bl_dev->props.power = BACKLIGHT_POWER_REDUCED;
return 0; return 0;
...@@ -601,7 +601,7 @@ static int s6e3ha2_enable(struct drm_panel *panel) ...@@ -601,7 +601,7 @@ static int s6e3ha2_enable(struct drm_panel *panel)
s6e3ha2_call_write_func(ret, s6e3ha2_test_key_off_f0(ctx)); s6e3ha2_call_write_func(ret, s6e3ha2_test_key_off_f0(ctx));
s6e3ha2_call_write_func(ret, mipi_dsi_dcs_set_display_on(dsi)); s6e3ha2_call_write_func(ret, mipi_dsi_dcs_set_display_on(dsi));
ctx->bl_dev->props.power = FB_BLANK_UNBLANK; ctx->bl_dev->props.power = BACKLIGHT_POWER_ON;
return 0; return 0;
} }
...@@ -729,7 +729,7 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi) ...@@ -729,7 +729,7 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi)
ctx->bl_dev->props.max_brightness = S6E3HA2_MAX_BRIGHTNESS; ctx->bl_dev->props.max_brightness = S6E3HA2_MAX_BRIGHTNESS;
ctx->bl_dev->props.brightness = S6E3HA2_DEFAULT_BRIGHTNESS; ctx->bl_dev->props.brightness = S6E3HA2_DEFAULT_BRIGHTNESS;
ctx->bl_dev->props.power = FB_BLANK_POWERDOWN; ctx->bl_dev->props.power = BACKLIGHT_POWER_OFF;
drm_panel_init(&ctx->panel, dev, &s6e3ha2_drm_funcs, drm_panel_init(&ctx->panel, dev, &s6e3ha2_drm_funcs,
DRM_MODE_CONNECTOR_DSI); DRM_MODE_CONNECTOR_DSI);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment