summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-sunxi/gpio.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi/gpio.h')
-rw-r--r--arch/arm/include/asm/arch-sunxi/gpio.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index ae7cbb7..59d8210 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -203,8 +203,10 @@ enum sunxi_gpio_number {
#define SUNXI_GPIO_PULL_DOWN 2
/* Virtual AXP0 GPIOs */
-#define SUNXI_GPIO_AXP0_VBUS_DETECT 8
-#define SUNXI_GPIO_AXP0_VBUS_ENABLE 9
+#define SUNXI_GPIO_AXP0_PREFIX "AXP0-"
+#define SUNXI_GPIO_AXP0_VBUS_DETECT 4
+#define SUNXI_GPIO_AXP0_VBUS_ENABLE 5
+#define SUNXI_GPIO_AXP0_GPIO_COUNT 6
void sunxi_gpio_set_cfgbank(struct sunxi_gpio *pio, int bank_offset, u32 val);
void sunxi_gpio_set_cfgpin(u32 pin, u32 val);
@@ -216,4 +218,10 @@ int sunxi_name_to_gpio_bank(const char *name);
int sunxi_name_to_gpio(const char *name);
#define name_to_gpio(name) sunxi_name_to_gpio(name)
+#if !defined CONFIG_SPL_BUILD && defined CONFIG_AXP_GPIO
+int axp_gpio_init(void);
+#else
+static inline int axp_gpio_init(void) { return 0; }
+#endif
+
#endif /* _SUNXI_GPIO_H */