summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/common.c')
-rw-r--r--arch/arm/mach-tegra/common.c17
1 files changed, 17 insertions, 0 deletions
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;