diff options
author | Ćukasz Majewski <l.majewski@samsung.com> | 2012-11-13 03:21:55 +0000 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2012-11-14 11:21:09 +0100 |
commit | c7336815078ff3745e3130aeff35991e3e98e61e (patch) | |
tree | 8ace1a85705cbd5b6484a45fefd093161a7a5b05 /drivers/misc/pmic_spi.c | |
parent | 452329f1d57fe7cbc54e65617e84d5bb1f93f631 (diff) |
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_spi.c')
-rw-r--r-- | drivers/misc/pmic_spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/pmic_spi.c b/drivers/misc/pmic_spi.c index 5a0dd22e29..27488ea5d9 100644 --- a/drivers/misc/pmic_spi.c +++ b/drivers/misc/pmic_spi.c @@ -28,7 +28,7 @@ #include <common.h> #include <linux/types.h> -#include <pmic.h> +#include <power/pmic.h> #include <spi.h> static struct spi_slave *slave; @@ -59,7 +59,7 @@ static u32 pmic_reg(struct pmic *p, u32 reg, u32 *val, u32 write) return -1; } - if (check_reg(reg)) + if (check_reg(p, reg)) return -1; if (spi_claim_bus(slave)) |