summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-enterprise-power.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-09-04 17:12:53 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:44 -0800
commit72f5dcc7ca238852d418683023adc2b8a04128d5 (patch)
treec2e578e5351a8c99e32361c5d2e621de0783e0f8 /arch/arm/mach-tegra/board-enterprise-power.c
parenta475bfdbce000456947a5358909dfc6767d684b0 (diff)
arm: tegra: enterprise: Enable battery charging based on kernel option
If kernel command line option have the power_supply as battery then enable the battery charging functionality. Reviewed-on: http://git-master/r/50673 (cherry picked from commit 4f36edabc585f3fea28e2f959558ac7e07dd2b5e) Change-Id: I5a12105503f29e4e58991bcf4c020c709a97a7cd Reviewed-on: http://git-master/r/56994 Reviewed-by: Syed Rafiuddin <srafiuddin@nvidia.com> Tested-by: Syed Rafiuddin <srafiuddin@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R9fa09e3c265fabefd14804def31100259bfd9730
Diffstat (limited to 'arch/arm/mach-tegra/board-enterprise-power.c')
-rw-r--r--arch/arm/mach-tegra/board-enterprise-power.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/board-enterprise-power.c b/arch/arm/mach-tegra/board-enterprise-power.c
index 930d904cd8e8..851f4c196b01 100644
--- a/arch/arm/mach-tegra/board-enterprise-power.c
+++ b/arch/arm/mach-tegra/board-enterprise-power.c
@@ -473,7 +473,6 @@ int __init enterprise_regulator_init(void)
{
void __iomem *pmc = IO_ADDRESS(TEGRA_PMC_BASE);
u32 pmc_ctrl;
- struct board_info board_info;
/* configure the power management controller to trigger PMU
* interrupts when low */
@@ -481,11 +480,8 @@ int __init enterprise_regulator_init(void)
pmc_ctrl = readl(pmc + PMC_CTRL);
writel(pmc_ctrl | PMC_CTRL_INTR_LOW, pmc + PMC_CTRL);
- tegra_get_board_info(&board_info);
-
- /* Disable battery charging for board whose sku does not
- have battery support */
- if (!(board_info.sku & SKU_BATTERY_SUPPORT)) {
+ /* Disable battery charging if power adapter is connected. */
+ if (get_power_supply_type() == POWER_SUPPLY_TYPE_MAINS) {
bcharger_pdata.num_consumer_supplies = 0;
bcharger_pdata.consumer_supplies = NULL;
}