diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-07-28 12:26:21 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2014-07-28 12:26:21 +0200 |
commit | b1cdd8baa14f518288ceddb391d6587c1ecb3174 (patch) | |
tree | c3d00b3193b2ee86b9679baf1933b10a7d07a13d /drivers/power | |
parent | 48b3ed217f58487c583d59575d7dfe2aafbb738d (diff) | |
parent | 434f2cfcad9f70231ad5a096325ba72ef0d2a2cc (diff) | |
download | u-boot-imx-b1cdd8baa14f518288ceddb391d6587c1ecb3174.zip u-boot-imx-b1cdd8baa14f518288ceddb391d6587c1ecb3174.tar.gz u-boot-imx-b1cdd8baa14f518288ceddb391d6587c1ecb3174.tar.bz2 |
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/pmic/pmic_tps65218.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/power/pmic/pmic_tps65218.c b/drivers/power/pmic/pmic_tps65218.c index 0952456..dbc7a73 100644 --- a/drivers/power/pmic/pmic_tps65218.c +++ b/drivers/power/pmic/pmic_tps65218.c @@ -7,6 +7,8 @@ #include <common.h> #include <i2c.h> +#include <asm/errno.h> +#include <power/pmic.h> #include <power/tps65218.h> /** @@ -95,3 +97,23 @@ int tps65218_voltage_update(uchar dc_cntrl_reg, uchar volt_sel) return 0; } + +int power_tps65218_init(unsigned char bus) +{ + static const char name[] = "TPS65218_PMIC"; + struct pmic *p = pmic_alloc(); + + if (!p) { + printf("%s: POWER allocation error!\n", __func__); + return -ENOMEM; + } + + p->name = name; + p->interface = PMIC_I2C; + p->number_of_regs = TPS65218_PMIC_NUM_OF_REGS; + p->hw.i2c.addr = TPS65218_CHIP_PM; + p->hw.i2c.tx_num = 1; + p->bus = bus; + + return 0; +} |