changeset 278:75758d7a9be3

Luna: allow ABB superdeep sleep when the LCD is in suspend mode
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 07 Sep 2021 22:36:16 +0000
parents 0196b6bf633c
children 4dd30fac5933
files src/cs/drivers/drv_app/r2d/lcds/luna/r2d_onoff_i.c src/cs/drivers/drv_app/r2d/r2d_onoff.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/r2d/lcds/luna/r2d_onoff_i.c	Tue Sep 07 22:18:20 2021 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/luna/r2d_onoff_i.c	Tue Sep 07 22:36:16 2021 +0000
@@ -10,12 +10,14 @@
 	LCD_REG_WR(0x0007, 0);			/* display off */
 	rvf_delay(RVF_MS_TO_TICKS(50));
 	LCD_REG_WR(0x0010, 1);			/* suspend mode */
+	ABB_sleep_allowed = 1;
 }
 
 static void lcd_resume(void)
 {
 	if (!r2d_lcd_hw_suspend)
 		return;		/* already on */
+	ABB_sleep_allowed = 0;
 	LCD_REG_WR(0x0010, 0);			/* out of suspend */
 	rvf_delay(RVF_MS_TO_TICKS(50));
 	LCD_REG_WR(0x0007, 0x1017);		/* display on */
--- a/src/cs/drivers/drv_app/r2d/r2d_onoff.c	Tue Sep 07 22:18:20 2021 +0000
+++ b/src/cs/drivers/drv_app/r2d/r2d_onoff.c	Tue Sep 07 22:36:16 2021 +0000
@@ -9,7 +9,7 @@
 #include "r2d/r2d_messages.h"
 #include "r2d/r2d_blrr_api.h"
 
-extern int r2d_lcd_hw_suspend;
+extern int r2d_lcd_hw_suspend, ABB_sleep_allowed;
 
 #ifdef CONFIG_TARGET_LUNA
   #include "r2d/lcds/luna/r2d_onoff_i.c"