Skip to content

Commit

Permalink
ARM: tegra: cardhu: Add battery regulator
Browse files Browse the repository at this point in the history
Add battery regulator which is always-on. The rail which is
powered from battery can be added on this rail as consumer.

bug 1218527

Change-Id: I2394e1894649cd4fa736646981374681f603c832
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/#change,193052
(cherry picked from commit 4b9cabe87060bf5f252206aba5b62ea1ccb2ff83)
Reviewed-on: http://git-master/r/193777
Tested-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
  • Loading branch information
ldewangan authored and Matthew Pedro committed Feb 1, 2013
1 parent d99083e commit 1ff6b94
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions arch/arm/mach-tegra/board-cardhu-power.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,11 @@ static struct regulator_consumer_supply fixed_reg_en_vddio_vid_oc_supply[] = {
REGULATOR_SUPPLY("vdd_hdmi_con", NULL),
};

/* Battery powered rail*/
static struct regulator_consumer_supply fixed_reg_en_battery_supply[] = {
REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.1"),
};

/* Macro for defining fixed regulator sub device data */
#define FIXED_SUPPLY(_name) "fixed_reg_"#_name
#define FIXED_REG_OD(_id, _var, _name, _in_supply, _always_on, \
Expand Down Expand Up @@ -828,6 +833,8 @@ FIXED_REG_OD(16, en_usb3_vbus_oc_a03, en_usb3_vbus_oc, FIXED_SUPPLY(en_5v0), 0
/* E1198/E1291 specific */
FIXED_REG_OD(17, en_vddio_vid_oc, en_vddio_vid_oc, FIXED_SUPPLY(en_5v0), 0, 0, TEGRA_GPIO_PT0, true, 0, 5000, true);

/* Always ON */
FIXED_REG(22, en_battery, en_battery, NULL, 1, 1, -1, true, 1, 5000);
/*
* Creating the fixed/gpio-switch regulator device tables for different boards
*/
Expand All @@ -846,7 +853,8 @@ FIXED_REG_OD(17, en_vddio_vid_oc, en_vddio_vid_oc, FIXED_SUPPLY(en_5v0), 0,
ADD_FIXED_REG(en_3v3_emmc), \
ADD_FIXED_REG(en_vdd_sdmmc1), \
ADD_FIXED_REG(en_3v3_pex_hvdd), \
ADD_FIXED_REG(en_1v8_cam),
ADD_FIXED_REG(en_1v8_cam), \
ADD_FIXED_REG(en_battery),

#define COMMON_FIXED_REG_E1291_A04 \
ADD_FIXED_REG(en_5v_cp), \
Expand All @@ -861,7 +869,8 @@ FIXED_REG_OD(17, en_vddio_vid_oc, en_vddio_vid_oc, FIXED_SUPPLY(en_5v0), 0,
ADD_FIXED_REG(en_3v3_emmc), \
ADD_FIXED_REG(en_vdd_sdmmc1), \
ADD_FIXED_REG(en_3v3_pex_hvdd), \
ADD_FIXED_REG(en_1v8_cam),
ADD_FIXED_REG(en_1v8_cam), \
ADD_FIXED_REG(en_battery),

#define PM269_FIXED_REG \
ADD_FIXED_REG(en_5v_cp), \
Expand Down

0 comments on commit 1ff6b94

Please sign in to comment.