Skip to content

Commit

Permalink
charger: change the order of backlight control and fb blank
Browse files Browse the repository at this point in the history
Backlight is getting disabled after fb blank is done. Change
the order to avoid transients and other issues.

Change-Id: Ie659ca76ab85e22ea2a3bc0da9b025785cb42511
  • Loading branch information
feim authored and hyperb1iss committed Nov 8, 2013
1 parent e2740bf commit ba91d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charger/charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,8 @@ static void update_screen_state(struct charger *charger, int64_t now)
if (batt_anim->cur_cycle == batt_anim->num_cycles) {
reset_animation(batt_anim);
charger->next_screen_transition = -1;
gr_fb_blank(true);
set_backlight(false);
gr_fb_blank(true);

#ifdef ALLOW_SUSPEND_IN_CHARGER
write_file(SYS_POWER_STATE, "mem", strlen("mem"));
Expand Down Expand Up @@ -1290,8 +1290,8 @@ int main(int argc, char **argv)
ev_sync_key_state(set_key_callback, charger);

#ifndef CHARGER_DISABLE_INIT_BLANK
gr_fb_blank(true);
set_backlight(false);
gr_fb_blank(true);
#endif

charger->next_screen_transition = now - 1;
Expand Down

0 comments on commit ba91d0b

Please sign in to comment.