diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-08-26 14:33:42 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:48:39 -0800 |
commit | c061cd28f213261932977ae051a7cfe300776750 (patch) | |
tree | b1a07c16e142dc7fe46c25d19586255ccdb660eb /arch/arm/mach-tegra/board-enterprise-power.c | |
parent | 2a980cf42de84889b490c590992a0863d713d633 (diff) |
arm: tegra: entrprise: Enable battery charging for special SKU
Enable battery charging with special SKU.
The board ID have the sku field and bit 0 of the sku
should be 1 for enabling battery charging.
bug 868483
Original-Change-Id: I028bcbfbc042184a7feecb66bfbf35d6c70cd355
Reviewed-on: http://git-master/r/49416
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Rebase-Id: Rbe63dbafc5fb6c2a29fb4c12bb3496a6e9d68d87
Diffstat (limited to 'arch/arm/mach-tegra/board-enterprise-power.c')
-rw-r--r-- | arch/arm/mach-tegra/board-enterprise-power.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-enterprise-power.c b/arch/arm/mach-tegra/board-enterprise-power.c index 9c4dfa8d9e2a..b36bcce6f4e1 100644 --- a/arch/arm/mach-tegra/board-enterprise-power.c +++ b/arch/arm/mach-tegra/board-enterprise-power.c @@ -459,6 +459,7 @@ 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 */ @@ -466,6 +467,15 @@ 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)) { + bcharger_pdata.num_consumer_supplies = 0; + bcharger_pdata.consumer_supplies = NULL; + } + i2c_register_board_info(4, enterprise_regulators, 1); enterprise_gpio_switch_regulator_init(); pm_power_off = enterprise_power_off; |