summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-11-20 20:26:06 -0200
committerStefano Babic <sbabic@denx.de>2013-11-27 09:39:22 +0100
commit839f4d4e87f40e68de5d57ccff502fe97513d1fa (patch)
tree831e5d26201747b27f9db4222e09e8ca181a1fbd /drivers/power
parentd74b331f2ff083252d53b136f3cec9cb1ca2fc9e (diff)
downloadu-boot-imx-839f4d4e87f40e68de5d57ccff502fe97513d1fa.zip
u-boot-imx-839f4d4e87f40e68de5d57ccff502fe97513d1fa.tar.gz
u-boot-imx-839f4d4e87f40e68de5d57ccff502fe97513d1fa.tar.bz2
power: power_fsl: Pass p->bus in the same way for SPI and I2C cases
There is no need to pass p->bus differently when the PMIC is connected via SPI or via I2C. Handle the both cases in the same way. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/power_fsl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c
index ed778f3..ac0b541 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -36,10 +36,10 @@ int pmic_init(unsigned char bus)
p->name = name;
p->number_of_regs = PMIC_NUM_OF_REGS;
+ p->bus = bus;
#if defined(CONFIG_POWER_SPI)
p->interface = PMIC_SPI;
- p->bus = CONFIG_FSL_PMIC_BUS;
p->hw.spi.cs = CONFIG_FSL_PMIC_CS;
p->hw.spi.clk = CONFIG_FSL_PMIC_CLK;
p->hw.spi.mode = CONFIG_FSL_PMIC_MODE;
@@ -50,7 +50,6 @@ int pmic_init(unsigned char bus)
p->interface = PMIC_I2C;
p->hw.i2c.addr = CONFIG_SYS_FSL_PMIC_I2C_ADDR;
p->hw.i2c.tx_num = FSL_PMIC_I2C_LENGTH;
- p->bus = bus;
#else
#error "You must select CONFIG_POWER_SPI or CONFIG_PMIC_I2C"
#endif