diff options
author | Tom Rini <trini@ti.com> | 2014-12-11 20:47:34 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-12-11 20:47:34 -0500 |
commit | a5a58826110eb3da2956c6b3213bd750e166d75c (patch) | |
tree | 50d21157a7118c6b2b13e7763452332f2d9b51fd /board/avionic-design/common/tamonten-ng.c | |
parent | fc9b0b80435cda721fbdbe507c9e4f388b0ea62b (diff) | |
parent | b0e6ef46405353270595ffa35c21f4334c541189 (diff) | |
download | u-boot-imx-a5a58826110eb3da2956c6b3213bd750e166d75c.zip u-boot-imx-a5a58826110eb3da2956c6b3213bd750e166d75c.tar.gz u-boot-imx-a5a58826110eb3da2956c6b3213bd750e166d75c.tar.bz2 |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'board/avionic-design/common/tamonten-ng.c')
-rw-r--r-- | board/avionic-design/common/tamonten-ng.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c index 5870b95..86a0844 100644 --- a/board/avionic-design/common/tamonten-ng.c +++ b/board/avionic-design/common/tamonten-ng.c @@ -6,6 +6,7 @@ */ #include <common.h> +#include <dm.h> #include <asm/arch/pinmux.h> #include <asm/arch/gp_padctrl.h> #include <asm/arch/gpio.h> @@ -51,8 +52,15 @@ void gpio_early_init(void) void pmu_write(uchar reg, uchar data) { - i2c_set_bus_num(4); /* PMU is on bus 4 */ - i2c_write(PMU_I2C_ADDRESS, reg, 1, &data, 1); + struct udevice *dev; + int ret; + + ret = i2c_get_chip_for_busnum(4, PMU_I2C_ADDRESS, &dev); + if (ret) { + debug("%s: Cannot find PMIC I2C chip\n", __func__); + return; + } + i2c_write(dev, reg, &data, 1); } /* |