7#ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_AXP192_H_
8#define ZEPHYR_INCLUDE_DRIVERS_MFD_AXP192_H_
38#define AXP192_GPIO_FUNC_VALID(func) (func < AXP192_GPIO_FUNC_INVALID)
43#define AXP192_GPIO_MAX_NUM 6U
Public APIs for GPIO drivers.
axp192_gpio_func
GPIO function type.
Definition axp192.h:23
@ AXP192_GPIO_FUNC_PWM
Definition axp192.h:29
@ AXP192_GPIO_FUNC_CHARGE_CTL
Definition axp192.h:31
@ AXP192_GPIO_FUNC_FLOAT
Definition axp192.h:30
@ AXP192_GPIO_FUNC_OUTPUT_LOW
Definition axp192.h:26
@ AXP192_GPIO_FUNC_ADC
Definition axp192.h:28
@ AXP192_GPIO_FUNC_INPUT
Definition axp192.h:24
@ AXP192_GPIO_FUNC_INVALID
Definition axp192.h:32
@ AXP192_GPIO_FUNC_LDO
Definition axp192.h:27
@ AXP192_GPIO_FUNC_OUTPUT_OD
Definition axp192.h:25
int mfd_axp192_gpio_func_get(const struct device *dev, uint8_t gpio, enum axp192_gpio_func *func)
Read out current configuration of a specific GPIO pin.
int mfd_axp192_gpio_func_ctrl(const struct device *dev, const struct device *client_dev, uint8_t gpio, enum axp192_gpio_func func)
Request a GPIO pin to be configured to a specific function.
int mfd_axp192_gpio_write_port(const struct device *dev, uint8_t value, uint8_t mask)
Write GPIO port.
int mfd_axp192_gpio_pd_ctrl(const struct device *dev, uint8_t gpio, bool enable)
Enable pull-down on specified GPIO pin.
int mfd_axp192_gpio_read_port(const struct device *dev, uint8_t *value)
Read GPIO port.
int mfd_axp192_gpio_pd_get(const struct device *dev, uint8_t gpio, bool *enabled)
Read out the current pull-down configuration of a specific GPIO.
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:411