diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2015-03-22 18:07:09 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-04-15 16:17:17 +0200 |
commit | f7c7ab636ab2c81d9fb1def7256c94b998c7298f (patch) | |
tree | 3b6126d1c3be0916c745c595f2aa95abbc6707cc /include | |
parent | 991963bce9e3a8f51499785c736ec54e527f3a2b (diff) | |
download | u-boot-imx-f7c7ab636ab2c81d9fb1def7256c94b998c7298f.zip u-boot-imx-f7c7ab636ab2c81d9fb1def7256c94b998c7298f.tar.gz u-boot-imx-f7c7ab636ab2c81d9fb1def7256c94b998c7298f.tar.bz2 |
power: axp221: Virtual VBUS detect and enable GPIOs to replace separate logic
This converts the VBUS detection and enable logic to GPIO instead of separate
axp functions and checks that have to be used aside usual GPIO functions.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/axp221.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/axp221.h b/include/axp221.h index be6058e..0aac04d 100644 --- a/include/axp221.h +++ b/include/axp221.h @@ -62,11 +62,7 @@ /* Page 1 addresses */ #define AXP221_SID 0x20 -/* We support vbus detection */ -#define AXP_VBUS_DETECT - -/* We support drivebus control */ -#define AXP_DRIVEBUS +#define AXP_GPIO int axp221_set_dcdc1(unsigned int mvolt); int axp221_set_dcdc2(unsigned int mvolt); @@ -83,6 +79,8 @@ int axp221_set_aldo3(unsigned int mvolt); int axp221_set_eldo(int eldo_num, unsigned int mvolt); int axp221_init(void); int axp221_get_sid(unsigned int *sid); -int axp_get_vbus(void); -int axp_drivebus_enable(void); -int axp_drivebus_disable(void); + +int axp_gpio_direction_input(unsigned int pin); +int axp_gpio_direction_output(unsigned int pin, unsigned int val); +int axp_gpio_get_value(unsigned int pin); +int axp_gpio_set_value(unsigned int pin, unsigned int val); |