diff options
author | Piotr Wilczek <p.wilczek@samsung.com> | 2013-06-25 09:59:47 +0200 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2013-08-30 12:24:54 +0900 |
commit | 812d7576cdbecc12d7eec7b533333d3a4a06234b (patch) | |
tree | a9bd6c618267e2d6ff64abe328e0755f84c78714 /include/power | |
parent | cc2b1012cbdb0422fc96d6e6c813baed0722f373 (diff) | |
download | u-boot-imx-812d7576cdbecc12d7eec7b533333d3a4a06234b.zip u-boot-imx-812d7576cdbecc12d7eec7b533333d3a4a06234b.tar.gz u-boot-imx-812d7576cdbecc12d7eec7b533333d3a4a06234b.tar.bz2 |
drivers:power:max77686: add function to set voltage and mode
This patch add new functions to pmic max77686 to set voltage and mode.
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'include/power')
-rw-r--r-- | include/power/max77686_pmic.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h index 91b7ba7..c98db1b 100644 --- a/include/power/max77686_pmic.h +++ b/include/power/max77686_pmic.h @@ -139,6 +139,32 @@ enum { EN_LDO = (0x3 << 6), }; +enum { + OPMODE_OFF = 0, + OPMODE_STANDBY, + OPMODE_LPM, + OPMODE_ON, +}; + +int max77686_set_ldo_voltage(struct pmic *p, int ldo, ulong uV); +int max77686_set_ldo_mode(struct pmic *p, int ldo, char opmode); +int max77686_set_buck_mode(struct pmic *p, int buck, char opmode); + +#define MAX77686_LDO_VOLT_MAX_HEX 0x3f +#define MAX77686_LDO_VOLT_MASK 0x3f +#define MAX77686_LDO_MODE_MASK 0xc0 +#define MAX77686_LDO_MODE_OFF (0x00 << 0x06) +#define MAX77686_LDO_MODE_STANDBY (0x01 << 0x06) +#define MAX77686_LDO_MODE_LPM (0x02 << 0x06) +#define MAX77686_LDO_MODE_ON (0x03 << 0x06) +#define MAX77686_BUCK_MODE_MASK 0x03 +#define MAX77686_BUCK_MODE_SHIFT_1 0x00 +#define MAX77686_BUCK_MODE_SHIFT_2 0x04 +#define MAX77686_BUCK_MODE_OFF 0x00 +#define MAX77686_BUCK_MODE_STANDBY 0x01 +#define MAX77686_BUCK_MODE_LPM 0x02 +#define MAX77686_BUCK_MODE_ON 0x03 + /* Buck1 1 volt value */ #define MAX77686_BUCK1OUT_1V 0x5 /* Buck1 1.05 volt value */ |