Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
MFD NPM10XX Interface

Data Structures

struct  mfd_npm10xx_event_callback
 nPM10xx MFD callback structure More...

Typedefs

typedef uint64_t npm10xx_event_t
 Identifies a set of events for the event callback.
typedef uint16_t npm10xx_rstreas_t
 Identifies a reset reason.
typedef void(* npm10xx_callback_handler_t) (const struct device *mfd_npm10xx_dev, struct mfd_npm10xx_event_callback *cb, npm10xx_event_t events)
 Define the application callback handler function signature.

Enumerations

enum  mfd_npm10xx_hibernate_mode { NPM10XX_HIBERNATE_VBAT , NPM10XX_HIBERNATE_VBUS_WAIT , NPM10XX_HIBERNATE_VBUS_NOWAIT }
 nPM10xx Hibernate modes More...
enum  mfd_npm10xx_standby_op {
  NPM10XX_STANDBY1_ENTER_WAIT , NPM10XX_STANDBY1_ENTER_NOWAIT , NPM10XX_STANDBY2_ENTER_WAIT , NPM10XX_STANDBY2_ENTER_NOWAIT ,
  NPM10XX_STANDBY_EXIT
}
 nPM10xx Standby operations More...

Functions

int mfd_npm10xx_reset (const struct device *dev)
 Reset the nPM10xx PMIC device.
int mfd_npm10xx_get_reset_reason (const struct device *dev, npm10xx_rstreas_t *reason)
 Retrieve and clear the reset reason of the nPM10xx PMIC device.
int mfd_npm10xx_hibernate (const struct device *dev, enum mfd_npm10xx_hibernate_mode mode, k_timeout_t time)
 Trigger a Hibernate mode on an nPM10xx PMIC device.
int mfd_npm10xx_standby (const struct device *dev, enum mfd_npm10xx_standby_op operation)
 Enter or exit a VBUS Standby mode on an nPM10xx PMIC device.
int mfd_npm10xx_manage_callback (const struct device *dev, struct mfd_npm10xx_event_callback *callback, bool add)
 Manage nPM10xx event callbacks.

RESET reasons

#define NPM10XX_RSTREAS_HIBERNATE   BIT(0)
 VBAT Hibernate mode exit by VBUS connected.
#define NPM10XX_RSTREAS_BOOTMON   BIT(1)
 Boot monitor reset.
#define NPM10XX_RSTREAS_WATCHDOG   BIT(2)
 Watchdog reset.
#define NPM10XX_RSTREAS_LONGPRESS   BIT(3)
 Longpress reset.
#define NPM10XX_RSTREAS_THERMAL   BIT(4)
 Thermal shutdown reset.
#define NPM10XX_RSTREAS_POF   BIT(5)
 POF reset.
#define NPM10XX_RSTREAS_SW   BIT(6)
 Software reset (task register).
#define NPM10XX_RSTREAS_SHIPERR   BIT(7)
 Ship mode entry error reset.
#define NPM10XX_RSTREAS_TIMER   BIT(8)
 Hibernate mode exit by timer.
#define NPM10XX_RSTREAS_BUTTON   BIT(9)
 Hibernate mode exit by SHPHLD button.
#define NPM10XX_RSTREAS_HIBERNATEVBUS   BIT(10)
 VBUS Hibernate mode exit by VBUS disconnected.
#define NPM10XX_RSTREAS_WATCHDOGSOFT   BIT(11)
 Watchdog soft reset.

ADC events

#define NPM10XX_EVENT_ADC_VBAT   BIT64(0)
 ADC VBAT conversion ready.
#define NPM10XX_EVENT_ADC_NTC   BIT64(1)
 ADC NTC conversion ready.
#define NPM10XX_EVENT_ADC_DIETEMP   BIT64(2)
 ADC die temperature conversion ready.
#define NPM10XX_EVENT_ADC_VSYS   BIT64(3)
 ADC VSYS conversion ready.
#define NPM10XX_EVENT_ADC_VBUS   BIT64(4)
 ADC VBUS conversion ready.
#define NPM10XX_EVENT_ADC_VSET   BIT64(5)
 ADC VSET conversion ready.
#define NPM10XX_EVENT_ADC_OFFSET   BIT64(6)
 ADC OFFSET conversion ready.
#define NPM10XX_EVENT_IBATVBAT   BIT64(7)
 IBAT/VBAT battery current and/or voltage conversion ready.

CHARGER events

#define NPM10XX_EVENT_CHARGE   BIT64(8)
 Charger started.
#define NPM10XX_EVENT_DISCHARGE   BIT64(9)
 Battery discharge started.
#define NPM10XX_EVENT_DROPOUT   BIT64(10)
 Dropout loop activated.
#define NPM10XX_EVENT_SUPPLEMENT   BIT64(11)
 Supplement mode activated.
#define NPM10XX_EVENT_COMPLETE   BIT64(12)
 Battery charging completed.
#define NPM10XX_EVENT_BATILIM   BIT64(13)
 Battery discharge limit activated.
#define NPM10XX_EVENT_ITERM   BIT64(14)
 Charging current below ITERM.
#define NPM10XX_EVENT_VTERM   BIT64(16)
 Battery voltage has reached VTERM.
#define NPM10XX_EVENT_RECHARGE   BIT64(17)
 Battery voltage below VRECHARGE.
#define NPM10XX_EVENT_VTHROTTLE   BIT64(18)
 Battery voltage above VTHROTTLE.
#define NPM10XX_EVENT_VWEAK   BIT64(19)
 Battery voltage above VWEAK.
#define NPM10XX_EVENT_VTRICKLE   BIT64(20)
 Battery voltage above VTRICKLEFAST.
#define NPM10XX_EVENT_VBATLOW   BIT64(21)
 Battery voltage below VBATLOW.
#define NPM10XX_EVENT_NTCCOLD   BIT64(24)
 Battery temperature in cold region.
#define NPM10XX_EVENT_NTCCOOL   BIT64(25)
 Battery temperature in cool region.
#define NPM10XX_EVENT_NTCWARM   BIT64(26)
 Battery temperature in warm region.
#define NPM10XX_EVENT_NTCHOT   BIT64(27)
 Battery temperature in hot region.
#define NPM10XX_EVENT_DIETEMP   BIT64(28)
 Die temperature is over TCHGREDUCE.
#define NPM10XX_EVENT_ERROR   BIT64(29)
 Charging error.
#define NPM10XX_EVENT_VSYSWRNPE   BIT64(30)
 VSYSWRNR threshold detected.
#define NPM10XX_EVENT_VSYSWRNNE   BIT64(31)
 VSYSWRNF threshold detected.

SYSREG/VBUS events

#define NPM10XX_EVENT_VBUSOVPE   BIT64(32)
 VBUS overvoltage detected.
#define NPM10XX_EVENT_VBUSOVNE   BIT64(33)
 VBUS overvoltage removed.
#define NPM10XX_EVENT_VBUSUNDERPE   BIT64(34)
 VBUS undervoltage detected.
#define NPM10XX_EVENT_VBUSUNDERNE   BIT64(35)
 VBUS undervoltage removed.
#define NPM10XX_EVENT_VBUSPRESENTPE   BIT64(36)
 VBUS detected.
#define NPM10XX_EVENT_VBUSPRESENTNE   BIT64(37)
 VBUS removed.
#define NPM10XX_EVENT_VBUSOKPE   BIT64(38)
 VBUS within limit.
#define NPM10XX_EVENT_VBUSOKNE   BIT64(39)
 VBUS outside the limit.

GPIO events

#define NPM10XX_EVENT_GPIO0PE   BIT64(40)
 Rising edge on GPIO0.
#define NPM10XX_EVENT_GPIO0NE   BIT64(41)
 Falling edge on GPIO0.
#define NPM10XX_EVENT_GPIO1PE   BIT64(42)
 Rising edge on GPIO1.
#define NPM10XX_EVENT_GPIO1NE   BIT64(43)
 Falling edge on GPIO1.
#define NPM10XX_EVENT_GPIO2PE   BIT64(44)
 Rising edge on GPIO2.
#define NPM10XX_EVENT_GPIO2NE   BIT64(45)
 Falling edge on GPIO2.

SYSTEM events

#define NPM10XX_EVENT_TIMERTIMEOUT   BIT64(48)
 General purpose timer expired.
#define NPM10XX_EVENT_TIMERFREE   BIT64(49)
 Timer free event.
#define NPM10XX_EVENT_TIMERPREWARN   BIT64(50)
 Pre‑warning event before timer expires.
#define NPM10XX_EVENT_LDOSWOC   BIT64(51)
 LOADSW1/LDO1 overcurrent.
#define NPM10XX_EVENT_LOADSWOC   BIT64(52)
 LOADSW2 overcurrent.
#define NPM10XX_EVENT_SHPHLDPE   BIT64(53)
 Rising edge on SHPHLD.
#define NPM10XX_EVENT_SHPHLDNE   BIT64(54)
 Falling edge on SHPHLD.
#define NPM10XX_EVENT_ADCTEST   BIT64(55)
 ADC test finished.

Detailed Description

Since
4.4
Version
0.1.0

Macro Definition Documentation

◆ NPM10XX_EVENT_ADC_DIETEMP

#define NPM10XX_EVENT_ADC_DIETEMP   BIT64(2)

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

ADC die temperature conversion ready.

◆ NPM10XX_EVENT_ADC_NTC

#define NPM10XX_EVENT_ADC_NTC   BIT64(1)

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

ADC NTC conversion ready.

◆ NPM10XX_EVENT_ADC_OFFSET

#define NPM10XX_EVENT_ADC_OFFSET   BIT64(6)

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

ADC OFFSET conversion ready.

◆ NPM10XX_EVENT_ADC_VBAT

#define NPM10XX_EVENT_ADC_VBAT   BIT64(0)

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

ADC VBAT conversion ready.

◆ NPM10XX_EVENT_ADC_VBUS

#define NPM10XX_EVENT_ADC_VBUS   BIT64(4)

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

ADC VBUS conversion ready.

◆ NPM10XX_EVENT_ADC_VSET

#define NPM10XX_EVENT_ADC_VSET   BIT64(5)

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

ADC VSET conversion ready.

◆ NPM10XX_EVENT_ADC_VSYS

#define NPM10XX_EVENT_ADC_VSYS   BIT64(3)

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

ADC VSYS conversion ready.

◆ NPM10XX_EVENT_ADCTEST

#define NPM10XX_EVENT_ADCTEST   BIT64(55)

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

ADC test finished.

◆ NPM10XX_EVENT_BATILIM

#define NPM10XX_EVENT_BATILIM   BIT64(13)

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

Battery discharge limit activated.

◆ NPM10XX_EVENT_CHARGE

#define NPM10XX_EVENT_CHARGE   BIT64(8)

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

Charger started.

◆ NPM10XX_EVENT_COMPLETE

#define NPM10XX_EVENT_COMPLETE   BIT64(12)

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

Battery charging completed.

◆ NPM10XX_EVENT_DIETEMP

#define NPM10XX_EVENT_DIETEMP   BIT64(28)

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

Die temperature is over TCHGREDUCE.

◆ NPM10XX_EVENT_DISCHARGE

#define NPM10XX_EVENT_DISCHARGE   BIT64(9)

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

Battery discharge started.

◆ NPM10XX_EVENT_DROPOUT

#define NPM10XX_EVENT_DROPOUT   BIT64(10)

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

Dropout loop activated.

◆ NPM10XX_EVENT_ERROR

#define NPM10XX_EVENT_ERROR   BIT64(29)

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

Charging error.

◆ NPM10XX_EVENT_GPIO0NE

#define NPM10XX_EVENT_GPIO0NE   BIT64(41)

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

Falling edge on GPIO0.

◆ NPM10XX_EVENT_GPIO0PE

#define NPM10XX_EVENT_GPIO0PE   BIT64(40)

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

Rising edge on GPIO0.

◆ NPM10XX_EVENT_GPIO1NE

#define NPM10XX_EVENT_GPIO1NE   BIT64(43)

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

Falling edge on GPIO1.

◆ NPM10XX_EVENT_GPIO1PE

#define NPM10XX_EVENT_GPIO1PE   BIT64(42)

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

Rising edge on GPIO1.

◆ NPM10XX_EVENT_GPIO2NE

#define NPM10XX_EVENT_GPIO2NE   BIT64(45)

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

Falling edge on GPIO2.

◆ NPM10XX_EVENT_GPIO2PE

#define NPM10XX_EVENT_GPIO2PE   BIT64(44)

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

Rising edge on GPIO2.

◆ NPM10XX_EVENT_IBATVBAT

#define NPM10XX_EVENT_IBATVBAT   BIT64(7)

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

IBAT/VBAT battery current and/or voltage conversion ready.

◆ NPM10XX_EVENT_ITERM

#define NPM10XX_EVENT_ITERM   BIT64(14)

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

Charging current below ITERM.

◆ NPM10XX_EVENT_LDOSWOC

#define NPM10XX_EVENT_LDOSWOC   BIT64(51)

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

LOADSW1/LDO1 overcurrent.

◆ NPM10XX_EVENT_LOADSWOC

#define NPM10XX_EVENT_LOADSWOC   BIT64(52)

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

LOADSW2 overcurrent.

◆ NPM10XX_EVENT_NTCCOLD

#define NPM10XX_EVENT_NTCCOLD   BIT64(24)

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

Battery temperature in cold region.

◆ NPM10XX_EVENT_NTCCOOL

#define NPM10XX_EVENT_NTCCOOL   BIT64(25)

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

Battery temperature in cool region.

◆ NPM10XX_EVENT_NTCHOT

#define NPM10XX_EVENT_NTCHOT   BIT64(27)

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

Battery temperature in hot region.

◆ NPM10XX_EVENT_NTCWARM

#define NPM10XX_EVENT_NTCWARM   BIT64(26)

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

Battery temperature in warm region.

◆ NPM10XX_EVENT_RECHARGE

#define NPM10XX_EVENT_RECHARGE   BIT64(17)

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

Battery voltage below VRECHARGE.

◆ NPM10XX_EVENT_SHPHLDNE

#define NPM10XX_EVENT_SHPHLDNE   BIT64(54)

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

Falling edge on SHPHLD.

◆ NPM10XX_EVENT_SHPHLDPE

#define NPM10XX_EVENT_SHPHLDPE   BIT64(53)

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

Rising edge on SHPHLD.

◆ NPM10XX_EVENT_SUPPLEMENT

#define NPM10XX_EVENT_SUPPLEMENT   BIT64(11)

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

Supplement mode activated.

◆ NPM10XX_EVENT_TIMERFREE

#define NPM10XX_EVENT_TIMERFREE   BIT64(49)

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

Timer free event.

◆ NPM10XX_EVENT_TIMERPREWARN

#define NPM10XX_EVENT_TIMERPREWARN   BIT64(50)

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

Pre‑warning event before timer expires.

◆ NPM10XX_EVENT_TIMERTIMEOUT

#define NPM10XX_EVENT_TIMERTIMEOUT   BIT64(48)

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

General purpose timer expired.

◆ NPM10XX_EVENT_VBATLOW

#define NPM10XX_EVENT_VBATLOW   BIT64(21)

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

Battery voltage below VBATLOW.

◆ NPM10XX_EVENT_VBUSOKNE

#define NPM10XX_EVENT_VBUSOKNE   BIT64(39)

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

VBUS outside the limit.

◆ NPM10XX_EVENT_VBUSOKPE

#define NPM10XX_EVENT_VBUSOKPE   BIT64(38)

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

VBUS within limit.

◆ NPM10XX_EVENT_VBUSOVNE

#define NPM10XX_EVENT_VBUSOVNE   BIT64(33)

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

VBUS overvoltage removed.

◆ NPM10XX_EVENT_VBUSOVPE

#define NPM10XX_EVENT_VBUSOVPE   BIT64(32)

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

VBUS overvoltage detected.

◆ NPM10XX_EVENT_VBUSPRESENTNE

#define NPM10XX_EVENT_VBUSPRESENTNE   BIT64(37)

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

VBUS removed.

◆ NPM10XX_EVENT_VBUSPRESENTPE

#define NPM10XX_EVENT_VBUSPRESENTPE   BIT64(36)

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

VBUS detected.

◆ NPM10XX_EVENT_VBUSUNDERNE

#define NPM10XX_EVENT_VBUSUNDERNE   BIT64(35)

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

VBUS undervoltage removed.

◆ NPM10XX_EVENT_VBUSUNDERPE

#define NPM10XX_EVENT_VBUSUNDERPE   BIT64(34)

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

VBUS undervoltage detected.

◆ NPM10XX_EVENT_VSYSWRNNE

#define NPM10XX_EVENT_VSYSWRNNE   BIT64(31)

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

VSYSWRNF threshold detected.

◆ NPM10XX_EVENT_VSYSWRNPE

#define NPM10XX_EVENT_VSYSWRNPE   BIT64(30)

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

VSYSWRNR threshold detected.

◆ NPM10XX_EVENT_VTERM

#define NPM10XX_EVENT_VTERM   BIT64(16)

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

Battery voltage has reached VTERM.

◆ NPM10XX_EVENT_VTHROTTLE

#define NPM10XX_EVENT_VTHROTTLE   BIT64(18)

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

Battery voltage above VTHROTTLE.

◆ NPM10XX_EVENT_VTRICKLE

#define NPM10XX_EVENT_VTRICKLE   BIT64(20)

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

Battery voltage above VTRICKLEFAST.

◆ NPM10XX_EVENT_VWEAK

#define NPM10XX_EVENT_VWEAK   BIT64(19)

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

Battery voltage above VWEAK.

◆ NPM10XX_RSTREAS_BOOTMON

#define NPM10XX_RSTREAS_BOOTMON   BIT(1)

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

Boot monitor reset.

◆ NPM10XX_RSTREAS_BUTTON

#define NPM10XX_RSTREAS_BUTTON   BIT(9)

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

Hibernate mode exit by SHPHLD button.

◆ NPM10XX_RSTREAS_HIBERNATE

#define NPM10XX_RSTREAS_HIBERNATE   BIT(0)

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

VBAT Hibernate mode exit by VBUS connected.

◆ NPM10XX_RSTREAS_HIBERNATEVBUS

#define NPM10XX_RSTREAS_HIBERNATEVBUS   BIT(10)

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

VBUS Hibernate mode exit by VBUS disconnected.

◆ NPM10XX_RSTREAS_LONGPRESS

#define NPM10XX_RSTREAS_LONGPRESS   BIT(3)

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

Longpress reset.

◆ NPM10XX_RSTREAS_POF

#define NPM10XX_RSTREAS_POF   BIT(5)

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

POF reset.

◆ NPM10XX_RSTREAS_SHIPERR

#define NPM10XX_RSTREAS_SHIPERR   BIT(7)

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

Ship mode entry error reset.

◆ NPM10XX_RSTREAS_SW

#define NPM10XX_RSTREAS_SW   BIT(6)

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

Software reset (task register).

◆ NPM10XX_RSTREAS_THERMAL

#define NPM10XX_RSTREAS_THERMAL   BIT(4)

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

Thermal shutdown reset.

◆ NPM10XX_RSTREAS_TIMER

#define NPM10XX_RSTREAS_TIMER   BIT(8)

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

Hibernate mode exit by timer.

◆ NPM10XX_RSTREAS_WATCHDOG

#define NPM10XX_RSTREAS_WATCHDOG   BIT(2)

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

Watchdog reset.

◆ NPM10XX_RSTREAS_WATCHDOGSOFT

#define NPM10XX_RSTREAS_WATCHDOGSOFT   BIT(11)

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

Watchdog soft reset.

Typedef Documentation

◆ npm10xx_callback_handler_t

typedef void(* npm10xx_callback_handler_t) (const struct device *mfd_npm10xx_dev, struct mfd_npm10xx_event_callback *cb, npm10xx_event_t events)

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

Define the application callback handler function signature.

Parameters
mfd_npm10xx_devnPM10xx MFD device
cbOriginal struct mfd_npm10xx_event_callback owning this handler
eventsMask of events that triggers the callback handler

Note: cb pointer can be used to retrieve private data through CONTAINER_OF() if original struct mfd_npm10xx_event_callback is stored in another private structure.

◆ npm10xx_event_t

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

Identifies a set of events for the event callback.

◆ npm10xx_rstreas_t

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

Identifies a reset reason.

Intended to be checked against the NPM10XX_RSTREAS_* macros once retrieved.

Enumeration Type Documentation

◆ mfd_npm10xx_hibernate_mode

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

nPM10xx Hibernate modes

Enumerator
NPM10XX_HIBERNATE_VBAT 

Hibernate when powered from VBAT.

NPM10XX_HIBERNATE_VBUS_WAIT 

Hibernate when powered from VBUS.

Wait for charge completion.

NPM10XX_HIBERNATE_VBUS_NOWAIT 

Hibernate when powered from VBUS.

Do not wait for charge completion.

◆ mfd_npm10xx_standby_op

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

nPM10xx Standby operations

Enumerator
NPM10XX_STANDBY1_ENTER_WAIT 

Enter VBUS Standby1 mode (VBUS max 12V).

Wait for charge completion.

NPM10XX_STANDBY1_ENTER_NOWAIT 

Enter VBUS Standby1 mode (VBUS max 12V).

Do not wait for charge completion.

NPM10XX_STANDBY2_ENTER_WAIT 

Enter VBUS Standby2 mode (VBUS max 5V5).

Wait for charge completion.

NPM10XX_STANDBY2_ENTER_NOWAIT 

Enter VBUS Standby2 mode (VBUS max 5V5).

Do not wait for charge completion.

NPM10XX_STANDBY_EXIT 

Exit VBUS Standby mode.

Function Documentation

◆ mfd_npm10xx_get_reset_reason()

int mfd_npm10xx_get_reset_reason ( const struct device * dev,
npm10xx_rstreas_t * reason )

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

Retrieve and clear the reset reason of the nPM10xx PMIC device.

Parameters
devnPM10xx MFD device
reasonPointer to the variable to write the reset reason into
Returns
0 on success, negative errno otherwise

◆ mfd_npm10xx_hibernate()

int mfd_npm10xx_hibernate ( const struct device * dev,
enum mfd_npm10xx_hibernate_mode mode,
k_timeout_t time )

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

Trigger a Hibernate mode on an nPM10xx PMIC device.

This will turn off all supplies and any devices powered from them. The VBAT Hibernate mode is exited automatically when VBUS becomes present. The VBUS Hibernate mode is exited when VBUS is removed. The SHPHLD button can be configured to exit Hibernate modes as well. NOTE: currently only K_FOREVER timeout is supported.

Parameters
devnPM10xx MFD device
modeThe Hibernate mode to trigger
timeTimeout of the Hibernate mode. Use K_FOREVER to hibernate without a timeout.
Returns
0 on success, negative errno otherwise

◆ mfd_npm10xx_manage_callback()

int mfd_npm10xx_manage_callback ( const struct device * dev,
struct mfd_npm10xx_event_callback * callback,
bool add )

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

Manage nPM10xx event callbacks.

On removal, when no callbacks handling a given event are left, the interrupts from this event will be disabled.

Parameters
devnPM10xx MFD device
callbackA pointer to the callback to be added or removed from the list
addBoolean indicating insertion or removal of the callback
Returns
0 on success, negative errno otherwise

◆ mfd_npm10xx_reset()

int mfd_npm10xx_reset ( const struct device * dev)

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

Reset the nPM10xx PMIC device.

Turn off all supplies and apply internal reset. Clear all registers except reset registers.

Parameters
devnPM10xx MFD device
Returns
0 on success, negative errno otherwise

◆ mfd_npm10xx_standby()

int mfd_npm10xx_standby ( const struct device * dev,
enum mfd_npm10xx_standby_op operation )

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

Enter or exit a VBUS Standby mode on an nPM10xx PMIC device.

VBUS Standby modes reduce quiescent current drawn from VBUS. The device exits these modes automatically when VBUS is no longer present.

Parameters
devnPM10xx MFD device
operationThe Standby operation to execute
Returns
0 on success, negative errno otherwise