no-OS
Loading...
Searching...
No Matches
adp5055.h File Reference

Header file for the ADP5055 Driver. More...

#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include "no_os_gpio.h"
#include "no_os_i2c.h"
#include "no_os_pwm.h"
#include "no_os_util.h"
#include "no_os_units.h"
Include dependency graph for adp5055.h:

Classes

struct  adp5055_init_param
 Initialization parameter for the ADP5055 device. More...
 
struct  adp5055_desc
 Device descriptor for ADP5055. More...
 

Macros

#define ADP5055_CAPABILITY   0x19
 
#define ADP5055_STATUS_CML   0x7E
 
#define ADP5055_MODEL_ID   0xD0
 
#define ADP5055_CTRL123   0xD1
 
#define ADP5055_VID_GO   0xD2
 
#define ADP5055_CTRL_MODE1   0xD3
 
#define ADP5055_CTRL_MODE2   0xD4
 
#define ADP5055_DLY1   0xD5
 
#define ADP5055_DLY2   0xD6
 
#define ADP5055_DLY3   0xD7
 
#define ADP5055_VID1   0xD8
 
#define ADP5055_VID2   0xD9
 
#define ADP5055_VID3   0xDA
 
#define ADP5055_DVS_CFG   0xDB
 
#define ADP5055_DVS_LIM1   0xDC
 
#define ADP5055_DVS_LIM2   0xDD
 
#define ADP5055_DVS_LIM3   0xDE
 
#define ADP5055_FT_CFG   0xDF
 
#define ADP5055_PG_CFG   0xE0
 
#define ADP5055_PG_READ   0xE1
 
#define ADP5055_STATUS_LCH   0xE2
 
#define ADP5055_CH1_ON   NO_OS_BIT(0)
 
#define ADP5055_CH2_ON   NO_OS_BIT(1)
 
#define ADP5055_CH3_ON   NO_OS_BIT(2)
 
#define ADP5055_VID1_GO   NO_OS_BIT(0)
 
#define ADP5055_VID2_GO   NO_OS_BIT(1)
 
#define ADP5055_VID3_GO   NO_OS_BIT(2)
 
#define ADP5055_EN_MODE_MASK   NO_OS_GENMASK(1, 0)
 
#define ADP5055_DVS_AUTO   NO_OS_BIT(4)
 
#define ADP5055_DSCG1_ON   NO_OS_BIT(0)
 
#define ADP5055_DSCG2_ON   NO_OS_BIT(1)
 
#define ADP5055_DSCG3_ON   NO_OS_BIT(2)
 
#define ADP5055_PSM1_ON   NO_OS_BIT(4)
 
#define ADP5055_PSM2_ON   NO_OS_BIT(5)
 
#define ADP5055_PSM3_ON   NO_OS_BIT(6)
 
#define ADP5055_OCP_BLANKING   NO_OS_BIT(7)
 
#define ADP5055_EN_DLY_MASK   NO_OS_GENMASK(2, 0)
 
#define ADP5055_DIS_DLY_MASK   NO_OS_GENMASK(6, 4)
 
#define ADP5055_DVS_INTVAL1   NO_OS_GENMASK(1, 0)
 
#define ADP5055_DVS_INTVAL2   NO_OS_GENMASK(3, 2)
 
#define ADP5055_DVS_INTVAL3   NO_OS_GENMASK(5, 4)
 
#define ADP5055_VIDX_LOW_MASK   NO_OS_GENMASK(3, 0)
 
#define ADP5055_VIDX_HIGH_MASK   NO_OS_GENMASK(7, 4)
 
#define ADP5055_FT1_TH   NO_OS_GENMASK(1, 0)
 
#define ADP5055_FT2_TH   NO_OS_GENMASK(3, 2)
 
#define ADP5055_FT3_TH   NO_OS_GENMASK(5, 4)
 
#define ADP5055_PG1_MASK   NO_OS_BIT(0)
 
#define ADP5055_PG2_MASK   NO_OS_BIT(1)
 
#define ADP5055_PG3_MASK   NO_OS_BIT(2)
 
#define ADP5055_PWRGD_DLY   NO_OS_BIT(4)
 
#define ADP5055_PWRGD1   NO_OS_BIT(0)
 
#define ADP5055_PWRGD2   NO_OS_BIT(1)
 
#define ADP5055_PWRGD3   NO_OS_BIT(2)
 
#define ADP5055_PG1_LCH   NO_OS_BIT(0)
 
#define ADP5055_PG2_LCH   NO_OS_BIT(1)
 
#define ADP5055_PG3_LCH   NO_OS_BIT(2)
 
#define ADP5055_TSD_LCH   NO_OS_BIT(3)
 
#define ADP5055_OCP1_LCH   NO_OS_BIT(4)
 
#define ADP5055_OCP2_LCH   NO_OS_BIT(5)
 
#define ADP5055_OCP3_LCH   NO_OS_BIT(6)
 
#define ADP5055_INT_LCH   NO_OS_BIT(7)
 
#define ADP5055_PMBUS_OPEN_ADDRESS   0x70
 
#define ADP5055_PMBUS_0OHM_ADDRESS   0x70
 
#define ADP5055_PMBUS_14KOHM_ADDRESS   0x71
 
#define ADP5055_PMBUS_16KOHM_ADDRESS   0x72
 
#define ADP5055_PMBUS_20KOHM_ADDRESS   0x73
 
#define ADP5055_PMBUS_23KOHM_ADDRESS   0x70
 
#define ADP5055_PMBUS_32KOHM_ADDRESS   0x71
 
#define ADP5055_PMBUS_39KOHM_ADDRESS   0x73
 
#define ADP5055_PMBUS_47KOHM_ADDRESS   0x71
 
#define ADP5055_PMBUS_57KOHM_ADDRESS   0x72
 
#define ADP5055_PMBUS_71KOHM_ADDRESS   0x73
 
#define ADP5055_PMBUS_90KOHM_ADDRESS   0x70
 
#define ADP5055_PMBUS_127KOHM_ADDRESS   0x71
 
#define ADP5055_PMBUS_200KOHM_ADDRESS   0x72
 
#define ADP5055_PMBUS_511KOHM_ADDRESS   0x73
 

Enumerations

enum  adp5055_latch_status {
  ADP5055_LCH_INIT_FAIL ,
  ADP5055_LCH_OVERCURRENT_HICCUP ,
  ADP5055_LCH_THERMAL_SHUTDOWN ,
  ADP5055_LCH_PG_FAIL
}
 
enum  adp5055_en_mode {
  ADP5055_EN_MODE_HW_ONLY ,
  ADP5055_EN_MODE_SW_ONLY ,
  ADP5055_EN_MODE_HW_AND_SW ,
  ADP5055_EN_MODE_HW_OR_SW
}
 
enum  adp5055_vidx_limit {
  ADP5055_VIDX_LOW ,
  ADP5055_VIDX_HIGH
}
 
enum  adp5055_ft_th {
  ADP5055_FT_NONE ,
  ADP5055_FT_1_5WINDOW_3G ,
  ADP5055_FT_1_5WINDOW_5G ,
  ADP5055_FT_2_5WINDOW_5G
}
 
enum  adp5055_dvs_intval {
  ADP5055_DVS_INTVAL_125US ,
  ADP5055_DVS_INTVAL_62US ,
  ADP5055_DVS_INTVAL_31US ,
  ADP5055_DVS_INTVAL_15US
}
 
enum  adp5055_en_dly {
  ADP5055_EN_NO_DELAY ,
  ADP5055_EN_1TSET ,
  ADP5055_EN_2TSET ,
  ADP5055_EN_3TSET ,
  ADP5055_EN_4TSET ,
  ADP5055_EN_5TSET ,
  ADP5055_EN_6TSET ,
  ADP5055_EN_7TSET
}
 
enum  adp5055_dis_dly {
  ADP5055_DIS_NO_DELAY ,
  ADP5055_DIS_2TSET ,
  ADP5055_DIS_4TSET ,
  ADP5055_DIS_6TSET ,
  ADP5055_DIS_8TSET ,
  ADP5055_DIS_10TSET ,
  ADP5055_DIS_12TSET ,
  ADP5055_DIS_14TSET
}
 
enum  adp5055_channel {
  ADP5055_VOUT1 ,
  ADP5055_VOUT2 ,
  ADP5055_VOUT3
}
 

Functions

int adp5055_read (struct adp5055_desc *desc, uint8_t address, uint8_t *data)
 Read data from ADP5055.
 
int adp5055_write (struct adp5055_desc *desc, uint8_t address, uint8_t data)
 Write data to ADP5055.
 
int adp5055_read_status (struct adp5055_desc *desc, uint8_t *status_val)
 Read statuses.
 
int adp5055_set_enable_mode (struct adp5055_desc *desc, enum adp5055_en_mode mode)
 Configures enabling for all individual channels by hardware and/or software.
 
int adp5055_set_dvs_auto (struct adp5055_desc *desc, bool en)
 Enables or disables dynamic voltage scaling across all channels.
 
int adp5055_set_ocp_blanking (struct adp5055_desc *desc, bool en)
 Enables or disables overcurrent protection (OCP) blanking for all channels.
 
int adp5055_set_auto_pwm_psm (struct adp5055_desc *desc, enum adp5055_channel ch, bool en)
 Enables or disables automatic PWM/PSM per channel.
 
int adp5055_set_output_discharge (struct adp5055_desc *desc, enum adp5055_channel ch, bool en)
 Enables or disables output discharge per channel.
 
int adp5055_set_enable_disable_delay (struct adp5055_desc *desc, enum adp5055_channel ch, enum adp5055_en_dly en_dly, enum adp5055_dis_dly dis_dly)
 Sets both enable and disable delay per channel.
 
int adp5055_set_vid_code (struct adp5055_desc *desc, enum adp5055_channel ch, uint8_t val)
 Sets 8-bit code of output voltage reference of a channel.
 
int adp5055_start_vout (struct adp5055_desc *desc, enum adp5055_channel ch)
 Initiates output voltage transition on specified channel when dynamic voltage scaling is enabled.
 
int adp5055_enable_channel (struct adp5055_desc *desc, enum adp5055_channel ch, bool en)
 Enables output voltage channel in software.
 
int adp5055_set_dvs_interval (struct adp5055_desc *desc, enum adp5055_channel ch, enum adp5055_dvs_intval intval)
 Sets dynamic voltage scaling interval for each channel.
 
int adp5055_set_vidx_lim (struct adp5055_desc *desc, enum adp5055_channel ch, enum adp5055_vidx_limit lim_type, uint8_t lim_val)
 Sets high or low limit for output voltage reference.
 
int adp5055_set_fast_transient (struct adp5055_desc *desc, enum adp5055_channel ch, enum adp5055_ft_th ft)
 Configures fast transient sensitivity per channel.
 
int adp5055_set_pg_channel_output (struct adp5055_desc *desc, enum adp5055_channel ch, bool en)
 Enables power good signal to external PWRGD hardware pin.
 
int adp5055_set_pg_hw_delay (struct adp5055_desc *desc, bool en)
 Enables a delay in the PWRGD hardware pin.
 
int adp5055_read_pg (struct adp5055_desc *desc, enum adp5055_channel ch, uint8_t *pg_val)
 Reads real-time power good status of specified channel.
 
int adp5055_read_latched_status (struct adp5055_desc *desc, enum adp5055_channel ch, enum adp5055_latch_status lch_status_type, uint8_t *lch_status_val)
 Reads the latched status of a specified channel.
 
int adp5055_init (struct adp5055_desc **desc, struct adp5055_init_param *init_param)
 Initialize the ADP5055 device.
 
int adp5055_remove (struct adp5055_desc *desc)
 Free the resources allocated by the adp5055_init()
 

Detailed Description

Header file for the ADP5055 Driver.

Author
Angelo Catapang (angel.nosp@m.o.ca.nosp@m.tapan.nosp@m.g@an.nosp@m.alog..nosp@m.com)

Copyright 2025(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ ADP5055_CAPABILITY

#define ADP5055_CAPABILITY   0x19

◆ ADP5055_CH1_ON

#define ADP5055_CH1_ON   NO_OS_BIT(0)

◆ ADP5055_CH2_ON

#define ADP5055_CH2_ON   NO_OS_BIT(1)

◆ ADP5055_CH3_ON

#define ADP5055_CH3_ON   NO_OS_BIT(2)

◆ ADP5055_CTRL123

#define ADP5055_CTRL123   0xD1

◆ ADP5055_CTRL_MODE1

#define ADP5055_CTRL_MODE1   0xD3

◆ ADP5055_CTRL_MODE2

#define ADP5055_CTRL_MODE2   0xD4

◆ ADP5055_DIS_DLY_MASK

#define ADP5055_DIS_DLY_MASK   NO_OS_GENMASK(6, 4)

◆ ADP5055_DLY1

#define ADP5055_DLY1   0xD5

◆ ADP5055_DLY2

#define ADP5055_DLY2   0xD6

◆ ADP5055_DLY3

#define ADP5055_DLY3   0xD7

◆ ADP5055_DSCG1_ON

#define ADP5055_DSCG1_ON   NO_OS_BIT(0)

◆ ADP5055_DSCG2_ON

#define ADP5055_DSCG2_ON   NO_OS_BIT(1)

◆ ADP5055_DSCG3_ON

#define ADP5055_DSCG3_ON   NO_OS_BIT(2)

◆ ADP5055_DVS_AUTO

#define ADP5055_DVS_AUTO   NO_OS_BIT(4)

◆ ADP5055_DVS_CFG

#define ADP5055_DVS_CFG   0xDB

◆ ADP5055_DVS_INTVAL1

#define ADP5055_DVS_INTVAL1   NO_OS_GENMASK(1, 0)

◆ ADP5055_DVS_INTVAL2

#define ADP5055_DVS_INTVAL2   NO_OS_GENMASK(3, 2)

◆ ADP5055_DVS_INTVAL3

#define ADP5055_DVS_INTVAL3   NO_OS_GENMASK(5, 4)

◆ ADP5055_DVS_LIM1

#define ADP5055_DVS_LIM1   0xDC

◆ ADP5055_DVS_LIM2

#define ADP5055_DVS_LIM2   0xDD

◆ ADP5055_DVS_LIM3

#define ADP5055_DVS_LIM3   0xDE

◆ ADP5055_EN_DLY_MASK

#define ADP5055_EN_DLY_MASK   NO_OS_GENMASK(2, 0)

◆ ADP5055_EN_MODE_MASK

#define ADP5055_EN_MODE_MASK   NO_OS_GENMASK(1, 0)

◆ ADP5055_FT1_TH

#define ADP5055_FT1_TH   NO_OS_GENMASK(1, 0)

◆ ADP5055_FT2_TH

#define ADP5055_FT2_TH   NO_OS_GENMASK(3, 2)

◆ ADP5055_FT3_TH

#define ADP5055_FT3_TH   NO_OS_GENMASK(5, 4)

◆ ADP5055_FT_CFG

#define ADP5055_FT_CFG   0xDF

◆ ADP5055_INT_LCH

#define ADP5055_INT_LCH   NO_OS_BIT(7)

◆ ADP5055_MODEL_ID

#define ADP5055_MODEL_ID   0xD0

◆ ADP5055_OCP1_LCH

#define ADP5055_OCP1_LCH   NO_OS_BIT(4)

◆ ADP5055_OCP2_LCH

#define ADP5055_OCP2_LCH   NO_OS_BIT(5)

◆ ADP5055_OCP3_LCH

#define ADP5055_OCP3_LCH   NO_OS_BIT(6)

◆ ADP5055_OCP_BLANKING

#define ADP5055_OCP_BLANKING   NO_OS_BIT(7)

◆ ADP5055_PG1_LCH

#define ADP5055_PG1_LCH   NO_OS_BIT(0)

◆ ADP5055_PG1_MASK

#define ADP5055_PG1_MASK   NO_OS_BIT(0)

◆ ADP5055_PG2_LCH

#define ADP5055_PG2_LCH   NO_OS_BIT(1)

◆ ADP5055_PG2_MASK

#define ADP5055_PG2_MASK   NO_OS_BIT(1)

◆ ADP5055_PG3_LCH

#define ADP5055_PG3_LCH   NO_OS_BIT(2)

◆ ADP5055_PG3_MASK

#define ADP5055_PG3_MASK   NO_OS_BIT(2)

◆ ADP5055_PG_CFG

#define ADP5055_PG_CFG   0xE0

◆ ADP5055_PG_READ

#define ADP5055_PG_READ   0xE1

◆ ADP5055_PMBUS_0OHM_ADDRESS

#define ADP5055_PMBUS_0OHM_ADDRESS   0x70

◆ ADP5055_PMBUS_127KOHM_ADDRESS

#define ADP5055_PMBUS_127KOHM_ADDRESS   0x71

◆ ADP5055_PMBUS_14KOHM_ADDRESS

#define ADP5055_PMBUS_14KOHM_ADDRESS   0x71

◆ ADP5055_PMBUS_16KOHM_ADDRESS

#define ADP5055_PMBUS_16KOHM_ADDRESS   0x72

◆ ADP5055_PMBUS_200KOHM_ADDRESS

#define ADP5055_PMBUS_200KOHM_ADDRESS   0x72

◆ ADP5055_PMBUS_20KOHM_ADDRESS

#define ADP5055_PMBUS_20KOHM_ADDRESS   0x73

◆ ADP5055_PMBUS_23KOHM_ADDRESS

#define ADP5055_PMBUS_23KOHM_ADDRESS   0x70

◆ ADP5055_PMBUS_32KOHM_ADDRESS

#define ADP5055_PMBUS_32KOHM_ADDRESS   0x71

◆ ADP5055_PMBUS_39KOHM_ADDRESS

#define ADP5055_PMBUS_39KOHM_ADDRESS   0x73

◆ ADP5055_PMBUS_47KOHM_ADDRESS

#define ADP5055_PMBUS_47KOHM_ADDRESS   0x71

◆ ADP5055_PMBUS_511KOHM_ADDRESS

#define ADP5055_PMBUS_511KOHM_ADDRESS   0x73

◆ ADP5055_PMBUS_57KOHM_ADDRESS

#define ADP5055_PMBUS_57KOHM_ADDRESS   0x72

◆ ADP5055_PMBUS_71KOHM_ADDRESS

#define ADP5055_PMBUS_71KOHM_ADDRESS   0x73

◆ ADP5055_PMBUS_90KOHM_ADDRESS

#define ADP5055_PMBUS_90KOHM_ADDRESS   0x70

◆ ADP5055_PMBUS_OPEN_ADDRESS

#define ADP5055_PMBUS_OPEN_ADDRESS   0x70

◆ ADP5055_PSM1_ON

#define ADP5055_PSM1_ON   NO_OS_BIT(4)

◆ ADP5055_PSM2_ON

#define ADP5055_PSM2_ON   NO_OS_BIT(5)

◆ ADP5055_PSM3_ON

#define ADP5055_PSM3_ON   NO_OS_BIT(6)

◆ ADP5055_PWRGD1

#define ADP5055_PWRGD1   NO_OS_BIT(0)

◆ ADP5055_PWRGD2

#define ADP5055_PWRGD2   NO_OS_BIT(1)

◆ ADP5055_PWRGD3

#define ADP5055_PWRGD3   NO_OS_BIT(2)

◆ ADP5055_PWRGD_DLY

#define ADP5055_PWRGD_DLY   NO_OS_BIT(4)

◆ ADP5055_STATUS_CML

#define ADP5055_STATUS_CML   0x7E

◆ ADP5055_STATUS_LCH

#define ADP5055_STATUS_LCH   0xE2

◆ ADP5055_TSD_LCH

#define ADP5055_TSD_LCH   NO_OS_BIT(3)

◆ ADP5055_VID1

#define ADP5055_VID1   0xD8

◆ ADP5055_VID1_GO

#define ADP5055_VID1_GO   NO_OS_BIT(0)

◆ ADP5055_VID2

#define ADP5055_VID2   0xD9

◆ ADP5055_VID2_GO

#define ADP5055_VID2_GO   NO_OS_BIT(1)

◆ ADP5055_VID3

#define ADP5055_VID3   0xDA

◆ ADP5055_VID3_GO

#define ADP5055_VID3_GO   NO_OS_BIT(2)

◆ ADP5055_VID_GO

#define ADP5055_VID_GO   0xD2

◆ ADP5055_VIDX_HIGH_MASK

#define ADP5055_VIDX_HIGH_MASK   NO_OS_GENMASK(7, 4)

◆ ADP5055_VIDX_LOW_MASK

#define ADP5055_VIDX_LOW_MASK   NO_OS_GENMASK(3, 0)

Enumeration Type Documentation

◆ adp5055_channel

Enumerator
ADP5055_VOUT1 
ADP5055_VOUT2 
ADP5055_VOUT3 

◆ adp5055_dis_dly

Enumerator
ADP5055_DIS_NO_DELAY 
ADP5055_DIS_2TSET 
ADP5055_DIS_4TSET 
ADP5055_DIS_6TSET 
ADP5055_DIS_8TSET 
ADP5055_DIS_10TSET 
ADP5055_DIS_12TSET 
ADP5055_DIS_14TSET 

◆ adp5055_dvs_intval

Enumerator
ADP5055_DVS_INTVAL_125US 
ADP5055_DVS_INTVAL_62US 
ADP5055_DVS_INTVAL_31US 
ADP5055_DVS_INTVAL_15US 

◆ adp5055_en_dly

Enumerator
ADP5055_EN_NO_DELAY 
ADP5055_EN_1TSET 
ADP5055_EN_2TSET 
ADP5055_EN_3TSET 
ADP5055_EN_4TSET 
ADP5055_EN_5TSET 
ADP5055_EN_6TSET 
ADP5055_EN_7TSET 

◆ adp5055_en_mode

Enumerator
ADP5055_EN_MODE_HW_ONLY 
ADP5055_EN_MODE_SW_ONLY 
ADP5055_EN_MODE_HW_AND_SW 
ADP5055_EN_MODE_HW_OR_SW 

◆ adp5055_ft_th

Enumerator
ADP5055_FT_NONE 
ADP5055_FT_1_5WINDOW_3G 
ADP5055_FT_1_5WINDOW_5G 
ADP5055_FT_2_5WINDOW_5G 

◆ adp5055_latch_status

Enumerator
ADP5055_LCH_INIT_FAIL 
ADP5055_LCH_OVERCURRENT_HICCUP 
ADP5055_LCH_THERMAL_SHUTDOWN 
ADP5055_LCH_PG_FAIL 

◆ adp5055_vidx_limit

Enumerator
ADP5055_VIDX_LOW 
ADP5055_VIDX_HIGH 

Function Documentation

◆ adp5055_enable_channel()

int adp5055_enable_channel ( struct adp5055_desc * desc,
enum adp5055_channel ch,
bool en )

Enables output voltage channel in software.

Enable/disable ADP5055 output channels.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
en- Channel enable or disable
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_init()

int adp5055_init ( struct adp5055_desc ** desc,
struct adp5055_init_param * init_param )

Initialize the ADP5055 device.

Initialize the ADP5055 device descriptor.

Parameters
desc- ADP5055 device descriptor
init_param- Initialization parameter containing information about the ADP5055 device to be initialized.
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_read()

int adp5055_read ( struct adp5055_desc * desc,
uint8_t address,
uint8_t * data )

Read data from ADP5055.

Read command from ADP5055 device.

Parameters
desc- ADP5055 device descriptor
address- 8-bit ADP5055 register address
data- Buffer with received data
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_read_latched_status()

int adp5055_read_latched_status ( struct adp5055_desc * desc,
enum adp5055_channel ch,
enum adp5055_latch_status lch_status_type,
uint8_t * lch_status_val )

Reads the latched status of a specified channel.

Read ADP5055 latched status.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
lch_status_type- Selects which latch status to read
lch_status_val- Stores the latch status value of the specified channel
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_read_pg()

int adp5055_read_pg ( struct adp5055_desc * desc,
enum adp5055_channel ch,
uint8_t * pg_val )

Reads real-time power good status of specified channel.

Read ADP5055 power-good status per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
pg_val- Stores the value of the real-time power good status
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_read_status()

int adp5055_read_status ( struct adp5055_desc * desc,
uint8_t * status_val )

Read statuses.

Read ADP5055 CML status.

Parameters
desc- ADP5055 device descriptor
status_val- Status value to be returned.
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_remove()

int adp5055_remove ( struct adp5055_desc * desc)

Free the resources allocated by the adp5055_init()

Remove resources allocated by the init function.

Parameters
desc- ADP5055 device descriptor
Returns
- 0 in case of succes, negative error code otherwise

◆ adp5055_set_auto_pwm_psm()

int adp5055_set_auto_pwm_psm ( struct adp5055_desc * desc,
enum adp5055_channel ch,
bool en )

Enables or disables automatic PWM/PSM per channel.

Enable/disable ADP5055 auto PWM/PSM mode per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
en- If true, enables automatic PWM/PSM on specified channel
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_dvs_auto()

int adp5055_set_dvs_auto ( struct adp5055_desc * desc,
bool en )

Enables or disables dynamic voltage scaling across all channels.

Enable/disable ADP5055 dynamic voltage scaling (DVS) auto mode.

Parameters
desc- ADP5055 device descriptor
en- If true, output voltage transitions only with a write to the VIDx_GO
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_dvs_interval()

int adp5055_set_dvs_interval ( struct adp5055_desc * desc,
enum adp5055_channel ch,
enum adp5055_dvs_intval intval )

Sets dynamic voltage scaling interval for each channel.

Set ADP5055 DVS interval per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
intval- Dynamic voltage scaling interval setting
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_enable_disable_delay()

int adp5055_set_enable_disable_delay ( struct adp5055_desc * desc,
enum adp5055_channel ch,
enum adp5055_en_dly en_dly,
enum adp5055_dis_dly dis_dly )

Sets both enable and disable delay per channel.

Set ADP5055 enable and disable delay time per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
en_dly- Enable delay on the specified channel
dis_dly- Disable delay on the specified channel
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_enable_mode()

int adp5055_set_enable_mode ( struct adp5055_desc * desc,
enum adp5055_en_mode mode )

Configures enabling for all individual channels by hardware and/or software.

Set ADP5055 HW/SW enable mode.

Parameters
desc- ADP5055 device descriptor
mode- Enable mode
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_fast_transient()

int adp5055_set_fast_transient ( struct adp5055_desc * desc,
enum adp5055_channel ch,
enum adp5055_ft_th ft )

Configures fast transient sensitivity per channel.

Set ADP5055 fast transient.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
ft- Fast transient setting
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_ocp_blanking()

int adp5055_set_ocp_blanking ( struct adp5055_desc * desc,
bool en )

Enables or disables overcurrent protection (OCP) blanking for all channels.

Enable/disable ADP5055 overcurrent protection blanking during DVS transition.

Parameters
desc- ADP5055 device descriptor
en- If true, enables OCP blanking
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_output_discharge()

int adp5055_set_output_discharge ( struct adp5055_desc * desc,
enum adp5055_channel ch,
bool en )

Enables or disables output discharge per channel.

Enable/disable ADP5055 output discharge path per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
en- If true, enables output discharge on the specified channel
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_pg_channel_output()

int adp5055_set_pg_channel_output ( struct adp5055_desc * desc,
enum adp5055_channel ch,
bool en )

Enables power good signal to external PWRGD hardware pin.

Enable/disable ADP5055 power-good signal outputs per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
en- If true, power good signal of specified channel is outputted at external PWRGD hardware pin
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_pg_hw_delay()

int adp5055_set_pg_hw_delay ( struct adp5055_desc * desc,
bool en )

Enables a delay in the PWRGD hardware pin.

Enable/disable hardware power-good signal delay.

Parameters
desc- ADP5055 device descriptor
en- If false, PWRGD pin responds immediately
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_vid_code()

int adp5055_set_vid_code ( struct adp5055_desc * desc,
enum adp5055_channel ch,
uint8_t val )

Sets 8-bit code of output voltage reference of a channel.

Set ADP5055 VID code per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
val- 8-bit code of output voltage reference (Vref = 408mV + (1.5mV * val))
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_set_vidx_lim()

int adp5055_set_vidx_lim ( struct adp5055_desc * desc,
enum adp5055_channel ch,
enum adp5055_vidx_limit lim_type,
uint8_t lim_val )

Sets high or low limit for output voltage reference.

Set ADP5055 VID code high/low limits per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
lim_type- Selects whether high or low limit is set
lim_val- 4-bit code of high / low output voltage reference limit
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_start_vout()

int adp5055_start_vout ( struct adp5055_desc * desc,
enum adp5055_channel ch )

Initiates output voltage transition on specified channel when dynamic voltage scaling is enabled.

Start ADP5055 Vout transition per channel.

Parameters
desc- ADP5055 device descriptor
ch- ADP5055 output channel
Returns
0 in case of succes, negative error code otherwise

◆ adp5055_write()

int adp5055_write ( struct adp5055_desc * desc,
uint8_t address,
uint8_t data )

Write data to ADP5055.

Write command to ADP5055 device.

Parameters
desc- ADP5055 device descriptor
address- 8-bit ADP5055 register address
data- Data byte value to write to the ADP5055
Returns
0 in case of succes, negative error code otherwise