Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

David Heidelberg and committed by
Neil Armstrong
5f0cc92f be85d412

+11 -6
+11 -6
drivers/gpu/drm/panel/panel-lg-sw43408.c
··· 119 119 return ctx.accum_err; 120 120 } 121 121 122 + static void sw43408_reset(struct sw43408_panel *ctx) 123 + { 124 + gpiod_set_value(ctx->reset_gpio, 0); 125 + usleep_range(9000, 10000); 126 + gpiod_set_value(ctx->reset_gpio, 1); 127 + usleep_range(1000, 2000); 128 + gpiod_set_value(ctx->reset_gpio, 0); 129 + usleep_range(9000, 10000); 130 + } 131 + 122 132 static int sw43408_prepare(struct drm_panel *panel) 123 133 { 124 134 struct sw43408_panel *ctx = to_panel_info(panel); ··· 140 130 141 131 usleep_range(5000, 6000); 142 132 143 - gpiod_set_value(ctx->reset_gpio, 0); 144 - usleep_range(9000, 10000); 145 - gpiod_set_value(ctx->reset_gpio, 1); 146 - usleep_range(1000, 2000); 147 - gpiod_set_value(ctx->reset_gpio, 0); 148 - usleep_range(9000, 10000); 133 + sw43408_reset(ctx); 149 134 150 135 ret = sw43408_program(panel); 151 136 if (ret)