Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
axp192.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>

Go to the source code of this file.

Macros

#define AXP192_GPIO_FUNC_VALID(func)   (func < AXP192_GPIO_FUNC_INVALID)
 Check if a given GPIO function value is valid.
 
#define AXP192_GPIO_MAX_NUM   6U
 Maximum number of GPIOs supported by AXP192 PMIC.
 

Enumerations

enum  axp192_gpio_func {
  AXP192_GPIO_FUNC_INPUT = BIT(0) , AXP192_GPIO_FUNC_OUTPUT_OD = BIT(1) , AXP192_GPIO_FUNC_OUTPUT_LOW = BIT(2) , AXP192_GPIO_FUNC_LDO = BIT(3) ,
  AXP192_GPIO_FUNC_ADC = BIT(4) , AXP192_GPIO_FUNC_PWM = BIT(5) , AXP192_GPIO_FUNC_FLOAT = BIT(6) , AXP192_GPIO_FUNC_CHARGE_CTL = BIT(7) ,
  AXP192_GPIO_FUNC_INVALID
}
 GPIO function type. More...
 

Functions

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_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_pd_ctrl (const struct device *dev, uint8_t gpio, bool enable)
 Enable pull-down on specified GPIO pin.
 
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.
 
int mfd_axp192_gpio_read_port (const struct device *dev, uint8_t *value)
 Read GPIO port.
 
int mfd_axp192_gpio_write_port (const struct device *dev, uint8_t value, uint8_t mask)
 Write GPIO port.
 

Macro Definition Documentation

◆ AXP192_GPIO_FUNC_VALID

#define AXP192_GPIO_FUNC_VALID (   func)    (func < AXP192_GPIO_FUNC_INVALID)

Check if a given GPIO function value is valid.

◆ AXP192_GPIO_MAX_NUM

#define AXP192_GPIO_MAX_NUM   6U

Maximum number of GPIOs supported by AXP192 PMIC.

Enumeration Type Documentation

◆ axp192_gpio_func

GPIO function type.

Only one function can be configured per GPIO.

Enumerator
AXP192_GPIO_FUNC_INPUT 
AXP192_GPIO_FUNC_OUTPUT_OD 
AXP192_GPIO_FUNC_OUTPUT_LOW 
AXP192_GPIO_FUNC_LDO 
AXP192_GPIO_FUNC_ADC 
AXP192_GPIO_FUNC_PWM 
AXP192_GPIO_FUNC_FLOAT 
AXP192_GPIO_FUNC_CHARGE_CTL 
AXP192_GPIO_FUNC_INVALID