summaryrefslogtreecommitdiff
path: root/drivers/misc/pmic_i2c.c
diff options
context:
space:
mode:
authorƁukasz Majewski <l.majewski@samsung.com>2012-11-13 03:21:55 (GMT)
committerAnatolij Gustschin <agust@denx.de>2012-11-14 10:21:09 (GMT)
commitc7336815078ff3745e3130aeff35991e3e98e61e (patch)
tree8ace1a85705cbd5b6484a45fefd093161a7a5b05 /drivers/misc/pmic_i2c.c
parent452329f1d57fe7cbc54e65617e84d5bb1f93f631 (diff)
downloadu-boot-c7336815078ff3745e3130aeff35991e3e98e61e.tar.xz
pmic: Extend PMIC framework to support multiple instances of PMIC devices
The PMIC framework has been extended to support multiple instances of the variety of devices responsible for power management. This change allows supporting of e.g. fuel gauge, charger, MUIC (Micro USB Interface Circuit). Power related includes have been moved to ./include/power directory. This is a first of a series of patches - in the future "pmic" will be replaced with "power". Two important issues: 1. The PMIC needs to be initialized just after malloc is configured 2. It uses list to hold information about available PMIC devices Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/misc/pmic_i2c.c')
-rw-r--r--drivers/misc/pmic_i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/pmic_i2c.c b/drivers/misc/pmic_i2c.c
index 1064bfe..3e5a784 100644
--- a/drivers/misc/pmic_i2c.c
+++ b/drivers/misc/pmic_i2c.c
@@ -28,7 +28,7 @@
#include <common.h>
#include <linux/types.h>
-#include <pmic.h>
+#include <power/pmic.h>
#include <i2c.h>
#include <compiler.h>
@@ -36,7 +36,7 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
{
unsigned char buf[4] = { 0 };
- if (check_reg(reg))
+ if (check_reg(p, reg))
return -1;
switch (pmic_i2c_tx_num) {
@@ -79,7 +79,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
unsigned char buf[4] = { 0 };
u32 ret_val = 0;
- if (check_reg(reg))
+ if (check_reg(p, reg))
return -1;
if (i2c_read(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num))