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

Header file of the MAX17616 Driver. More...

#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#include "no_os_util.h"
#include "no_os_i2c.h"
Include dependency graph for max17616.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  max17616_status
 
struct  max17616_chip_specific_info
 
struct  max17616_chip_info
 
struct  max17616_dev
 
struct  max17616_init_param
 
struct  max17616_fault_info
 
struct  max17616_telemetry
 Telemetry data structure with milliunits. More...
 

Macros

#define MAX17616_DS_0B   (0 << 8) /* Send-only command */
 
#define MAX17616_DS_1B   (1 << 8) /* Byte */
 
#define MAX17616_DS_2B   (2 << 8) /* Word */
 
#define MAX17616_DS_3B   (3 << 8) /* Block of size 3*/
 
#define MAX17616_DS_5B   (5 << 8) /* Block of size 5*/
 
#define MAX17616_DS_9B   (9 << 8) /* Block of size 9*/
 
#define MAX17616_DS_10B   (10 << 8) /* Block of size 10*/
 
#define MAX17616_DF_NONE   (0 << 12) /* None */
 
#define MAX17616_DF_LINEAR11   (1 << 12) /* Linear 11 */
 
#define MAX17616_DF_LINEAR16   (2 << 12) /* Linear 16 */
 
#define MAX17616_DF_DIRECT   (3 << 12) /* Direct */
 
#define MAX17616_DF_VID   (4 << 12) /* VID */
 
#define MAX17616_DF_IEEE754   (5 << 12) /* IEEE754 */
 
#define MAX17616_CMD(x)
 
#define MAX17616_DATA_SIZE(x)
 
#define MAX17616_DATA_FORMAT(x)
 
#define MAX17616_OPERATION   (MAX17616_DS_1B | 0x01)
 
#define MAX17616_CLEAR_FAULTS   (MAX17616_DS_0B | 0x03)
 
#define MAX17616_CAPABILITY   (MAX17616_DS_1B | 0x19)
 
#define MAX17616_SMBALERT_MASK   (MAX17616_DS_1B | 0x1B)
 
#define MAX17616_VOUT_UV_FAULT_LIMIT   (MAX17616_DS_1B | 0x44)
 
#define MAX17616_STATUS_BYTE   (MAX17616_DS_1B | 0x78)
 
#define MAX17616_STATUS_WORD   (MAX17616_DS_2B | 0x79)
 
#define MAX17616_STATUS_VOUT   (MAX17616_DS_1B | 0x7A)
 
#define MAX17616_STATUS_IOUT   (MAX17616_DS_1B | 0x7B)
 
#define MAX17616_STATUS_INPUT   (MAX17616_DS_1B | 0x7C)
 
#define MAX17616_STATUS_TEMPERATURE   (MAX17616_DS_1B | 0x7D)
 
#define MAX17616_STATUS_CML   (MAX17616_DS_1B | 0x7E)
 
#define MAX17616_STATUS_MFR_SPECIFIC   (MAX17616_DS_1B | 0x80)
 
#define MAX17616_READ_VIN   (MAX17616_DF_DIRECT | MAX17616_DS_2B | 0x88)
 
#define MAX17616_READ_VOUT   (MAX17616_DF_DIRECT | MAX17616_DS_2B | 0x8B)
 
#define MAX17616_READ_IOUT   (MAX17616_DF_DIRECT | MAX17616_DS_2B | 0x8C)
 
#define MAX17616_READ_TEMPERATURE_1   (MAX17616_DF_DIRECT | MAX17616_DS_2B | 0x8D)
 
#define MAX17616_PMBUS_REVISION   (MAX17616_DS_2B | 0x98)
 
#define MAX17616_MFR_ID   (MAX17616_DS_5B | 0x99)
 
#define MAX17616_MFR_MODEL   (MAX17616_DS_10B | 0x9A)
 
#define MAX17616_MFR_REVISION   (MAX17616_DS_3B | 0x9B)
 
#define MAX17616_SET_CLMODE   (MAX17616_DS_1B | 0xC4)
 
#define MAX17616_SET_ISTART_RATIO   (MAX17616_DS_1B | 0xC5)
 
#define MAX17616_SET_TSTOC   (MAX17616_DS_1B | 0xC6)
 
#define MAX17616_SET_ISTLIM   (MAX17616_DS_1B | 0xC7)
 
#define MAX17616_IC_DEVICE_ID   (MAX17616_DS_9B | 0xAD)
 
#define MAX17616_IC_DEVICE_REV   (MAX17616_DS_3B | 0xAE)
 
#define MAX17616_STATUS_BYTE_TYPE_MSK   0x01
 
#define MAX17616_STATUS_VOUT_TYPE_MSK   0x02
 
#define MAX17616_STATUS_IOUT_TYPE_MSK   0x04
 
#define MAX17616_STATUS_INPUT_TYPE_MSK   0x08
 
#define MAX17616_STATUS_TEMP_TYPE_MSK   0x10
 
#define MAX17616_STATUS_CML_TYPE_MSK   0x20
 
#define MAX17616_STATUS_MFR_SPECIFIC_TYPE_MSK   0x40
 
#define MAX17616_STATUS_WORD_TYPE_MSK   0x80
 
#define MAX17616_STATUS_ALL_TYPE_MSK   0xFF
 
#define MAX17616_MAX_BLOCK_SIZE   255
 
#define MAX17616_DIRECT_EXPONENT_SCALE   10 /* 10^(-R) for R=-1 */
 
#define MAX17616_MILLIUNIT_SCALE   1000 /* mV, mA, m°C conversion */
 
#define STATIC   static
 
#define MAX17616_CLMODE_MASK   NO_OS_GENMASK(7, 6)
 
#define MAX17616_CLMODE_LATCH_OFF_BITS   0x00
 
#define MAX17616_CLMODE_CONTINUOUS_BITS   0x01
 
#define MAX17616_CLMODE_AUTO_RETRY_BITS   0x02
 
#define MAX17616_ISTART_MASK   NO_OS_GENMASK(3, 0)
 
#define MAX17616_ISTART_FULL_BITS   0x00
 
#define MAX17616_ISTART_HALF_BITS   0x01
 
#define MAX17616_ISTART_QUARTER_BITS   0x02
 
#define MAX17616_ISTART_EIGHTH_BITS   0x03
 
#define MAX17616_ISTART_SIXTEENTH_BITS   0x04
 
#define MAX17616_TIMEOUT_MASK   NO_OS_GENMASK(1, 0)
 
#define MAX17616_TIMEOUT_400US_BITS   0x00
 
#define MAX17616_TIMEOUT_1MS_BITS   0x01
 
#define MAX17616_TIMEOUT_4MS_BITS   0x02
 
#define MAX17616_TIMEOUT_24MS_BITS   0x03
 
#define MAX17616_OC_LIMIT_MASK   NO_OS_GENMASK(1, 0)
 
#define MAX17616_OC_LIMIT_1_25_BITS   0x00
 
#define MAX17616_OC_LIMIT_1_50_BITS   0x01
 
#define MAX17616_OC_LIMIT_1_75_BITS   0x02
 
#define MAX17616_OC_LIMIT_2_00_BITS   0x03
 
#define MAX17616_NOMINAL_VOLTAGE_MASK   NO_OS_GENMASK(4, 2)
 
#define MAX17616_NOMINAL_5V_BITS   0x00
 
#define MAX17616_NOMINAL_9V_BITS   0x01
 
#define MAX17616_NOMINAL_12V_BITS   0x02
 
#define MAX17616_NOMINAL_24V_BITS   0x03
 
#define MAX17616_NOMINAL_36V_BITS   0x04
 
#define MAX17616_NOMINAL_48V_BITS   0x05
 
#define MAX17616_NOMINAL_60V_BITS   0x06
 
#define MAX17616_NOMINAL_72V_BITS   0x07
 
#define MAX17616_PGOOD_MASK   NO_OS_GENMASK(1, 0)
 
#define MAX17616_PGOOD_MINUS_10_PERCENT_BITS   0x00
 
#define MAX17616_PGOOD_MINUS_20_PERCENT_BITS   0x01
 
#define MAX17616_PGOOD_MINUS_30_PERCENT_BITS   0x02
 

Enumerations

enum  max17616_chip_id {
  ID_MAX17616 ,
  ID_MAX17616A ,
  ID_MAX17616_CHIP_COUNT
}
 
enum  max17616_current_limit_mode {
  MAX17616_CLMODE_LATCH_OFF = 0x00 ,
  MAX17616_CLMODE_CONTINUOUS = 0x40 ,
  MAX17616_CLMODE_AUTO_RETRY = 0x80
}
 
enum  max17616_istart_ratio {
  MAX17616_ISTART_FULL ,
  MAX17616_ISTART_HALF ,
  MAX17616_ISTART_QUARTER ,
  MAX17616_ISTART_EIGHTH ,
  MAX17616_ISTART_SIXTEENTH
}
 
enum  max17616_overcurrent_timeout {
  MAX17616_TIMEOUT_400US ,
  MAX17616_TIMEOUT_1MS ,
  MAX17616_TIMEOUT_4MS ,
  MAX17616_TIMEOUT_24MS
}
 
enum  max17616_overcurrent_limit {
  MAX17616_OC_LIMIT_1_25 ,
  MAX17616_OC_LIMIT_1_50 ,
  MAX17616_OC_LIMIT_1_75 ,
  MAX17616_OC_LIMIT_2_00
}
 
enum  max17616_nominal_voltage {
  MAX17616_NOMINAL_5V ,
  MAX17616_NOMINAL_9V ,
  MAX17616_NOMINAL_12V ,
  MAX17616_NOMINAL_24V ,
  MAX17616_NOMINAL_36V ,
  MAX17616_NOMINAL_48V ,
  MAX17616_NOMINAL_60V ,
  MAX17616_NOMINAL_72V
}
 
enum  max17616_pgood_threshold {
  MAX17616_PGOOD_MINUS_10_PERCENT = 0x00 ,
  MAX17616_PGOOD_MINUS_20_PERCENT = 0x01 ,
  MAX17616_PGOOD_MINUS_30_PERCENT = 0x02
}
 
enum  max17616_value_type {
  MAX17616_VIN ,
  MAX17616_VOUT ,
  MAX17616_IOUT ,
  MAX17616_TEMP ,
  MAX17616_POWER
}
 
enum  max17616_status_byte {
  MAX17616_STATUS_BIT_GENERAL ,
  MAX17616_STATUS_BIT_CML ,
  MAX17616_STATUS_BIT_TEMPERATURE ,
  MAX17616_STATUS_BIT_VIN_UV ,
  MAX17616_STATUS_BIT_IOUT_OC ,
  MAX17616_STATUS_BIT_VOUT_OV ,
  MAX17616_STATUS_BIT_OFF ,
  MAX17616_STATUS_BIT_BUSY
}
 
enum  max17616_status_word_byte_high {
  MAX17616_STATUS_BIT_STARTUP ,
  MAX17616_STATUS_BIT_OTHER ,
  MAX17616_STATUS_BIT_FANS ,
  MAX17616_STATUS_BIT_POWER_GOOD ,
  MAX17616_STATUS_BIT_MFR ,
  MAX17616_STATUS_BIT_INPUT ,
  MAX17616_STATUS_BIT_IOUT_POUT ,
  MAX17616_STATUS_BIT_VOUT
}
 
enum  max17616_general_bit_fault_byte {
  MAX17616_GENERAL_FAULT_NS_BIT0 ,
  MAX17616_GENERAL_FAULT_NS_BIT1 ,
  MAX17616_GENERAL_FAULT_NS_BIT2 ,
  MAX17616_GENERAL_FAULT_NS_BIT3 ,
  MAX17616_GENERAL_FAULT_NS_BIT4 ,
  MAX17616_GENERAL_FAULT_NS_BIT5 ,
  MAX17616_GENERAL_FAULT_NS_BIT6 ,
  MAX17616_GENERAL_FAULT_NS_BIT7
}
 
enum  max17616_cml_bit_fault_byte {
  MAX17616_CML_FAULT_NS_BIT0 ,
  MAX17616_CML_FAULT_OTHER ,
  MAX17616_CML_FAULT_NS_BIT2 ,
  MAX17616_CML_FAULT_NS_BIT3 ,
  MAX17616_CML_FAULT_MEM_ERROR ,
  MAX17616_CML_FAULT_PEC_FAIL ,
  MAX17616_CML_FAULT_DATA ,
  MAX17616_CML_FAULT_CMD
}
 
enum  max17616_temperature_bit_fault_byte {
  MAX17616_TEMPERATURE_FAULT_NS_BIT0 ,
  MAX17616_TEMPERATURE_FAULT_NS_BIT1 ,
  MAX17616_TEMPERATURE_FAULT_NS_BIT2 ,
  MAX17616_TEMPERATURE_FAULT_NS_BIT3 ,
  MAX17616_TEMPERATURE_FAULT_UT_FAULT ,
  MAX17616_TEMPERATURE_FAULT_UT_WARNING ,
  MAX17616_TEMPERATURE_FAULT_OT_WARNING ,
  MAX17616_TEMPERATURE_FAULT_OT_FAULT
}
 
enum  max17616_input_fault_bit {
  MAX17616_INPUT_FAULT_PIN_OP_WARNING ,
  MAX17616_INPUT_FAULT_IIN_OC_WARNING ,
  MAX17616_INPUT_FAULT_IIN_OC_FAULT ,
  MAX17616_INPUT_FAULT_UNIT_OFF ,
  MAX17616_INPUT_FAULT_VIN_UV_FAULT ,
  MAX17616_INPUT_FAULT_VIN_UV_WARNING ,
  MAX17616_INPUT_FAULT_VIN_OV_WARNING ,
  MAX17616_INPUT_FAULT_VIN_OV_FAULT
}
 
enum  max17616_iout_fault_bit {
  MAX17616_IOUT_FAULT_NS_BIT0 ,
  MAX17616_IOUT_FAULT_NS_BIT1 ,
  MAX17616_IOUT_FAULT_NS_BIT2 ,
  MAX17616_IOUT_FAULT_NS_BIT3 ,
  MAX17616_IOUT_FAULT_NS_BIT4 ,
  MAX17616_IOUT_FAULT_OUT_OC_WARNING ,
  MAX17616_IOUT_FAULT_OUT_OC_UV_LO ,
  MAX17616_IOUT_FAULT_OUT_OC_FAULT
}
 
enum  max17616_vout_fault_bit {
  MAX17616_VOUT_FAULT_VOUT_TRACKING_ERROR ,
  MAX17616_VOUT_FAULT_TOFF_MAX_WARNING ,
  MAX17616_VOUT_FAULT_TON_MAX_FAULT ,
  MAX17616_VOUT_FAULT_VOUT_MAX_WARNING ,
  MAX17616_VOUT_FAULT_VOUT_UV_FAULT ,
  MAX17616_VOUT_FAULT_VOUT_UV_WARNING ,
  MAX17616_VOUT_FAULT_VOUT_OV_WARNING ,
  MAX17616_VOUT_FAULT_VOUT_OV_FAULT
}
 
enum  max17616_mfr_specific_fault_bit {
  MAX17616_MFR_FAULT_NS_BIT0 ,
  MAX17616_MFR_FAULT_NS_BIT1 ,
  MAX17616_MFR_FAULT_REVERSE_CURRENT ,
  MAX17616_MFR_FAULT_OUTPUT_SHORT_CIRCUIT ,
  MAX17616_MFR_FAULT_NS_BIT4 ,
  MAX17616_MFR_FAULT_SOFT_START ,
  MAX17616_MFR_FAULT_IMON_PIN ,
  MAX17616_MFR_FAULT_SETI_PIN
}
 
enum  max17616_fault_group {
  MAX17616_FAULT_GRP_NONE = 0x00 ,
  MAX17616_FAULT_GRP_CML = 0x01 ,
  MAX17616_FAULT_GRP_TEMPERATURE = 0x02 ,
  MAX17616_FAULT_GRP_VIN_UV = 0x04 ,
  MAX17616_FAULT_GRP_IOUT_OC = 0x08 ,
  MAX17616_FAULT_GRP_VOUT_OV = 0x10 ,
  MAX17616_FAULT_GRP_INPUT = 0x20 ,
  MAX17616_FAULT_GRP_IOUT_POUT = 0x40 ,
  MAX17616_FAULT_GRP_VOUT = 0x80 ,
  MAX17616_FAULT_GRP_MFR_SPECIFIC = 0x100 ,
  MAX17616_FAULT_GRP_ALL = 0xFFFF
}
 

Functions

int max17616_init (struct max17616_dev **dev, struct max17616_init_param *init_param)
 Initialize the device structure.
 
int max17616_remove (struct max17616_dev *dev)
 Free or remove device instance.
 
int max17616_clear_faults (struct max17616_dev *dev)
 Clear all asserted faults.
 
int max17616_write_byte (struct max17616_dev *dev, uint8_t cmd, uint8_t value)
 Perform a raw PMBus write byte operation.
 
int max17616_read_block_data (struct max17616_dev *dev, uint8_t cmd, uint8_t *data, size_t nbytes)
 Perform a PMBus read block operation.
 
int max17616_read_word (struct max17616_dev *dev, uint8_t cmd, uint16_t *word)
 Perform a raw PMBus read word operation.
 
int max17616_send_byte (struct max17616_dev *dev, uint8_t cmd)
 Send a PMBus command to the device.
 
int max17616_read_byte (struct max17616_dev *dev, uint8_t cmd, uint8_t *data)
 Perform a raw PMBus read byte operation.
 
int max17616_read_status (struct max17616_dev *dev, struct max17616_status *status)
 Read MAX17616 device status.
 
const char * max17616_get_fault_description (uint16_t group, uint8_t bit)
 Get human-readable description for a specific fault.
 
int max17616_read_value (struct max17616_dev *dev, enum max17616_value_type value_type, int32_t *value_milliunit)
 Read a specific value with automatic data conversion.
 
int max17616_set_operation_state (struct max17616_dev *dev, bool enable)
 Set device operation state.
 
int max17616_get_operation_state (struct max17616_dev *dev, bool *enabled)
 Get device operation state.
 
int max17616_set_current_limit_mode (struct max17616_dev *dev, enum max17616_current_limit_mode clmode)
 Set current limit mode.
 
int max17616_get_current_limit_mode (struct max17616_dev *dev, enum max17616_current_limit_mode *clmode)
 Get current limit mode.
 
int max17616_set_istart_ratio (struct max17616_dev *dev, enum max17616_istart_ratio ratio)
 Set current start ratio.
 
int max17616_get_istart_ratio (struct max17616_dev *dev, enum max17616_istart_ratio *istart_ratio)
 Get current start ratio.
 
int max17616_set_overcurrent_timeout (struct max17616_dev *dev, enum max17616_overcurrent_timeout timeout)
 Set short-term overcurrent duration.
 
int max17616_get_overcurrent_timeout (struct max17616_dev *dev, enum max17616_overcurrent_timeout *timeout)
 Get short-term overcurrent duration.
 
int max17616_set_overcurrent_limit (struct max17616_dev *dev, enum max17616_overcurrent_limit limit)
 Set the short-term overcurrent limit ratio.
 
int max17616_get_overcurrent_limit (struct max17616_dev *dev, enum max17616_overcurrent_limit *istlim)
 Get the short-term overcurrent limit ratio.
 
int max17616_set_vout_uv_fault_limit_config (struct max17616_dev *dev, enum max17616_nominal_voltage voltage, enum max17616_pgood_threshold threshold)
 Set VOUT UV fault limit configuration using enums.
 
int max17616_get_vout_uv_fault_limit_config (struct max17616_dev *dev, enum max17616_nominal_voltage *voltage, enum max17616_pgood_threshold *threshold)
 Get VOUT UV fault limit configuration using enums.
 
int max17616_read_capability (struct max17616_dev *dev, uint8_t *capability)
 Read device capability register.
 
int max17616_read_telemetry_all (struct max17616_dev *dev, struct max17616_telemetry *telemetry)
 Read comprehensive telemetry data.
 
int max17616_read_status_byte (struct max17616_dev *dev, uint8_t *status_byte)
 Read STATUS_BYTE register.
 
int max17616_read_status_vout (struct max17616_dev *dev, uint8_t *status_vout)
 Read STATUS_VOUT register.
 
int max17616_read_status_iout (struct max17616_dev *dev, uint8_t *status_iout)
 Read STATUS_IOUT register.
 
int max17616_read_status_input (struct max17616_dev *dev, uint8_t *status_input)
 Read STATUS_INPUT register.
 
int max17616_read_status_temperature (struct max17616_dev *dev, uint8_t *status_temperature)
 Read STATUS_TEMPERATURE register.
 
int max17616_read_status_cml (struct max17616_dev *dev, uint8_t *status_cml)
 Read STATUS_CML register.
 
int max17616_read_status_mfr_specific (struct max17616_dev *dev, uint8_t *status_mfr)
 Read STATUS_MFR_SPECIFIC register.
 
int max17616_verify_manufacturer_id (struct max17616_dev *dev)
 Read and verify manufacturer ID.
 
int max17616_identify_chip_variant (struct max17616_dev *dev)
 Read device ID and identify chip variant.
 
int max17616_verify_pmbus_revision (struct max17616_dev *dev)
 Verify PMBus revision.
 

Detailed Description

Header file of the MAX17616 Driver.

Author
Carlos Jones (carlo.nosp@m.sjr..nosp@m.jones.nosp@m.@ana.nosp@m.log.c.nosp@m.om)

Copyright 2025(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ MAX17616_CAPABILITY

#define MAX17616_CAPABILITY   (MAX17616_DS_1B | 0x19)

◆ MAX17616_CLEAR_FAULTS

#define MAX17616_CLEAR_FAULTS   (MAX17616_DS_0B | 0x03)

◆ MAX17616_CLMODE_AUTO_RETRY_BITS

#define MAX17616_CLMODE_AUTO_RETRY_BITS   0x02

◆ MAX17616_CLMODE_CONTINUOUS_BITS

#define MAX17616_CLMODE_CONTINUOUS_BITS   0x01

◆ MAX17616_CLMODE_LATCH_OFF_BITS

#define MAX17616_CLMODE_LATCH_OFF_BITS   0x00

◆ MAX17616_CLMODE_MASK

#define MAX17616_CLMODE_MASK   NO_OS_GENMASK(7, 6)

◆ MAX17616_CMD

#define MAX17616_CMD ( x)
Value:
((uint8_t)(x & 0xFF))

◆ MAX17616_DATA_FORMAT

#define MAX17616_DATA_FORMAT ( x)
Value:
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
#define NO_OS_GENMASK(h, l)
Definition no_os_util.h:83

◆ MAX17616_DATA_SIZE

#define MAX17616_DATA_SIZE ( x)
Value:

◆ MAX17616_DF_DIRECT

#define MAX17616_DF_DIRECT   (3 << 12) /* Direct */

◆ MAX17616_DF_IEEE754

#define MAX17616_DF_IEEE754   (5 << 12) /* IEEE754 */

◆ MAX17616_DF_LINEAR11

#define MAX17616_DF_LINEAR11   (1 << 12) /* Linear 11 */

◆ MAX17616_DF_LINEAR16

#define MAX17616_DF_LINEAR16   (2 << 12) /* Linear 16 */

◆ MAX17616_DF_NONE

#define MAX17616_DF_NONE   (0 << 12) /* None */

◆ MAX17616_DF_VID

#define MAX17616_DF_VID   (4 << 12) /* VID */

◆ MAX17616_DIRECT_EXPONENT_SCALE

#define MAX17616_DIRECT_EXPONENT_SCALE   10 /* 10^(-R) for R=-1 */

Direct exponent scale factor for voltage/current/temperature readings

◆ MAX17616_DS_0B

#define MAX17616_DS_0B   (0 << 8) /* Send-only command */

◆ MAX17616_DS_10B

#define MAX17616_DS_10B   (10 << 8) /* Block of size 10*/

◆ MAX17616_DS_1B

#define MAX17616_DS_1B   (1 << 8) /* Byte */

◆ MAX17616_DS_2B

#define MAX17616_DS_2B   (2 << 8) /* Word */

◆ MAX17616_DS_3B

#define MAX17616_DS_3B   (3 << 8) /* Block of size 3*/

◆ MAX17616_DS_5B

#define MAX17616_DS_5B   (5 << 8) /* Block of size 5*/

◆ MAX17616_DS_9B

#define MAX17616_DS_9B   (9 << 8) /* Block of size 9*/

◆ MAX17616_IC_DEVICE_ID

#define MAX17616_IC_DEVICE_ID   (MAX17616_DS_9B | 0xAD)

◆ MAX17616_IC_DEVICE_REV

#define MAX17616_IC_DEVICE_REV   (MAX17616_DS_3B | 0xAE)

◆ MAX17616_ISTART_EIGHTH_BITS

#define MAX17616_ISTART_EIGHTH_BITS   0x03

◆ MAX17616_ISTART_FULL_BITS

#define MAX17616_ISTART_FULL_BITS   0x00

◆ MAX17616_ISTART_HALF_BITS

#define MAX17616_ISTART_HALF_BITS   0x01

◆ MAX17616_ISTART_MASK

#define MAX17616_ISTART_MASK   NO_OS_GENMASK(3, 0)

◆ MAX17616_ISTART_QUARTER_BITS

#define MAX17616_ISTART_QUARTER_BITS   0x02

◆ MAX17616_ISTART_SIXTEENTH_BITS

#define MAX17616_ISTART_SIXTEENTH_BITS   0x04

◆ MAX17616_MAX_BLOCK_SIZE

#define MAX17616_MAX_BLOCK_SIZE   255

◆ MAX17616_MFR_ID

#define MAX17616_MFR_ID   (MAX17616_DS_5B | 0x99)

◆ MAX17616_MFR_MODEL

#define MAX17616_MFR_MODEL   (MAX17616_DS_10B | 0x9A)

◆ MAX17616_MFR_REVISION

#define MAX17616_MFR_REVISION   (MAX17616_DS_3B | 0x9B)

◆ MAX17616_MILLIUNIT_SCALE

#define MAX17616_MILLIUNIT_SCALE   1000 /* mV, mA, m°C conversion */

◆ MAX17616_NOMINAL_12V_BITS

#define MAX17616_NOMINAL_12V_BITS   0x02

◆ MAX17616_NOMINAL_24V_BITS

#define MAX17616_NOMINAL_24V_BITS   0x03

◆ MAX17616_NOMINAL_36V_BITS

#define MAX17616_NOMINAL_36V_BITS   0x04

◆ MAX17616_NOMINAL_48V_BITS

#define MAX17616_NOMINAL_48V_BITS   0x05

◆ MAX17616_NOMINAL_5V_BITS

#define MAX17616_NOMINAL_5V_BITS   0x00

◆ MAX17616_NOMINAL_60V_BITS

#define MAX17616_NOMINAL_60V_BITS   0x06

◆ MAX17616_NOMINAL_72V_BITS

#define MAX17616_NOMINAL_72V_BITS   0x07

◆ MAX17616_NOMINAL_9V_BITS

#define MAX17616_NOMINAL_9V_BITS   0x01

◆ MAX17616_NOMINAL_VOLTAGE_MASK

#define MAX17616_NOMINAL_VOLTAGE_MASK   NO_OS_GENMASK(4, 2)

◆ MAX17616_OC_LIMIT_1_25_BITS

#define MAX17616_OC_LIMIT_1_25_BITS   0x00

◆ MAX17616_OC_LIMIT_1_50_BITS

#define MAX17616_OC_LIMIT_1_50_BITS   0x01

◆ MAX17616_OC_LIMIT_1_75_BITS

#define MAX17616_OC_LIMIT_1_75_BITS   0x02

◆ MAX17616_OC_LIMIT_2_00_BITS

#define MAX17616_OC_LIMIT_2_00_BITS   0x03

◆ MAX17616_OC_LIMIT_MASK

#define MAX17616_OC_LIMIT_MASK   NO_OS_GENMASK(1, 0)

◆ MAX17616_OPERATION

#define MAX17616_OPERATION   (MAX17616_DS_1B | 0x01)

◆ MAX17616_PGOOD_MASK

#define MAX17616_PGOOD_MASK   NO_OS_GENMASK(1, 0)

◆ MAX17616_PGOOD_MINUS_10_PERCENT_BITS

#define MAX17616_PGOOD_MINUS_10_PERCENT_BITS   0x00

◆ MAX17616_PGOOD_MINUS_20_PERCENT_BITS

#define MAX17616_PGOOD_MINUS_20_PERCENT_BITS   0x01

◆ MAX17616_PGOOD_MINUS_30_PERCENT_BITS

#define MAX17616_PGOOD_MINUS_30_PERCENT_BITS   0x02

◆ MAX17616_PMBUS_REVISION

#define MAX17616_PMBUS_REVISION   (MAX17616_DS_2B | 0x98)

◆ MAX17616_READ_IOUT

#define MAX17616_READ_IOUT   (MAX17616_DF_DIRECT | MAX17616_DS_2B | 0x8C)

◆ MAX17616_READ_TEMPERATURE_1

#define MAX17616_READ_TEMPERATURE_1   (MAX17616_DF_DIRECT | MAX17616_DS_2B | 0x8D)

◆ MAX17616_READ_VIN

#define MAX17616_READ_VIN   (MAX17616_DF_DIRECT | MAX17616_DS_2B | 0x88)

◆ MAX17616_READ_VOUT

#define MAX17616_READ_VOUT   (MAX17616_DF_DIRECT | MAX17616_DS_2B | 0x8B)

◆ MAX17616_SET_CLMODE

#define MAX17616_SET_CLMODE   (MAX17616_DS_1B | 0xC4)

◆ MAX17616_SET_ISTART_RATIO

#define MAX17616_SET_ISTART_RATIO   (MAX17616_DS_1B | 0xC5)

◆ MAX17616_SET_ISTLIM

#define MAX17616_SET_ISTLIM   (MAX17616_DS_1B | 0xC7)

◆ MAX17616_SET_TSTOC

#define MAX17616_SET_TSTOC   (MAX17616_DS_1B | 0xC6)

◆ MAX17616_SMBALERT_MASK

#define MAX17616_SMBALERT_MASK   (MAX17616_DS_1B | 0x1B)

◆ MAX17616_STATUS_ALL_TYPE_MSK

#define MAX17616_STATUS_ALL_TYPE_MSK   0xFF

◆ MAX17616_STATUS_BYTE

#define MAX17616_STATUS_BYTE   (MAX17616_DS_1B | 0x78)

◆ MAX17616_STATUS_BYTE_TYPE_MSK

#define MAX17616_STATUS_BYTE_TYPE_MSK   0x01

◆ MAX17616_STATUS_CML

#define MAX17616_STATUS_CML   (MAX17616_DS_1B | 0x7E)

◆ MAX17616_STATUS_CML_TYPE_MSK

#define MAX17616_STATUS_CML_TYPE_MSK   0x20

◆ MAX17616_STATUS_INPUT

#define MAX17616_STATUS_INPUT   (MAX17616_DS_1B | 0x7C)

◆ MAX17616_STATUS_INPUT_TYPE_MSK

#define MAX17616_STATUS_INPUT_TYPE_MSK   0x08

◆ MAX17616_STATUS_IOUT

#define MAX17616_STATUS_IOUT   (MAX17616_DS_1B | 0x7B)

◆ MAX17616_STATUS_IOUT_TYPE_MSK

#define MAX17616_STATUS_IOUT_TYPE_MSK   0x04

◆ MAX17616_STATUS_MFR_SPECIFIC

#define MAX17616_STATUS_MFR_SPECIFIC   (MAX17616_DS_1B | 0x80)

◆ MAX17616_STATUS_MFR_SPECIFIC_TYPE_MSK

#define MAX17616_STATUS_MFR_SPECIFIC_TYPE_MSK   0x40

◆ MAX17616_STATUS_TEMP_TYPE_MSK

#define MAX17616_STATUS_TEMP_TYPE_MSK   0x10

◆ MAX17616_STATUS_TEMPERATURE

#define MAX17616_STATUS_TEMPERATURE   (MAX17616_DS_1B | 0x7D)

◆ MAX17616_STATUS_VOUT

#define MAX17616_STATUS_VOUT   (MAX17616_DS_1B | 0x7A)

◆ MAX17616_STATUS_VOUT_TYPE_MSK

#define MAX17616_STATUS_VOUT_TYPE_MSK   0x02

◆ MAX17616_STATUS_WORD

#define MAX17616_STATUS_WORD   (MAX17616_DS_2B | 0x79)

◆ MAX17616_STATUS_WORD_TYPE_MSK

#define MAX17616_STATUS_WORD_TYPE_MSK   0x80

◆ MAX17616_TIMEOUT_1MS_BITS

#define MAX17616_TIMEOUT_1MS_BITS   0x01

◆ MAX17616_TIMEOUT_24MS_BITS

#define MAX17616_TIMEOUT_24MS_BITS   0x03

◆ MAX17616_TIMEOUT_400US_BITS

#define MAX17616_TIMEOUT_400US_BITS   0x00

◆ MAX17616_TIMEOUT_4MS_BITS

#define MAX17616_TIMEOUT_4MS_BITS   0x02

◆ MAX17616_TIMEOUT_MASK

#define MAX17616_TIMEOUT_MASK   NO_OS_GENMASK(1, 0)

◆ MAX17616_VOUT_UV_FAULT_LIMIT

#define MAX17616_VOUT_UV_FAULT_LIMIT   (MAX17616_DS_1B | 0x44)

◆ STATIC

#define STATIC   static

Enumeration Type Documentation

◆ max17616_chip_id

Enumerator
ID_MAX17616 
ID_MAX17616A 
ID_MAX17616_CHIP_COUNT 

◆ max17616_cml_bit_fault_byte

Enumerator
MAX17616_CML_FAULT_NS_BIT0 
MAX17616_CML_FAULT_OTHER 
MAX17616_CML_FAULT_NS_BIT2 
MAX17616_CML_FAULT_NS_BIT3 
MAX17616_CML_FAULT_MEM_ERROR 
MAX17616_CML_FAULT_PEC_FAIL 
MAX17616_CML_FAULT_DATA 
MAX17616_CML_FAULT_CMD 

◆ max17616_current_limit_mode

Enumerator
MAX17616_CLMODE_LATCH_OFF 
MAX17616_CLMODE_CONTINUOUS 
MAX17616_CLMODE_AUTO_RETRY 

◆ max17616_fault_group

Enumerator
MAX17616_FAULT_GRP_NONE 
MAX17616_FAULT_GRP_CML 
MAX17616_FAULT_GRP_TEMPERATURE 
MAX17616_FAULT_GRP_VIN_UV 
MAX17616_FAULT_GRP_IOUT_OC 
MAX17616_FAULT_GRP_VOUT_OV 
MAX17616_FAULT_GRP_INPUT 
MAX17616_FAULT_GRP_IOUT_POUT 
MAX17616_FAULT_GRP_VOUT 
MAX17616_FAULT_GRP_MFR_SPECIFIC 
MAX17616_FAULT_GRP_ALL 

◆ max17616_general_bit_fault_byte

Enumerator
MAX17616_GENERAL_FAULT_NS_BIT0 
MAX17616_GENERAL_FAULT_NS_BIT1 
MAX17616_GENERAL_FAULT_NS_BIT2 
MAX17616_GENERAL_FAULT_NS_BIT3 
MAX17616_GENERAL_FAULT_NS_BIT4 
MAX17616_GENERAL_FAULT_NS_BIT5 
MAX17616_GENERAL_FAULT_NS_BIT6 
MAX17616_GENERAL_FAULT_NS_BIT7 

◆ max17616_input_fault_bit

Enumerator
MAX17616_INPUT_FAULT_PIN_OP_WARNING 
MAX17616_INPUT_FAULT_IIN_OC_WARNING 
MAX17616_INPUT_FAULT_IIN_OC_FAULT 
MAX17616_INPUT_FAULT_UNIT_OFF 
MAX17616_INPUT_FAULT_VIN_UV_FAULT 
MAX17616_INPUT_FAULT_VIN_UV_WARNING 
MAX17616_INPUT_FAULT_VIN_OV_WARNING 
MAX17616_INPUT_FAULT_VIN_OV_FAULT 

◆ max17616_iout_fault_bit

Enumerator
MAX17616_IOUT_FAULT_NS_BIT0 
MAX17616_IOUT_FAULT_NS_BIT1 
MAX17616_IOUT_FAULT_NS_BIT2 
MAX17616_IOUT_FAULT_NS_BIT3 
MAX17616_IOUT_FAULT_NS_BIT4 
MAX17616_IOUT_FAULT_OUT_OC_WARNING 
MAX17616_IOUT_FAULT_OUT_OC_UV_LO 
MAX17616_IOUT_FAULT_OUT_OC_FAULT 

◆ max17616_istart_ratio

Enumerator
MAX17616_ISTART_FULL 
MAX17616_ISTART_HALF 
MAX17616_ISTART_QUARTER 
MAX17616_ISTART_EIGHTH 
MAX17616_ISTART_SIXTEENTH 

◆ max17616_mfr_specific_fault_bit

Enumerator
MAX17616_MFR_FAULT_NS_BIT0 
MAX17616_MFR_FAULT_NS_BIT1 
MAX17616_MFR_FAULT_REVERSE_CURRENT 
MAX17616_MFR_FAULT_OUTPUT_SHORT_CIRCUIT 
MAX17616_MFR_FAULT_NS_BIT4 
MAX17616_MFR_FAULT_SOFT_START 
MAX17616_MFR_FAULT_IMON_PIN 
MAX17616_MFR_FAULT_SETI_PIN 

◆ max17616_nominal_voltage

Enumerator
MAX17616_NOMINAL_5V 
MAX17616_NOMINAL_9V 
MAX17616_NOMINAL_12V 
MAX17616_NOMINAL_24V 
MAX17616_NOMINAL_36V 
MAX17616_NOMINAL_48V 
MAX17616_NOMINAL_60V 
MAX17616_NOMINAL_72V 

◆ max17616_overcurrent_limit

Enumerator
MAX17616_OC_LIMIT_1_25 
MAX17616_OC_LIMIT_1_50 
MAX17616_OC_LIMIT_1_75 
MAX17616_OC_LIMIT_2_00 

◆ max17616_overcurrent_timeout

Enumerator
MAX17616_TIMEOUT_400US 
MAX17616_TIMEOUT_1MS 
MAX17616_TIMEOUT_4MS 
MAX17616_TIMEOUT_24MS 

◆ max17616_pgood_threshold

Enumerator
MAX17616_PGOOD_MINUS_10_PERCENT 
MAX17616_PGOOD_MINUS_20_PERCENT 
MAX17616_PGOOD_MINUS_30_PERCENT 

◆ max17616_status_byte

Enumerator
MAX17616_STATUS_BIT_GENERAL 
MAX17616_STATUS_BIT_CML 
MAX17616_STATUS_BIT_TEMPERATURE 
MAX17616_STATUS_BIT_VIN_UV 
MAX17616_STATUS_BIT_IOUT_OC 
MAX17616_STATUS_BIT_VOUT_OV 
MAX17616_STATUS_BIT_OFF 
MAX17616_STATUS_BIT_BUSY 

◆ max17616_status_word_byte_high

Enumerator
MAX17616_STATUS_BIT_STARTUP 
MAX17616_STATUS_BIT_OTHER 
MAX17616_STATUS_BIT_FANS 
MAX17616_STATUS_BIT_POWER_GOOD 
MAX17616_STATUS_BIT_MFR 
MAX17616_STATUS_BIT_INPUT 
MAX17616_STATUS_BIT_IOUT_POUT 
MAX17616_STATUS_BIT_VOUT 

◆ max17616_temperature_bit_fault_byte

Enumerator
MAX17616_TEMPERATURE_FAULT_NS_BIT0 
MAX17616_TEMPERATURE_FAULT_NS_BIT1 
MAX17616_TEMPERATURE_FAULT_NS_BIT2 
MAX17616_TEMPERATURE_FAULT_NS_BIT3 
MAX17616_TEMPERATURE_FAULT_UT_FAULT 
MAX17616_TEMPERATURE_FAULT_UT_WARNING 
MAX17616_TEMPERATURE_FAULT_OT_WARNING 
MAX17616_TEMPERATURE_FAULT_OT_FAULT 

◆ max17616_value_type

Enumerator
MAX17616_VIN 
MAX17616_VOUT 
MAX17616_IOUT 
MAX17616_TEMP 
MAX17616_POWER 

◆ max17616_vout_fault_bit

Enumerator
MAX17616_VOUT_FAULT_VOUT_TRACKING_ERROR 
MAX17616_VOUT_FAULT_TOFF_MAX_WARNING 
MAX17616_VOUT_FAULT_TON_MAX_FAULT 
MAX17616_VOUT_FAULT_VOUT_MAX_WARNING 
MAX17616_VOUT_FAULT_VOUT_UV_FAULT 
MAX17616_VOUT_FAULT_VOUT_UV_WARNING 
MAX17616_VOUT_FAULT_VOUT_OV_WARNING 
MAX17616_VOUT_FAULT_VOUT_OV_FAULT 

Function Documentation

◆ max17616_clear_faults()

int max17616_clear_faults ( struct max17616_dev * dev)

Clear all asserted faults.

Parameters
dev- Device structure
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_get_current_limit_mode()

int max17616_get_current_limit_mode ( struct max17616_dev * dev,
enum max17616_current_limit_mode * clmode )

Get current limit mode.

Parameters
dev- Device structure
clmode- Pointer to the current limit mode setting
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_get_fault_description()

const char * max17616_get_fault_description ( uint16_t group,
uint8_t bit )

Get human-readable description for a specific fault.

Parameters
group- Fault group identifier
bit- Fault bit position
Returns
Pointer to fault description string or NULL if not found

◆ max17616_get_istart_ratio()

int max17616_get_istart_ratio ( struct max17616_dev * dev,
enum max17616_istart_ratio * istart_ratio )

Get current start ratio.

Parameters
dev- Device structure
istart_ratio- Pointer to the current start ratio setting
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_get_operation_state()

int max17616_get_operation_state ( struct max17616_dev * dev,
bool * enabled )

Get device operation state.

Parameters
dev- Device structure
enabled- Pointer to store operation state
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_get_overcurrent_limit()

int max17616_get_overcurrent_limit ( struct max17616_dev * dev,
enum max17616_overcurrent_limit * istlim )

Get the short-term overcurrent limit ratio.

Parameters
dev- Device structure
istlim- Pointer to store ISTLIM setting
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_get_overcurrent_timeout()

int max17616_get_overcurrent_timeout ( struct max17616_dev * dev,
enum max17616_overcurrent_timeout * timeout )

Get short-term overcurrent duration.

Parameters
dev- Device structure
timeout- Pointer to store short-term overcurrent duration setting
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_get_vout_uv_fault_limit_config()

int max17616_get_vout_uv_fault_limit_config ( struct max17616_dev * dev,
enum max17616_nominal_voltage * voltage,
enum max17616_pgood_threshold * threshold )

Get VOUT UV fault limit configuration using enums.

Parameters
dev- Device structure
voltage- Pointer to store nominal voltage selection
threshold- Pointer to store PGOOD rising threshold
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_identify_chip_variant()

int max17616_identify_chip_variant ( struct max17616_dev * dev)

Read device ID and identify chip variant.

Parameters
dev- Device structure
Returns
0 on success, negative error code otherwise

◆ max17616_init()

int max17616_init ( struct max17616_dev ** device,
struct max17616_init_param * init_param )

Initialize the device structure.

Parameters
device- Device structure
init_param- Initialization parameters
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_block_data()

int max17616_read_block_data ( struct max17616_dev * dev,
uint8_t cmd,
uint8_t * data,
size_t nbytes )

Perform a PMBus read block operation.

Parameters
dev- Device structure
cmd- PMBus command
data- Address of the read block
nbytes- Expected size of the block in bytes (excluding byte count)
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_byte()

int max17616_read_byte ( struct max17616_dev * dev,
uint8_t cmd,
uint8_t * data )

Perform a raw PMBus read byte operation.

Parameters
dev- Device structure
cmd- PMBus command
data- Address of the byte read
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_capability()

int max17616_read_capability ( struct max17616_dev * dev,
uint8_t * capability )

Read device capability register.

Parameters
dev- Device structure
capability- Pointer to store capability byte
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_status()

int max17616_read_status ( struct max17616_dev * dev,
struct max17616_status * status )

Read MAX17616 device status.

Parameters
dev- Device structure
status- Pointer to store status
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_status_byte()

int max17616_read_status_byte ( struct max17616_dev * dev,
uint8_t * status_byte )

Read STATUS_BYTE register.

Parameters
dev- Device structure
status_byte- Pointer to store status byte
Returns
0 on success, negative error code otherwise

◆ max17616_read_status_cml()

int max17616_read_status_cml ( struct max17616_dev * dev,
uint8_t * status_cml )

Read STATUS_CML register.

Parameters
dev- Device structure
status_cml- Pointer to store status CML byte
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_status_input()

int max17616_read_status_input ( struct max17616_dev * dev,
uint8_t * status_input )

Read STATUS_INPUT register.

Parameters
dev- Device structure
status_input- Pointer to store status INPUT byte
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_status_iout()

int max17616_read_status_iout ( struct max17616_dev * dev,
uint8_t * status_iout )

Read STATUS_IOUT register.

Parameters
dev- Device structure
status_iout- Pointer to store status IOUT byte
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_status_mfr_specific()

int max17616_read_status_mfr_specific ( struct max17616_dev * dev,
uint8_t * status_mfr )

Read STATUS_MFR_SPECIFIC register.

Parameters
dev- Device structure
status_mfr- Pointer to store status MFR SPECIFIC byte
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_status_temperature()

int max17616_read_status_temperature ( struct max17616_dev * dev,
uint8_t * status_temperature )

Read STATUS_TEMPERATURE register.

Parameters
dev- Device structure
status_temperature- Pointer to store status TEMPERATURE byte
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_status_vout()

int max17616_read_status_vout ( struct max17616_dev * dev,
uint8_t * status_vout )

Read STATUS_VOUT register.

Parameters
dev- Device structure
status_vout- Pointer to store status VOUT byte
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_telemetry_all()

int max17616_read_telemetry_all ( struct max17616_dev * dev,
struct max17616_telemetry * telemetry )

Read comprehensive telemetry data.

Parameters
dev- Device structure
telemetry- Telemetry structure to populate
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_value()

int max17616_read_value ( struct max17616_dev * dev,
enum max17616_value_type value_type,
int32_t * value_milliunit )

Read a specific value with automatic data conversion.

Parameters
dev- Device structure
value_type- Type of value to read
value_milliunit- Pointer to store the converted value (mV/mA/mW/mC)
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_read_word()

int max17616_read_word ( struct max17616_dev * dev,
uint8_t cmd,
uint16_t * word )

Perform a raw PMBus read word operation.

Parameters
dev- Device structure
cmd- PMBus command
word- Address of the read word
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_remove()

int max17616_remove ( struct max17616_dev * dev)

Free or remove device instance.

Parameters
dev- The device structure
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_send_byte()

int max17616_send_byte ( struct max17616_dev * dev,
uint8_t cmd )

Send a PMBus command to the device.

Parameters
dev- Device structure
cmd- PMBus command
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_set_current_limit_mode()

int max17616_set_current_limit_mode ( struct max17616_dev * dev,
enum max17616_current_limit_mode clmode )

Set current limit mode.

Parameters
dev- Device structure
clmode- Current limit mode setting
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_set_istart_ratio()

int max17616_set_istart_ratio ( struct max17616_dev * dev,
enum max17616_istart_ratio istart_ratio )

Set current start ratio.

Parameters
dev- Device structure
istart_ratio- Current start ratio setting
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_set_operation_state()

int max17616_set_operation_state ( struct max17616_dev * dev,
bool enable )

Set device operation state.

Parameters
dev- Device structure
enable- true to enable, false to disable
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_set_overcurrent_limit()

int max17616_set_overcurrent_limit ( struct max17616_dev * dev,
enum max17616_overcurrent_limit istlimit )

Set the short-term overcurrent limit ratio.

Parameters
dev- Device structure
istlimit- Short-term overcurrent limit ratio setting
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_set_overcurrent_timeout()

int max17616_set_overcurrent_timeout ( struct max17616_dev * dev,
enum max17616_overcurrent_timeout timeout )

Set short-term overcurrent duration.

Parameters
dev- Device structure
timeout- Short-term overcurrent duration setting
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_set_vout_uv_fault_limit_config()

int max17616_set_vout_uv_fault_limit_config ( struct max17616_dev * dev,
enum max17616_nominal_voltage voltage,
enum max17616_pgood_threshold threshold )

Set VOUT UV fault limit configuration using enums.

Parameters
dev- Device structure
voltage- Nominal voltage selection (bits 4:2)
threshold- PGOOD rising threshold (bits 1:0)
Returns
0 on success, negative error code otherwise
Here is the caller graph for this function:

◆ max17616_verify_manufacturer_id()

int max17616_verify_manufacturer_id ( struct max17616_dev * dev)

Read and verify manufacturer ID.

Parameters
dev- Device structure
Returns
0 on success, negative error code otherwise

◆ max17616_verify_pmbus_revision()

int max17616_verify_pmbus_revision ( struct max17616_dev * dev)

Verify PMBus revision.

Parameters
dev- Device structure
Returns
0 on success, negative error code otherwise

◆ max17616_write_byte()

int max17616_write_byte ( struct max17616_dev * dev,
uint8_t cmd,
uint8_t value )

Perform a raw PMBus write byte operation.

Parameters
dev- Device structure
cmd- PMBus command
value- Byte to be written
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function: