Skip to content

Commit 1323e37

Browse files
committed
charger: allow home button to wake
On certain devices (e.g. galaxysmtd), the user expects the physical home button to be able to wake the device as well as the power button. Change-Id: If764f36aba3810dfa5233af8baf0a740b04889e0
1 parent d2c2b10 commit 1323e37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

charger/charger.c

+4
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,9 @@ static void process_key(struct charger *charger, int code, int64_t now)
870870
if (key->pending)
871871
kick_animation(charger->batt_anim);
872872
}
873+
} else {
874+
if (key->pending)
875+
kick_animation(charger->batt_anim);
873876
}
874877

875878
key->pending = false;
@@ -878,6 +881,7 @@ static void process_key(struct charger *charger, int code, int64_t now)
878881
static void handle_input_state(struct charger *charger, int64_t now)
879882
{
880883
process_key(charger, KEY_POWER, now);
884+
process_key(charger, KEY_HOME, now);
881885

882886
if (charger->next_key_check != -1 && now > charger->next_key_check)
883887
charger->next_key_check = -1;

0 commit comments

Comments
 (0)