diff options
Diffstat (limited to 'include/axp221.h')
-rw-r--r-- | include/axp221.h | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/include/axp221.h b/include/axp221.h index 0aac04dfeb..9c871623a8 100644 --- a/include/axp221.h +++ b/include/axp221.h @@ -6,17 +6,7 @@ * SPDX-License-Identifier: GPL-2.0+ */ -#define AXP221_CHIP_ADDR 0x68 -#define AXP221_CTRL_ADDR 0x3e -#define AXP221_INIT_DATA 0x3e - -#define AXP223_DEVICE_ADDR 0x3a3 -#define AXP223_RUNTIME_ADDR 0x2d - /* Page 0 addresses */ -#define AXP221_POWER_STATUS 0x00 -#define AXP221_POWER_STATUS_VBUS_AVAIL (1 << 5) -#define AXP221_POWER_STATUS_VBUS_USABLE (1 << 4) #define AXP221_CHIP_ID 0x03 #define AXP221_OUTPUT_CTRL1 0x10 #define AXP221_OUTPUT_CTRL1_DCDC0_EN (1 << 0) @@ -62,7 +52,16 @@ /* Page 1 addresses */ #define AXP221_SID 0x20 -#define AXP_GPIO +/* For axp_gpio.c */ +#define AXP_POWER_STATUS 0x00 +#define AXP_POWER_STATUS_VBUS_PRESENT (1 << 5) +#define AXP_GPIO0_CTRL 0x90 +#define AXP_GPIO1_CTRL 0x92 +#define AXP_GPIO_CTRL_OUTPUT_LOW 0x00 /* Drive pin low */ +#define AXP_GPIO_CTRL_OUTPUT_HIGH 0x01 /* Drive pin high */ +#define AXP_GPIO_CTRL_INPUT 0x02 /* Input */ +#define AXP_GPIO_STATE 0x94 +#define AXP_GPIO_STATE_OFFSET 0 int axp221_set_dcdc1(unsigned int mvolt); int axp221_set_dcdc2(unsigned int mvolt); @@ -79,8 +78,3 @@ 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_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); |