aboutsummaryrefslogtreecommitdiff
path: root/include/axp221.h
diff options
context:
space:
mode:
authorPaul Kocialkowski2015-03-22 18:07:09 +0100
committerHans de Goede2015-04-15 16:17:17 +0200
commitf7c7ab636ab2c81d9fb1def7256c94b998c7298f (patch)
tree3b6126d1c3be0916c745c595f2aa95abbc6707cc /include/axp221.h
parent991963bce9e3a8f51499785c736ec54e527f3a2b (diff)
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/axp221.h')
-rw-r--r--include/axp221.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/axp221.h b/include/axp221.h
index be6058e4395..0aac04dfebd 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);