mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
drm/panel: sw43408: Separate reset sequence into own function
Splitting reset() from prepare() follows clean coding practices and lets us potentially make reset optional in the future for flicker-less takeover from a bootloader or framebuffer driver where the panel is already configured. Signed-off-by: David Heidelberg <david@ixit.cz> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/20251214-pixel-3-v7-4-b1c0cf6f224d@ixit.cz
This commit is contained in:
parent
be85d4124d
commit
5f0cc92fa0
|
|
@ -119,6 +119,16 @@ static int sw43408_program(struct drm_panel *panel)
|
|||
return ctx.accum_err;
|
||||
}
|
||||
|
||||
static void sw43408_reset(struct sw43408_panel *ctx)
|
||||
{
|
||||
gpiod_set_value(ctx->reset_gpio, 0);
|
||||
usleep_range(9000, 10000);
|
||||
gpiod_set_value(ctx->reset_gpio, 1);
|
||||
usleep_range(1000, 2000);
|
||||
gpiod_set_value(ctx->reset_gpio, 0);
|
||||
usleep_range(9000, 10000);
|
||||
}
|
||||
|
||||
static int sw43408_prepare(struct drm_panel *panel)
|
||||
{
|
||||
struct sw43408_panel *ctx = to_panel_info(panel);
|
||||
|
|
@ -130,12 +140,7 @@ static int sw43408_prepare(struct drm_panel *panel)
|
|||
|
||||
usleep_range(5000, 6000);
|
||||
|
||||
gpiod_set_value(ctx->reset_gpio, 0);
|
||||
usleep_range(9000, 10000);
|
||||
gpiod_set_value(ctx->reset_gpio, 1);
|
||||
usleep_range(1000, 2000);
|
||||
gpiod_set_value(ctx->reset_gpio, 0);
|
||||
usleep_range(9000, 10000);
|
||||
sw43408_reset(ctx);
|
||||
|
||||
ret = sw43408_program(panel);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user