Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
MFD ADP5360 Interface

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.

Detailed Description

Since
4.5
Version
0.1.0

Typedef Documentation

◆ mfd_adp5360_interrupt_callback

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.

Parameters
devPointer to the device structure for the MFD instance
user_dataUser data provided when registering the callback

Enumeration Type Documentation

◆ adp5360_interrupt_type

#include <zephyr/drivers/mfd/adp5360.h>

ADP5360 interrupt types.

Enumerator
ADP5360_INTERRUPT_VBUS_VOLTAGE_THRESHOLD 

VBUS voltage threshold interrupt.

ADP5360_INTERRUPT_CHARGER_MODE_CHANGE 

Charger mode change interrupt.

ADP5360_INTERRUPT_BAT_VOLTAGE_THRESHOLD 

Battery voltage threshold interrupt.

ADP5360_INTERRUPT_TEMP_THRESHOLD 

Temperature threshold interrupt.

ADP5360_INTERRUPT_BAT_PROTECTION 

Battery protection interrupt.

ADP5360_INTERRUPT_ADPICHG 

Adaptive charge interrupt.

ADP5360_INTERRUPT_SOC_ACM 

State of charge ACM interrupt.

ADP5360_INTERRUPT_SOC_LOW 

Low state of charge interrupt.

ADP5360_INTERRUPT_BUCKBSTPGOOD 

Buck boost power good interrupt.

ADP5360_INTERRUPT_BUCKPGOOD 

Buck power good interrupt.

ADP5360_INTERRUPT_WATCHDOG_TIMEOUT 

Watchdog timeout interrupt.

ADP5360_INTERRUPT_MANUAL_RESET 

Manual reset interrupt.

◆ adp5360_pgood_status_type

#include <zephyr/drivers/mfd/adp5360.h>

Power good status types.

Enumerator
ADP5360_PGOOD_STATUS_CHARGE_COMPLETE 

Charge complete status.

ADP5360_PGOOD_STATUS_VBUS_OK 

VBUS OK status.

ADP5360_PGOOD_STATUS_BATTERY_OK 

Battery OK status.

ADP5360_PGOOD_STATUS_VOUT2_OK 

VOUT2 OK status.

ADP5360_PGOOD_STATUS_VOUT1_OK 

VOUT1 OK status.

◆ child_dev

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.

◆ pgood_pin

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.

Function Documentation

◆ mfd_adp5360_hardware_reset()

int mfd_adp5360_hardware_reset ( const struct device * dev)

#include <zephyr/drivers/mfd/adp5360.h>

Perform hardware reset of the ADP5360 device.

Parameters
devPointer to the device structure for the MFD instance
Return values
0on success
-errnonegative errno code on failure

◆ mfd_adp5360_interrupt_trigger_set()

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.

Parameters
devPointer to the device structure for the MFD instance
typeType of interrupt to monitor
handlerCallback function to be invoked on interrupt
user_dataUser data to be passed to the callback
Return values
0on success
-errnonegative errno code on failure

◆ mfd_adp5360_pgood_trigger_set()

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.

Parameters
devPointer to the device structure for the MFD instance
pinPGOOD pin to monitor (PGOOD1 or PGOOD2)
typeType of PGOOD status change to monitor
handlerCallback function to be invoked on PGOOD status change
user_dataUser data to be passed to the callback
Return values
0on success
-errnonegative errno code on failure

◆ mfd_adp5360_reset_trigger_set()

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.

Parameters
devPointer to the device structure for the MFD instance
handlerCallback function to be invoked on reset interrupt
user_dataUser data to be passed to the callback
Return values
0on success
-errnonegative errno code on failure

◆ mfd_adp5360_shipment_mode_disable()

int mfd_adp5360_shipment_mode_disable ( const struct device * dev)

#include <zephyr/drivers/mfd/adp5360.h>

Disable shipment mode on the ADP5360 device.

Parameters
devPointer to the device structure for the MFD instance
Return values
0on success
-errnonegative errno code on failure

◆ mfd_adp5360_shipment_mode_enable()

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.

Parameters
devPointer to the device structure for the MFD instance
Return values
0on success
-errnonegative errno code on failure

◆ mfd_adp5360_software_reset()

int mfd_adp5360_software_reset ( const struct device * dev)

#include <zephyr/drivers/mfd/adp5360.h>

Perform software reset of the ADP5360 device.

Parameters
devPointer to the device structure for the MFD instance
Return values
0on success
-errnonegative errno code on failure