Skip to content

Commit 9a77426

Browse files
committed
Lotus: reset the panel pwm mux status when the system shutdown
Signed-off-by: Josh-Tsai <josh_tsai@compal.com>
1 parent d06a031 commit 9a77426

File tree

1 file changed

+11
-0
lines changed
  • zephyr/program/lotus/lotus/src

1 file changed

+11
-0
lines changed

zephyr/program/lotus/lotus/src/gpu.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,17 @@ static void start_smart_access_graphic(void)
194194
}
195195
DECLARE_HOOK(HOOK_CHIPSET_RESUME, start_smart_access_graphic, HOOK_PRIO_DEFAULT);
196196

197+
static void reset_mux_status(void)
198+
{
199+
uint8_t gpu_status = *host_get_memmap(EC_CUSTOMIZED_MEMMAP_GPU_CONTROL);
200+
201+
/* When the system shutdown, the gpu mux needs to switch to iGPU */
202+
gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_edp_mux_pwm_sw), 0);
203+
gpu_status &= 0xFC;
204+
gpu_status &= ~GPU_MUX;
205+
}
206+
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, reset_mux_status, HOOK_PRIO_DEFAULT);
207+
197208
static void f75303_disable_alert_mask(void)
198209
{
199210
if (gpu_present())

0 commit comments

Comments
 (0)