|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Data Structures | |
| struct | child_interrupt_callback |
| Child device interrupt callback structure. More... | |
Typedefs | |
| typedef void(* | mfd_adp5360_interrupt_callback) (const struct device *dev, void *user_data) |
| Interrupt callback function type for ADP5360 MFD interrupts. | |
Enumerations | |
| enum | child_dev { ADP5360_DEV_REG = 0 , ADP5360_DEV_CHG , ADP5360_DEV_FG , ADP5360_DEV_MAX } |
| Child device of adp5360. More... | |
| enum | adp5360_interrupt_type { ADP5360_INTERRUPT_VBUS_VOLTAGE_THRESHOLD = 0 , ADP5360_INTERRUPT_CHARGER_MODE_CHANGE , ADP5360_INTERRUPT_BAT_VOLTAGE_THRESHOLD , ADP5360_INTERRUPT_TEMP_THRESHOLD , ADP5360_INTERRUPT_BAT_PROTECTION , ADP5360_INTERRUPT_ADPICHG , ADP5360_INTERRUPT_SOC_ACM , ADP5360_INTERRUPT_SOC_LOW , ADP5360_INTERRUPT_BUCKBSTPGOOD , ADP5360_INTERRUPT_BUCKPGOOD , ADP5360_INTERRUPT_WATCHDOG_TIMEOUT , ADP5360_INTERRUPT_MANUAL_RESET } |
| ADP5360 interrupt types. More... | |
| enum | pgood_pin { ADP5360_PGOOD1 = 1 , ADP5360_PGOOD2 } |
| Power good pin selection. More... | |
| enum | adp5360_pgood_status_type { ADP5360_PGOOD_STATUS_CHARGE_COMPLETE = 0 , ADP5360_PGOOD_STATUS_VBUS_OK , ADP5360_PGOOD_STATUS_BATTERY_OK , ADP5360_PGOOD_STATUS_VOUT2_OK , ADP5360_PGOOD_STATUS_VOUT1_OK } |
| Power good status types. More... | |
Functions | |
| int | mfd_adp5360_software_reset (const struct device *dev) |
| Perform software reset of the ADP5360 device. | |
| int | mfd_adp5360_hardware_reset (const struct device *dev) |
| Perform hardware reset of the ADP5360 device. | |
| int | mfd_adp5360_reset_trigger_set (const struct device *dev, mfd_adp5360_interrupt_callback handler, void *user_data) |
| Register a callback for reset interrupt events. | |
| int | mfd_adp5360_pgood_trigger_set (const struct device *dev, enum pgood_pin pin, enum adp5360_pgood_status_type type, mfd_adp5360_interrupt_callback handler, void *user_data) |
| Register a callback for power good (PGOOD) pin status changes. | |
| int | mfd_adp5360_interrupt_trigger_set (const struct device *dev, enum adp5360_interrupt_type type, mfd_adp5360_interrupt_callback handler, void *user_data) |
| Register a callback for a specific interrupt type. | |
| int | mfd_adp5360_shipment_mode_enable (const struct device *dev) |
| Enable shipment mode on the ADP5360 device. | |
| int | mfd_adp5360_shipment_mode_disable (const struct device *dev) |
| Disable shipment mode on the ADP5360 device. | |
| typedef void(* mfd_adp5360_interrupt_callback) (const struct device *dev, void *user_data) |
#include <zephyr/drivers/mfd/adp5360.h>
Interrupt callback function type for ADP5360 MFD interrupts.
| dev | Pointer to the device structure for the MFD instance |
| user_data | User data provided when registering the callback |
#include <zephyr/drivers/mfd/adp5360.h>
ADP5360 interrupt types.
#include <zephyr/drivers/mfd/adp5360.h>
Power good status types.
| enum child_dev |
#include <zephyr/drivers/mfd/adp5360.h>
Child device of adp5360.
| Enumerator | |
|---|---|
| ADP5360_DEV_REG | Regulator. |
| ADP5360_DEV_CHG | Charger. |
| ADP5360_DEV_FG | Fuelgauge. |
| ADP5360_DEV_MAX | Maximum number of child devices. |
| enum pgood_pin |
#include <zephyr/drivers/mfd/adp5360.h>
Power good pin selection.
| Enumerator | |
|---|---|
| ADP5360_PGOOD1 | Power good pin 1. |
| ADP5360_PGOOD2 | Power good pin 2. |
| int mfd_adp5360_hardware_reset | ( | const struct device * | dev | ) |
#include <zephyr/drivers/mfd/adp5360.h>
Perform hardware reset of the ADP5360 device.
| dev | Pointer to the device structure for the MFD instance |
| 0 | on success |
| -errno | negative errno code on failure |
| int mfd_adp5360_interrupt_trigger_set | ( | const struct device * | dev, |
| enum adp5360_interrupt_type | type, | ||
| mfd_adp5360_interrupt_callback | handler, | ||
| void * | user_data ) |
#include <zephyr/drivers/mfd/adp5360.h>
Register a callback for a specific interrupt type.
| dev | Pointer to the device structure for the MFD instance |
| type | Type of interrupt to monitor |
| handler | Callback function to be invoked on interrupt |
| user_data | User data to be passed to the callback |
| 0 | on success |
| -errno | negative errno code on failure |
| int mfd_adp5360_pgood_trigger_set | ( | const struct device * | dev, |
| enum pgood_pin | pin, | ||
| enum adp5360_pgood_status_type | type, | ||
| mfd_adp5360_interrupt_callback | handler, | ||
| void * | user_data ) |
#include <zephyr/drivers/mfd/adp5360.h>
Register a callback for power good (PGOOD) pin status changes.
| dev | Pointer to the device structure for the MFD instance |
| pin | PGOOD pin to monitor (PGOOD1 or PGOOD2) |
| type | Type of PGOOD status change to monitor |
| handler | Callback function to be invoked on PGOOD status change |
| user_data | User data to be passed to the callback |
| 0 | on success |
| -errno | negative errno code on failure |
| int mfd_adp5360_reset_trigger_set | ( | const struct device * | dev, |
| mfd_adp5360_interrupt_callback | handler, | ||
| void * | user_data ) |
#include <zephyr/drivers/mfd/adp5360.h>
Register a callback for reset interrupt events.
| dev | Pointer to the device structure for the MFD instance |
| handler | Callback function to be invoked on reset interrupt |
| user_data | User data to be passed to the callback |
| 0 | on success |
| -errno | negative errno code on failure |
| int mfd_adp5360_shipment_mode_disable | ( | const struct device * | dev | ) |
#include <zephyr/drivers/mfd/adp5360.h>
Disable shipment mode on the ADP5360 device.
| dev | Pointer to the device structure for the MFD instance |
| 0 | on success |
| -errno | negative errno code on failure |
| int mfd_adp5360_shipment_mode_enable | ( | const struct device * | dev | ) |
#include <zephyr/drivers/mfd/adp5360.h>
Enable shipment mode on the ADP5360 device.
In shipment mode, the device enters a low-power state to preserve battery charge during storage and shipping.
| dev | Pointer to the device structure for the MFD instance |
| 0 | on success |
| -errno | negative errno code on failure |
| int mfd_adp5360_software_reset | ( | const struct device * | dev | ) |
#include <zephyr/drivers/mfd/adp5360.h>
Perform software reset of the ADP5360 device.
| dev | Pointer to the device structure for the MFD instance |
| 0 | on success |
| -errno | negative errno code on failure |