summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-tegra/board.h6
-rw-r--r--arch/arm/mach-tegra/common.c17
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index a58e0ba569a9..f0392704fed3 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -74,6 +74,11 @@ enum panel_type {
panel_type_dsi,
};
+enum power_supply_type {
+ power_supply_adapter,
+ power_supply_battery,
+};
+
void tegra_get_board_info(struct board_info *);
void tegra_get_pmu_board_info(struct board_info *bi);
#ifdef CONFIG_TEGRA_CONVSERVATIVE_GOV_ON_EARLYSUPSEND
@@ -88,5 +93,6 @@ void cpufreq_set_conservative_governor_param(int up_th, int down_th);
int get_core_edp(void);
enum panel_type get_panel_type(void);
int tegra_get_modem_id(void);
+enum power_supply_type get_power_supply_type(void);
#endif
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index b9b3e947d595..0b6c6f92fd90 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -93,6 +93,7 @@ static struct board_info pmu_board_info;
static int pmu_core_edp = 1200; /* default 1.2V EDP limit */
static int board_panel_type;
+static enum power_supply_type pow_supply_type;
static int modem_id;
void (*tegra_reset)(char mode, const char *cmd);
@@ -488,6 +489,22 @@ static int __init tegra_board_panel_type(char *options)
}
__setup("panel=", tegra_board_panel_type);
+enum power_supply_type get_power_supply_type(void)
+{
+ return pow_supply_type;
+}
+static int __init tegra_board_power_supply_type(char *options)
+{
+ if (!strcmp(options, "Adapter"))
+ pow_supply_type = power_supply_adapter;
+ else if (!strcmp(options, "Battery"))
+ pow_supply_type = power_supply_battery;
+ else
+ return 0;
+ return 1;
+}
+__setup("power_supply=", tegra_board_power_supply_type);
+
int get_core_edp(void)
{
return pmu_core_edp;