diff options
author | Tom Rini | 2012-12-22 05:55:19 -0700 |
---|---|---|
committer | Tom Rini | 2012-12-22 05:55:19 -0700 |
commit | da77a0e593c370c9ed79ea22c1df321d5f4e4bbf (patch) | |
tree | d31ff68d217a80422845c82104098eef744f4cde /drivers/power/power_fsl.c | |
parent | ba6d4b64b33146740a15b3dd5a5f511a2bc8d6f6 (diff) | |
parent | 96764df1b47ddebfb50fadf5af72530b07b5fc89 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'drivers/power/power_fsl.c')
-rw-r--r-- | drivers/power/power_fsl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c index 651f88f850a..a663831589f 100644 --- a/drivers/power/power_fsl.c +++ b/drivers/power/power_fsl.c @@ -27,6 +27,12 @@ #include <fsl_pmic.h> #include <errno.h> +#if defined(CONFIG_PMIC_FSL_MC13892) +#define FSL_PMIC_I2C_LENGTH 3 +#elif defined(CONFIG_PMIC_FSL_MC34704) +#define FSL_PMIC_I2C_LENGTH 1 +#endif + #if defined(CONFIG_POWER_SPI) static u32 pmic_spi_prepare_tx(u32 reg, u32 *val, u32 write) { @@ -59,7 +65,7 @@ int pmic_init(unsigned char bus) #elif defined(CONFIG_POWER_I2C) p->interface = PMIC_I2C; p->hw.i2c.addr = CONFIG_SYS_FSL_PMIC_I2C_ADDR; - p->hw.i2c.tx_num = 3; + p->hw.i2c.tx_num = FSL_PMIC_I2C_LENGTH; p->bus = bus; #else #error "You must select CONFIG_POWER_SPI or CONFIG_PMIC_I2C" |