# HG changeset patch # User Mychaela Falconia # Date 1447305051 0 # Node ID f297861532cf837d1b72471c813387198219a348 # Parent e1379873c3989c424458bc3d2448a974782bf71e fix for the keypad backlight flicker (LT_Status() for deep sleep) diff -r e1379873c398 -r f297861532cf chipsetsw/drivers/drv_app/buzzer/buzzer.c --- a/chipsetsw/drivers/drv_app/buzzer/buzzer.c Thu Nov 12 02:38:40 2015 +0000 +++ b/chipsetsw/drivers/drv_app/buzzer/buzzer.c Thu Nov 12 05:10:51 2015 +0000 @@ -159,10 +159,27 @@ /* * LT_Status - * + * * Return lighting status for sleep manager - * + * + * FreeCalypso change: the software as delivered by TI is broken + * in this regard: when built for D-Sample (BOARD 41), their BMI + * treats Iota LEDB as "the backlight", which does require the + * 13 MHz clock to be running, but their LT_Status() function + * (called from the L1 binary blob) only checks the older B & C + * kind of backlight status, and always returns "all clear" on + * the D-Sample. + * + * This bug matters for us on Mot C139 and other targets that use + * Iota LEDB for the keypad backlight: when this backlight is on + * and L1 enters deep sleep, the light flickers visibly. + * + * Our solution: we introduce a hacky global variable here which + * LT_Status() will simply return, and we'll hack LLS to set and + * clear it when it turns Iota LEDB on and off. */ +unsigned char iota_ledb_status; + SYS_BOOL LT_Status(void) { #if (BOARD == 7 || BOARD == 8 || BOARD == 9) @@ -172,6 +189,6 @@ return(0); #endif -return(0); +return(iota_ledb_status); } diff -r e1379873c398 -r f297861532cf chipsetsw/services/lls/lls_api.c --- a/chipsetsw/services/lls/lls_api.c Thu Nov 12 02:38:40 2015 +0000 +++ b/chipsetsw/services/lls/lls_api.c Thu Nov 12 05:10:51 2015 +0000 @@ -31,6 +31,9 @@ /** External declaration */ extern T_LLS_ENV_CTRL_BLK* lls_env_ctrl_blk; +/* FreeCalypso hack, see LT_Status() in drivers/drv_app/buzzer/buzzer.c */ +extern unsigned char iota_ledb_status; + /** * @name Functions implementation @@ -62,10 +65,14 @@ if (ret != RV_OK) { - LLS_SEND_TRACE("LLS: Equipment is unknow", RV_TRACE_LEVEL_ERROR); + LLS_SEND_TRACE("LLS: Equipment is unknown", RV_TRACE_LEVEL_ERROR); return ret; } + /* FreeCalypso hack */ + if (equipment_sort == LLS_BACKLIGHT) + iota_ledb_status = 1; + ret = lls_manage_equipment(equipment_index, SWITCH_ON); return ret; @@ -99,12 +106,16 @@ if (ret != RV_OK) { - LLS_SEND_TRACE("LLS: Equipment is unknow", RV_TRACE_LEVEL_ERROR); + LLS_SEND_TRACE("LLS: Equipment is unknown", RV_TRACE_LEVEL_ERROR); return ret; } ret = lls_manage_equipment(equipment_index, SWITCH_OFF); - + + /* FreeCalypso hack */ + if (equipment_sort == LLS_BACKLIGHT) + iota_ledb_status = 0; + return ret; #else