ENGR00121798 MX53 RTC: Disable coin cell charging by pmic

Cleared COINCHEN bit in Power Control 0 register of MC13892.
Fixed spelling of #defines.

Signed-off-by: Anish Trivedi <anish@freescale.com>
This commit is contained in:
Anish Trivedi
2010-03-19 10:54:04 -05:00
committed by Matt Sealey
parent 0ff87eac93
commit ea93ddcd13
3 changed files with 13 additions and 13 deletions

View File

@@ -39,8 +39,8 @@
#define STANDBYSECINV_WID 1
/* Coin cell charger enable */
#define CIONCHEN_LSH 23
#define CIONCHEN_WID 1
#define COINCHEN_LSH 23
#define COINCHEN_WID 1
/* Coin cell charger voltage setting */
#define VCOIN_LSH 20
#define VCOIN_WID 3
@@ -309,8 +309,8 @@ static int mc13892_regulator_init(struct mc13892 *mc13892)
pmic_write_reg(REG_POWER_CTL2, value, register_mask);
/* Enable coin cell charger */
value = BITFVAL(CIONCHEN, 1) | BITFVAL(VCOIN, VCOIN_3_0V);
register_mask = BITFMASK(CIONCHEN) | BITFMASK(VCOIN);
value = BITFVAL(COINCHEN, 1) | BITFVAL(VCOIN, VCOIN_3_0V);
register_mask = BITFMASK(COINCHEN) | BITFMASK(VCOIN);
pmic_write_reg(REG_POWER_CTL0, value, register_mask);
mc13892_register_regulator(mc13892, MC13892_SW1, &sw1_init);

View File

@@ -36,8 +36,8 @@
#define uV_to_V(uV) (uV_to_mV(uV) / 1000)
/* Coin cell charger enable */
#define CIONCHEN_LSH 23
#define CIONCHEN_WID 1
#define COINCHEN_LSH 23
#define COINCHEN_WID 1
/* Coin cell charger voltage setting */
#define VCOIN_LSH 20
#define VCOIN_WID 3
@@ -363,8 +363,8 @@ static int mc13892_regulator_init(struct mc13892 *mc13892)
}
/* Enable coin cell charger */
value = BITFVAL(CIONCHEN, 1) | BITFVAL(VCOIN, VCOIN_3_0V);
register_mask = BITFMASK(CIONCHEN) | BITFMASK(VCOIN);
value = BITFVAL(COINCHEN, 1) | BITFVAL(VCOIN, VCOIN_3_0V);
register_mask = BITFMASK(COINCHEN) | BITFMASK(VCOIN);
pmic_write_reg(REG_POWER_CTL0, value, register_mask);
#if defined(CONFIG_RTC_DRV_MXC_V2) || defined(CONFIG_RTC_DRV_MXC_V2_MODULE)

View File

@@ -39,8 +39,8 @@
#define STANDBYSECINV_WID 1
/* Coin cell charger enable */
#define CIONCHEN_LSH 23
#define CIONCHEN_WID 1
#define COINCHEN_LSH 23
#define COINCHEN_WID 1
/* Coin cell charger voltage setting */
#define VCOIN_LSH 20
#define VCOIN_WID 3
@@ -307,9 +307,9 @@ static int mc13892_regulator_init(struct mc13892 *mc13892)
register_mask = BITFMASK(STANDBYSECINV);
pmic_write_reg(REG_POWER_CTL2, value, register_mask);
/* Enable coin cell charger */
value = BITFVAL(CIONCHEN, 1) | BITFVAL(VCOIN, VCOIN_3_0V);
register_mask = BITFMASK(CIONCHEN) | BITFMASK(VCOIN);
/* Disable coin cell charger since the cell is not rechargeable */
value = BITFVAL(COINCHEN, 0) | BITFVAL(VCOIN, VCOIN_3_0V);
register_mask = BITFMASK(COINCHEN) | BITFMASK(VCOIN);
pmic_write_reg(REG_POWER_CTL0, value, register_mask);
mc13892_register_regulator(mc13892, MC13892_SW1, &sw1_init);