summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2015-03-22 18:07:09 +0100
committerHans de Goede <hdegoede@redhat.com>2015-04-15 16:17:17 +0200
commitf7c7ab636ab2c81d9fb1def7256c94b998c7298f (patch)
tree3b6126d1c3be0916c745c595f2aa95abbc6707cc /arch
parent991963bce9e3a8f51499785c736ec54e527f3a2b (diff)
downloadblackbird-obmc-uboot-f7c7ab636ab2c81d9fb1def7256c94b998c7298f.tar.gz
blackbird-obmc-uboot-f7c7ab636ab2c81d9fb1def7256c94b998c7298f.zip
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 'arch')
-rw-r--r--arch/arm/include/asm/arch-sunxi/gpio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index a66e45caff..3a4b8c3165 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -201,6 +201,10 @@ enum sunxi_gpio_number {
#define SUNXI_GPIO_PULL_UP 1
#define SUNXI_GPIO_PULL_DOWN 2
+/* Virtual AXP0 GPIOs */
+#define SUNXI_GPIO_AXP0_VBUS_DETECT 8
+#define SUNXI_GPIO_AXP0_VBUS_ENABLE 9
+
void sunxi_gpio_set_cfgbank(struct sunxi_gpio *pio, int bank_offset, u32 val);
void sunxi_gpio_set_cfgpin(u32 pin, u32 val);
int sunxi_gpio_get_cfgbank(struct sunxi_gpio *pio, int bank_offset);
OpenPOWER on IntegriCloud