From 7e82947435593d2e15984a2c1855bf385561c5ca Mon Sep 17 00:00:00 2001
From: Przemyslaw Marczak
Date: Mon, 7 Apr 2014 17:21:13 +0200
Subject: [PATCH] samsung: misc: menu: new option: battery charge level
This change adds new option to lcd menu which allows
check battery state. In case if battery level is greater
than boot level threshold (20%), battery screen is not
displayed. So this menu option is useful in such situations.
Change-Id: I13e7e57516766fea787855b914d2884343cc33a5
Signed-off-by: Przemyslaw Marczak
---
board/samsung/common/misc.c | 3 +++
include/samsung/misc.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 24d773791c..402794d761 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -126,6 +126,7 @@ int check_keys(void)
static char *
mode_name[BOOT_MODE_EXIT + 1][2] = {
{"DEVICE", ""},
+ {"BATTERY", "battery"},
{"THOR", "thor"},
{"UMS", "ums"},
{"DFU", "dfu"},
@@ -137,6 +138,7 @@ mode_name[BOOT_MODE_EXIT + 1][2] = {
static char *
mode_info[BOOT_MODE_EXIT + 1] = {
"info",
+ "charge level",
"downloader",
"mass storage",
"firmware update",
@@ -148,6 +150,7 @@ mode_info[BOOT_MODE_EXIT + 1] = {
static char *
mode_cmd[BOOT_MODE_EXIT + 1] = {
"",
+ "battery state",
"thor 0 mmc 0",
"ums 0 mmc 0",
"dfu 0 mmc 0",
diff --git a/include/samsung/misc.h b/include/samsung/misc.h
index 684332ceb3..1809d1a3d9 100644
--- a/include/samsung/misc.h
+++ b/include/samsung/misc.h
@@ -21,6 +21,7 @@ void check_boot_mode(void);
#ifdef CONFIG_LCD_MENU
enum {
BOOT_MODE_INFO,
+ BOOT_MODE_BATT,
BOOT_MODE_THOR,
BOOT_MODE_UMS,
BOOT_MODE_DFU,
--
2.34.1