summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-03-20 12:28:31 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-04-29 15:02:00 +0800
commita48ccdc9c10eb135cf47f822c0ccd5e72f590e78 (patch)
treefb157195c3f92967032aa1c0b7f44955b16272ce /drivers
parent2769c66c8a6a8a83abda2738592398a540b90db3 (diff)
downloadu-boot-imx-a48ccdc9c10eb135cf47f822c0ccd5e72f590e78.zip
u-boot-imx-a48ccdc9c10eb135cf47f822c0ccd5e72f590e78.tar.gz
u-boot-imx-a48ccdc9c10eb135cf47f822c0ccd5e72f590e78.tar.bz2
MLK-10774-35 imx:mx7 use power_init_board
Upgrade to upstream way, using power_init_board. Add pfuze300 support. Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/pmic/Makefile1
-rw-r--r--drivers/power/pmic/pmic_pfuze300.c32
2 files changed, 33 insertions, 0 deletions
diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile
index 985cfdb..b6257c9 100644
--- a/drivers/power/pmic/Makefile
+++ b/drivers/power/pmic/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o
obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o
obj-$(CONFIG_POWER_MAX77686) += pmic_max77686.o
obj-$(CONFIG_POWER_PFUZE100) += pmic_pfuze100.o
+obj-$(CONFIG_POWER_PFUZE300) += pmic_pfuze300.o
obj-$(CONFIG_POWER_TPS65090_I2C) += pmic_tps65090.o
obj-$(CONFIG_POWER_TPS65090_EC) += pmic_tps65090_ec.o
obj-$(CONFIG_POWER_TPS65217) += pmic_tps65217.o
diff --git a/drivers/power/pmic/pmic_pfuze300.c b/drivers/power/pmic/pmic_pfuze300.c
new file mode 100644
index 0000000..4304ddd
--- /dev/null
+++ b/drivers/power/pmic/pmic_pfuze300.c
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2015 Freescale Semiconductor, Inc.
+ * Peng Fan <Peng.Fan@freescale.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <errno.h>
+#include <i2c.h>
+#include <power/pmic.h>
+#include <power/pfuze300_pmic.h>
+
+int power_pfuze300_init(unsigned char bus)
+{
+ static const char name[] = "PFUZE300";
+ 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 = PMIC_NUM_OF_REGS;
+ p->hw.i2c.addr = CONFIG_POWER_PFUZE300_I2C_ADDR;
+ p->hw.i2c.tx_num = 1;
+ p->bus = bus;
+
+ return 0;
+}