no-OS
Classes | Macros | Enumerations | Functions
lt7182s.h File Reference
#include <stdint.h>
#include <string.h>
#include "no_os_util.h"
#include "no_os_i2c.h"
Include dependency graph for lt7182s.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lt7182s_dev
 
struct  lt7182s_init_param
 
struct  lt7182s_chip_info
 
struct  lt7182s_status
 

Macros

#define LT7182S_PAGE   0x00
 
#define LT7182S_OPERATION   0x01
 
#define LT7182S_ON_OFF_CONFIG   0x02
 
#define LT7182S_CLEAR_FAULTS   0x03
 
#define LT7182S_PAGE_PLUS_WRITE   0x05
 
#define LT7182S_PAGE_PLUS_READ   0x06
 
#define LT7182S_ZONE_CONFIG   0x07
 
#define LT7182S_ZONE_ACTIVE   0x08
 
#define LT7182S_WRITE_PROTECT   0x10
 
#define LT7182S_STORE_USER_ALL   0x15
 
#define LT7182S_RESTORE_USER_ALL   0x16
 
#define LT7182S_CAPABILITY   0x19
 
#define LT7182S_QUERY   0x1A
 
#define LT7182S_SMBALERT_MASK   0x1B
 
#define LT7182S_VOUT_MODE   0x20
 
#define LT7182S_VOUT_COMMAND   0x21
 
#define LT7182S_VOUT_MAX   0x24
 
#define LT7182S_VOUT_MARGIN_HIGH   0x25
 
#define LT7182S_VOUT_MARGIN_LOW   0x26
 
#define LT7182S_VOUT_TRANSITION_RATE   0x27
 
#define LT7182S_FREQUENCY_SWITCH   0x33
 
#define LT7182S_VIN_ON   0x35
 
#define LT7182S_VIN_OFF   0x36
 
#define LT7182S_VOUT_OV_FAULT_LIMIT   0x40
 
#define LT7182S_VOUT_OV_FAULT_RESPONSE   0x41
 
#define LT7182S_VOUT_OV_WARN_LIMIT   0x42
 
#define LT7182S_VOUT_UV_WARN_LIMIT   0x43
 
#define LT7182S_VOUT_UV_FAULT_LIMIT   0x44
 
#define LT7182S_VOUT_UV_FAULT_RESPONSE   0x45
 
#define LT7182S_IOUT_OC_FAULT_RESPONSE   0x47
 
#define LT7182S_IOUT_OC_WARN_LIMIT   0x4A
 
#define LT7182S_OT_FAULT_LIMIT   0x4F
 
#define LT7182S_OT_FAULT_RESPONSE   0x50
 
#define LT7182S_OT_WARN_LIMIT   0x51
 
#define LT7182S_VIN_OV_FAULT_RESPONSE   0x56
 
#define LT7182S_VIN_UV_WARN_LIMIT   0x58
 
#define LT7182S_IIN_OC_WARN_LIMIT   0x5D
 
#define LT7182S_TON_DELAY   0x60
 
#define LT7182S_TON_RISE   0x61
 
#define LT7182S_TON_MAX_FAULT_LIMIT   0x62
 
#define LT7182S_TON_MAX_FAULT_RESPONSE   0x63
 
#define LT7182S_TOFF_DELAY   0x64
 
#define LT7182S_TOFF_FALL   0x65
 
#define LT7182S_TOFF_MAX_WARN_LIMIT   0x66
 
#define LT7182S_STATUS_BYTE   0x78
 
#define LT7182S_STATUS_WORD   0x79
 
#define LT7182S_STATUS_VOUT   0x7A
 
#define LT7182S_STATUS_IOUT   0x7B
 
#define LT7182S_STATUS_INPUT   0x7C
 
#define LT7182S_STATUS_TEMPERATURE   0x7D
 
#define LT7182S_STATUS_CML   0x7E
 
#define LT7182S_STATUS_MFR_SPECIFIC   0x80
 
#define LT7182S_READ_VIN   0x88
 
#define LT7182S_READ_IIN   0x89
 
#define LT7182S_READ_VOUT   0x8B
 
#define LT7182S_READ_IOUT   0x8C
 
#define LT7182S_READ_TEMPERATURE_1   0x8D
 
#define LT7182S_READ_FREQUENCY   0x95
 
#define LT7182S_READ_POUT   0x96
 
#define LT7182S_REVISION   0x98
 
#define LT7182S_MFR_ID   0x99
 
#define LT7182S_MFR_MODEL   0x9A
 
#define LT7182S_MFR_REVISION   0x9B
 
#define LT7182S_MFR_SERIAL   0x9E
 
#define LT7182S_IC_DEVICE_ID   0xAD
 
#define LT7182S_IC_DEVICE_REV   0xAE
 
#define LT7182S_MFR_USER_DATA_00   0xC9
 
#define LT7182S_MFR_USER_DATA_01   0xCA
 
#define LT7182S_MFR_USER_DATA_02   0xCB
 
#define LT7182S_MFR_USER_DATA_03   0xCC
 
#define LT7182S_MFR_READ_EXTVCC   0xCD
 
#define LT7182S_MFR_READ_ITH   0xCE
 
#define LT7182S_MFR_CHAN_CONFIG   0xD0
 
#define LT7182S_MFR_CONFIG_ALL   0xD1
 
#define LT7182S_MFR_FAULT_PROPAGATE   0xD2
 
#define LT7182S_MFR_PWM_MODE   0xD4
 
#define LT7182S_MFR_FAULT_RESPONSE   0xD5
 
#define LT7182S_MFR_IOUT_PEAK   0xD7
 
#define LT7182S_MFR_ADC_CONTROL   0xD8
 
#define LT7182S_MFR_RETRY_DELAY   0xDB
 
#define LT7182S_MFR_RESTART_DELAY   0xDC
 
#define LT7182S_MFR_VOUT_PEAK   0xDD
 
#define LT7182S_MFR_VIN_PEAK   0xDE
 
#define LT7182S_MFR_TEMPERATURE_1_PEAK   0xDF
 
#define LT7182S_MFR_CLEAR_PEAKS   0xE3
 
#define LT7182S_MFR_DISCHARGE_THRESHOLD   0xE4
 
#define LT7182S_MFR_PADS   0xE5
 
#define LT7182S_MFR_ADDRESS   0xE6
 
#define LT7182S_MFR_SPECIAL_ID   0xE7
 
#define LT7182S_MFR_FAULT_LOG_TIMESTAMP_MSBS   0xE8
 
#define LT7182S_MFR_FAULT_LOG_TIMESTAMP_LSBS   0xE9
 
#define LT7182S_MFR_FAULT_LOG_STORE   0xEA
 
#define LT7182S_MFR_FAULT_LOG_CLEAR   0xEC
 
#define LT7182S_MFR_FAULT_LOG   0xEE
 
#define LT7182S_MFR_COMMON   0xEF
 
#define LT7182S_MFR_COMPARE_USER_ALL   0xF0
 
#define LT7182S_MFR_CHANNEL_STATE   0xF1
 
#define LT7182S_MFR_PGOOD_DELAY   0xF2
 
#define LT7182S_MFR_NOT_PGOOD_DELAY   0xF3
 
#define LT7182S_MFR_PWM_PHASE   0xF5
 
#define LT7182S_MFR_SYNC_CONFIG   0xF6
 
#define LT7182S_MFR_PIN_CONFIG   0xF7
 
#define LT7182S_MFR_RAIL_ADDRESS   0xFA
 
#define LT7182S_MFR_DISABLE_OUTPUT   0xFB
 
#define LT7182S_MFR_EE_USER_WP   0xFC
 
#define LT7182S_MFR_RESET   0xFD
 
#define LT7182S_CRC_POLYNOMIAL   0x7
 
#define LT7182S_VOUT_MODE_VAL_MSK   NO_OS_GENMASK(4,0)
 
#define LT7182S_LIN11_MANTISSA_MAX   1023L
 
#define LT7182S_LIN11_MANTISSA_MIN   511L
 
#define LT7182S_LIN11_EXPONENT_MAX   15
 
#define LT7182S_LIN11_EXPONENT_MIN   -15
 
#define LT7182S_LIN11_MANTISSA_MSK   NO_OS_GENMASK(10,0)
 
#define LT7182S_LIN11_EXPONENT_MSK   NO_OS_GENMASK(15,11)
 
#define LT7182S_LIN11_EXPONENT(x)   (int16_t)(x) >> 11
 
#define LT7182S_LIN11_MANTISSA(x)   ((int16_t)((x & 0x7FF) << 5)) >> 5
 
#define LT7182S_LIN16_EXPONENT   -12
 
#define LT7182S_IEEE754_SIGN_BIT   NO_OS_BIT(15)
 
#define LT7182S_IEEE754_EXPONENT_MSK   NO_OS_GENMASK(14, 10)
 
#define LT7182S_IEEE754_MANTISSA_MSK   NO_OS_GENMASK(9, 0)
 
#define LT7182S_IEEE754_MAX_MANTISSA   0x7ff
 
#define LT7182S_IEEE754_MIN_MANTISSA   0x400
 
#define LT7182S_FREQ_MIN   400000
 
#define LT7182S_FREQ_MAX   4000000
 
#define LT7182S_VIN_ON_MIN   1400
 
#define LT7182S_VIN_ON_MAX   20000
 
#define LT7182S_VIN_OFF_MIN   1350
 
#define LT7182S_VIN_OFF_MAX   20000
 
#define LT7182S_PHASE_FULL_MILLI   360000
 
#define LT7182S_STATUS_BYTE_TYPE_MSK   0x01
 
#define LT7182S_STATUS_VOUT_TYPE_MSK   0x02
 
#define LT7182S_STATUS_IOUT_TYPE_MSK   0x04
 
#define LT7182S_STATUS_INPUT_TYPE_MSK   0x08
 
#define LT7182S_STATUS_TEMP_TYPE_MSK   0x10
 
#define LT7182S_STATUS_CML_TYPE_MSK   0x20
 
#define LT7182S_STATUS_MFR_SPECIFIC_TYPE_MSK   0x40
 
#define LT7182S_STATUS_WORD_TYPE_MSK   0x80
 
#define LT7182S_STATUS_ALL_TYPE_MSK   0xFF
 
#define LT7182S_PWM_OP_MODE_BIT   NO_OS_BIT(0)
 
#define LT7182S_SYNC_CLK_INPUT_BIT   NO_OS_BIT(1)
 
#define LT7182S_SYNC_CLK_OUTPUT_BIT   NO_OS_BIT(0)
 
#define LT7182S_ADC_CTRL_LOW_FREQ_BIT   NO_OS_BIT(1)
 
#define LT7182S_ADC_CTRL_DEBUG_BIT   NO_OS_BIT(0)
 
#define LT7182S_CONFIG_ALL_FORMAT_BIT   NO_OS_BIT(8)
 
#define LT7182S_CONFIG_ALL_PEC_BIT   NO_OS_BIT(2)
 
#define LT7182S_PADS_RUN0_BIT   NO_OS_BIT(4)
 
#define LT7182S_PADS_RUN1_BIT   NO_OS_BIT(5)
 
#define LT7182S_SPECIAL_ID_VALUE   0x1C1D
 

Enumerations

enum  lt7182s_chip_id {
  ID_LT7182S,
  ID_LT7184S
}
 
enum  lt7182s_output_channel {
  LT7182S_CHAN_0,
  LT7182S_CHAN_1,
  LT7182S_CHAN_ALL = 0xFF
}
 
enum  lt7182s_fault_pin_config {
  LT7182S_FAULT_PIN_INPUT,
  LT7182S_FAULT_PIN_OUTPUT
}
 
enum  lt7182s_data_format {
  LT7182S_DATA_FORMAT_LINEAR,
  LT7182S_DATA_FORMAT_IEEE754
}
 
enum  lt7182s_operation_type {
  LT7182S_OPERATION_OFF = 0x00,
  LT7182S_OPERATION_ON = 0x80,
  LT7182S_OPERATION_MARGIN_HIGH = 0x98,
  LT7182S_OPERATION_MARGIN_LOW = 0xA8,
  LT7182S_OPERATION_SEQ_OFF = 0x40
}
 
enum  lt7182s_value_type {
  LT7182S_VIN = LT7182S_READ_VIN,
  LT7182S_IIN = LT7182S_READ_IIN,
  LT7182S_VOUT = LT7182S_READ_VOUT,
  LT7182S_IOUT = LT7182S_READ_IOUT,
  LT7182S_TEMP = LT7182S_READ_TEMPERATURE_1,
  LT7182S_FREQUENCY = LT7182S_READ_FREQUENCY,
  LT7182S_POUT = LT7182S_READ_POUT,
  LT7182S_ITH = LT7182S_MFR_READ_ITH,
  LT7182S_EXTVCC = LT7182S_MFR_READ_EXTVCC,
  LT7182S_IOUT_PEAK = LT7182S_MFR_IOUT_PEAK,
  LT7182S_VOUT_PEAK = LT7182S_MFR_VOUT_PEAK,
  LT7182S_VIN_PEAK = LT7182S_MFR_VIN_PEAK,
  LT7182S_TEMP_PEAK = LT7182S_MFR_TEMPERATURE_1_PEAK
}
 
enum  lt7182s_limit_type {
  LT7182S_VOUT_OV_FAULT_LIMIT_TYPE = LT7182S_VOUT_OV_FAULT_LIMIT,
  LT7182S_VOUT_OV_WARN_LIMIT_TYPE = LT7182S_VOUT_OV_WARN_LIMIT,
  LT7182S_VOUT_UV_FAULT_LIMIT_TYPE = LT7182S_VOUT_UV_FAULT_LIMIT,
  LT7182S_VOUT_UV_WARN_LIMIT_TYPE = LT7182S_VOUT_UV_WARN_LIMIT,
  LT7182S_IIN_OC_WARN_LIMIT_TYPE = LT7182S_IIN_OC_WARN_LIMIT,
  LT7182S_IOUT_OC_WARN_LIMIT_TYPE = LT7182S_IOUT_OC_WARN_LIMIT,
  LT7182S_OT_FAULT_LIMIT_TYPE = LT7182S_OT_FAULT_LIMIT,
  LT7182S_OT_WARN_LIMIT_TYPE = LT7182S_OT_WARN_LIMIT,
  LT7182S_VIN_UV_WARN_LIMIT_TYPE = LT7182S_VIN_UV_WARN_LIMIT,
  LT7182S_TON_MAX_FAULT_LIMIT_TYPE = LT7182S_TON_MAX_FAULT_LIMIT,
  LT7182S_TOFF_MAX_WARN_LIMIT_TYPE = LT7182S_TOFF_MAX_WARN_LIMIT
}
 
enum  lt7182s_status_type {
  LT7182S_STATUS_BYTE_TYPE = LT7182S_STATUS_BYTE_TYPE_MSK,
  LT7182S_STATUS_VOUT_TYPE = LT7182S_STATUS_VOUT_TYPE_MSK,
  LT7182S_STATUS_IOUT_TYPE = LT7182S_STATUS_IOUT_TYPE_MSK,
  LT7182S_STATUS_INPUT_TYPE = LT7182S_STATUS_INPUT_TYPE_MSK,
  LT7182S_STATUS_TEMP_TYPE = LT7182S_STATUS_TEMP_TYPE_MSK,
  LT7182S_STATUS_CML_TYPE = LT7182S_STATUS_CML_TYPE_MSK,
  LT7182S_STATUS_MFR_SPECIFIC_TYPE = LT7182S_STATUS_MFR_SPECIFIC_TYPE_MSK,
  LT7182S_STATUS_WORD_TYPE = LT7182S_STATUS_WORD_TYPE_MSK,
  LT7182S_STATUS_ALL_TYPE = LT7182S_STATUS_ALL_TYPE_MSK
}
 
enum  lt7182s_timing_type {
  LT7182S_TON_DELAY_TYPE = LT7182S_TON_DELAY,
  LT7182S_TON_RISE_TYPE = LT7182S_TON_RISE,
  LT7182S_TOFF_DELAY_TYPE = LT7182S_TOFF_DELAY,
  LT7182S_TOFF_FALL_TYPE = LT7182S_TOFF_FALL,
  LT7182_RETRY_DELAY_TYPE = LT7182S_MFR_RETRY_DELAY,
  LT7182S_RESTART_DELAY_TYPE = LT7182S_MFR_RESTART_DELAY
}
 
enum  lt7182s_nvm_cmd_type {
  LT7182S_LOCK_USER,
  LT7182S_UNLOCK_USER,
  LT7182S_STORE_USER = LT7182S_STORE_USER_ALL,
  LT7182S_RESTORE_USER = LT7182S_RESTORE_USER_ALL,
  LT7182S_COMPARE_USER = LT7182S_MFR_COMPARE_USER_ALL
}
 
enum  lt7182s_pwm_mode {
  LT7182S_PWM_FORCED_CONTINUOUS_MODE,
  LT7182S_PWM_PULSE_SKIP_MODE
}
 

Functions

int lt7182s_init (struct lt7182s_dev **dev, struct lt7182s_init_param *init_param)
 Initialize the device structure. More...
 
int lt7182s_remove (struct lt7182s_dev *dev)
 Free or remove device instance. More...
 
int lt7182s_set_page (struct lt7182s_dev *dev, int page)
 Set page of the device. Page 0x0 - Channel 0 Page 0x1 - Channel 1 Page 0xff - Both channels. More...
 
int lt7182s_send_byte (struct lt7182s_dev *dev, int page, uint8_t cmd)
 Send a PMBus command to the device. More...
 
int lt7182s_read_byte (struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t *data)
 Perform a raw PMBus read byte operation. More...
 
int lt7182s_write_byte (struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t value)
 Perform a raw PMBus write byte operation. More...
 
int lt7182s_read_word (struct lt7182s_dev *dev, int page, uint8_t cmd, uint16_t *word)
 Perform a raw PMBus read word operation. More...
 
int lt7182s_write_word (struct lt7182s_dev *dev, int page, uint8_t cmd, uint16_t word)
 Perform a raw PMBus write word operation. More...
 
int lt7182s_read_word_data (struct lt7182s_dev *dev, int page, uint8_t cmd, int *data)
 Perform a PMBus read word operation and converts to actual value. More...
 
int lt7182s_write_word_data (struct lt7182s_dev *dev, int page, uint8_t cmd, int data)
 Converts value to register data and do PMBus write word operation. More...
 
int lt7182s_read_block_data (struct lt7182s_dev *dev, int page, uint8_t cmd, uint8_t *data, size_t nbytes)
 Perform a PMBus read block operation. More...
 
int lt7182s_read_value (struct lt7182s_dev *dev, int channel, enum lt7182s_value_type value_type, int *value)
 Read a value. More...
 
int lt7182s_read_status (struct lt7182s_dev *dev, int channel, enum lt7182s_status_type status_type, struct lt7182s_status *status)
 Read statuses. More...
 
int lt7182s_vout_value (struct lt7182s_dev *dev, int channel, int vout_command, int vout_max)
 Set output voltage and its upper limit. More...
 
int lt7182s_vout_tr (struct lt7182s_dev *dev, int channel, int tr)
 Set output voltage transition rate. More...
 
int lt7182s_vout_margin (struct lt7182s_dev *dev, int channel, int margin_high, int margin_low)
 Set output voltage margin. More...
 
int lt7182s_set_vin (struct lt7182s_dev *dev, int channel, int vin_on, int vin_off)
 Set input voltage window at which power conversion will proceed. More...
 
int lt7182s_set_timing (struct lt7182s_dev *dev, int channel, enum lt7182s_timing_type timing_type, int time)
 Set timing values. More...
 
int lt7182s_switch_freq (struct lt7182s_dev *dev, int freq)
 Set switching frequency. More...
 
int lt7182s_pwm_mode (struct lt7182s_dev *dev, int channel, enum lt7182s_pwm_mode pwm_mode)
 Set output PWM mode. More...
 
int lt7182s_pwm_phase (struct lt7182s_dev *dev, int channel, int phase)
 Set output PWM phase. More...
 
int lt7182s_set_limit (struct lt7182s_dev *dev, int channel, enum lt7182s_limit_type limit, int limit_val)
 Set overvalue and undervalue limits. More...
 
int lt7182s_set_operation (struct lt7182s_dev *dev, int channel, enum lt7182s_operation_type operation)
 Set channel operation. More...
 
int lt7182s_set_channel_state (struct lt7182s_dev *dev, int channel, bool state)
 Set channel state using the RUN pin. More...
 
int lt7182s_sync_config (struct lt7182s_dev *dev, bool input_clk, bool output_clk)
 Configure SYNC pin for clock synchronization. More...
 
int lt7182s_adc_control (struct lt7182s_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
 Configure ADC control. More...
 
int lt7182s_nvm_cmd (struct lt7182s_dev *dev, enum lt7182s_nvm_cmd_type cmd)
 Perform commands for non-volatile memory/EEPROM. More...
 
int lt7182s_clear_faults (struct lt7182s_dev *dev)
 Clear all asserted faults. More...
 
int lt7182s_software_reset (struct lt7182s_dev *dev)
 Perform a device software reset. More...
 

Macro Definition Documentation

◆ LT7182S_ADC_CTRL_DEBUG_BIT

#define LT7182S_ADC_CTRL_DEBUG_BIT   NO_OS_BIT(0)

◆ LT7182S_ADC_CTRL_LOW_FREQ_BIT

#define LT7182S_ADC_CTRL_LOW_FREQ_BIT   NO_OS_BIT(1)

◆ LT7182S_CAPABILITY

#define LT7182S_CAPABILITY   0x19

◆ LT7182S_CLEAR_FAULTS

#define LT7182S_CLEAR_FAULTS   0x03

◆ LT7182S_CONFIG_ALL_FORMAT_BIT

#define LT7182S_CONFIG_ALL_FORMAT_BIT   NO_OS_BIT(8)

◆ LT7182S_CONFIG_ALL_PEC_BIT

#define LT7182S_CONFIG_ALL_PEC_BIT   NO_OS_BIT(2)

◆ LT7182S_CRC_POLYNOMIAL

#define LT7182S_CRC_POLYNOMIAL   0x7

◆ LT7182S_FREQ_MAX

#define LT7182S_FREQ_MAX   4000000

◆ LT7182S_FREQ_MIN

#define LT7182S_FREQ_MIN   400000

◆ LT7182S_FREQUENCY_SWITCH

#define LT7182S_FREQUENCY_SWITCH   0x33

◆ LT7182S_IC_DEVICE_ID

#define LT7182S_IC_DEVICE_ID   0xAD

◆ LT7182S_IC_DEVICE_REV

#define LT7182S_IC_DEVICE_REV   0xAE

◆ LT7182S_IEEE754_EXPONENT_MSK

#define LT7182S_IEEE754_EXPONENT_MSK   NO_OS_GENMASK(14, 10)

◆ LT7182S_IEEE754_MANTISSA_MSK

#define LT7182S_IEEE754_MANTISSA_MSK   NO_OS_GENMASK(9, 0)

◆ LT7182S_IEEE754_MAX_MANTISSA

#define LT7182S_IEEE754_MAX_MANTISSA   0x7ff

◆ LT7182S_IEEE754_MIN_MANTISSA

#define LT7182S_IEEE754_MIN_MANTISSA   0x400

◆ LT7182S_IEEE754_SIGN_BIT

#define LT7182S_IEEE754_SIGN_BIT   NO_OS_BIT(15)

◆ LT7182S_IIN_OC_WARN_LIMIT

#define LT7182S_IIN_OC_WARN_LIMIT   0x5D

◆ LT7182S_IOUT_OC_FAULT_RESPONSE

#define LT7182S_IOUT_OC_FAULT_RESPONSE   0x47

◆ LT7182S_IOUT_OC_WARN_LIMIT

#define LT7182S_IOUT_OC_WARN_LIMIT   0x4A

◆ LT7182S_LIN11_EXPONENT

#define LT7182S_LIN11_EXPONENT (   x)    (int16_t)(x) >> 11

◆ LT7182S_LIN11_EXPONENT_MAX

#define LT7182S_LIN11_EXPONENT_MAX   15

◆ LT7182S_LIN11_EXPONENT_MIN

#define LT7182S_LIN11_EXPONENT_MIN   -15

◆ LT7182S_LIN11_EXPONENT_MSK

#define LT7182S_LIN11_EXPONENT_MSK   NO_OS_GENMASK(15,11)

◆ LT7182S_LIN11_MANTISSA

#define LT7182S_LIN11_MANTISSA (   x)    ((int16_t)((x & 0x7FF) << 5)) >> 5

◆ LT7182S_LIN11_MANTISSA_MAX

#define LT7182S_LIN11_MANTISSA_MAX   1023L

◆ LT7182S_LIN11_MANTISSA_MIN

#define LT7182S_LIN11_MANTISSA_MIN   511L

◆ LT7182S_LIN11_MANTISSA_MSK

#define LT7182S_LIN11_MANTISSA_MSK   NO_OS_GENMASK(10,0)

◆ LT7182S_LIN16_EXPONENT

#define LT7182S_LIN16_EXPONENT   -12

◆ LT7182S_MFR_ADC_CONTROL

#define LT7182S_MFR_ADC_CONTROL   0xD8

◆ LT7182S_MFR_ADDRESS

#define LT7182S_MFR_ADDRESS   0xE6

◆ LT7182S_MFR_CHAN_CONFIG

#define LT7182S_MFR_CHAN_CONFIG   0xD0

◆ LT7182S_MFR_CHANNEL_STATE

#define LT7182S_MFR_CHANNEL_STATE   0xF1

◆ LT7182S_MFR_CLEAR_PEAKS

#define LT7182S_MFR_CLEAR_PEAKS   0xE3

◆ LT7182S_MFR_COMMON

#define LT7182S_MFR_COMMON   0xEF

◆ LT7182S_MFR_COMPARE_USER_ALL

#define LT7182S_MFR_COMPARE_USER_ALL   0xF0

◆ LT7182S_MFR_CONFIG_ALL

#define LT7182S_MFR_CONFIG_ALL   0xD1

◆ LT7182S_MFR_DISABLE_OUTPUT

#define LT7182S_MFR_DISABLE_OUTPUT   0xFB

◆ LT7182S_MFR_DISCHARGE_THRESHOLD

#define LT7182S_MFR_DISCHARGE_THRESHOLD   0xE4

◆ LT7182S_MFR_EE_USER_WP

#define LT7182S_MFR_EE_USER_WP   0xFC

◆ LT7182S_MFR_FAULT_LOG

#define LT7182S_MFR_FAULT_LOG   0xEE

◆ LT7182S_MFR_FAULT_LOG_CLEAR

#define LT7182S_MFR_FAULT_LOG_CLEAR   0xEC

◆ LT7182S_MFR_FAULT_LOG_STORE

#define LT7182S_MFR_FAULT_LOG_STORE   0xEA

◆ LT7182S_MFR_FAULT_LOG_TIMESTAMP_LSBS

#define LT7182S_MFR_FAULT_LOG_TIMESTAMP_LSBS   0xE9

◆ LT7182S_MFR_FAULT_LOG_TIMESTAMP_MSBS

#define LT7182S_MFR_FAULT_LOG_TIMESTAMP_MSBS   0xE8

◆ LT7182S_MFR_FAULT_PROPAGATE

#define LT7182S_MFR_FAULT_PROPAGATE   0xD2

◆ LT7182S_MFR_FAULT_RESPONSE

#define LT7182S_MFR_FAULT_RESPONSE   0xD5

◆ LT7182S_MFR_ID

#define LT7182S_MFR_ID   0x99

◆ LT7182S_MFR_IOUT_PEAK

#define LT7182S_MFR_IOUT_PEAK   0xD7

◆ LT7182S_MFR_MODEL

#define LT7182S_MFR_MODEL   0x9A

◆ LT7182S_MFR_NOT_PGOOD_DELAY

#define LT7182S_MFR_NOT_PGOOD_DELAY   0xF3

◆ LT7182S_MFR_PADS

#define LT7182S_MFR_PADS   0xE5

◆ LT7182S_MFR_PGOOD_DELAY

#define LT7182S_MFR_PGOOD_DELAY   0xF2

◆ LT7182S_MFR_PIN_CONFIG

#define LT7182S_MFR_PIN_CONFIG   0xF7

◆ LT7182S_MFR_PWM_MODE

#define LT7182S_MFR_PWM_MODE   0xD4

◆ LT7182S_MFR_PWM_PHASE

#define LT7182S_MFR_PWM_PHASE   0xF5

◆ LT7182S_MFR_RAIL_ADDRESS

#define LT7182S_MFR_RAIL_ADDRESS   0xFA

◆ LT7182S_MFR_READ_EXTVCC

#define LT7182S_MFR_READ_EXTVCC   0xCD

◆ LT7182S_MFR_READ_ITH

#define LT7182S_MFR_READ_ITH   0xCE

◆ LT7182S_MFR_RESET

#define LT7182S_MFR_RESET   0xFD

◆ LT7182S_MFR_RESTART_DELAY

#define LT7182S_MFR_RESTART_DELAY   0xDC

◆ LT7182S_MFR_RETRY_DELAY

#define LT7182S_MFR_RETRY_DELAY   0xDB

◆ LT7182S_MFR_REVISION

#define LT7182S_MFR_REVISION   0x9B

◆ LT7182S_MFR_SERIAL

#define LT7182S_MFR_SERIAL   0x9E

◆ LT7182S_MFR_SPECIAL_ID

#define LT7182S_MFR_SPECIAL_ID   0xE7

◆ LT7182S_MFR_SYNC_CONFIG

#define LT7182S_MFR_SYNC_CONFIG   0xF6

◆ LT7182S_MFR_TEMPERATURE_1_PEAK

#define LT7182S_MFR_TEMPERATURE_1_PEAK   0xDF

◆ LT7182S_MFR_USER_DATA_00

#define LT7182S_MFR_USER_DATA_00   0xC9

◆ LT7182S_MFR_USER_DATA_01

#define LT7182S_MFR_USER_DATA_01   0xCA

◆ LT7182S_MFR_USER_DATA_02

#define LT7182S_MFR_USER_DATA_02   0xCB

◆ LT7182S_MFR_USER_DATA_03

#define LT7182S_MFR_USER_DATA_03   0xCC

◆ LT7182S_MFR_VIN_PEAK

#define LT7182S_MFR_VIN_PEAK   0xDE

◆ LT7182S_MFR_VOUT_PEAK

#define LT7182S_MFR_VOUT_PEAK   0xDD

◆ LT7182S_ON_OFF_CONFIG

#define LT7182S_ON_OFF_CONFIG   0x02

◆ LT7182S_OPERATION

#define LT7182S_OPERATION   0x01

◆ LT7182S_OT_FAULT_LIMIT

#define LT7182S_OT_FAULT_LIMIT   0x4F

◆ LT7182S_OT_FAULT_RESPONSE

#define LT7182S_OT_FAULT_RESPONSE   0x50

◆ LT7182S_OT_WARN_LIMIT

#define LT7182S_OT_WARN_LIMIT   0x51

◆ LT7182S_PADS_RUN0_BIT

#define LT7182S_PADS_RUN0_BIT   NO_OS_BIT(4)

◆ LT7182S_PADS_RUN1_BIT

#define LT7182S_PADS_RUN1_BIT   NO_OS_BIT(5)

◆ LT7182S_PAGE

#define LT7182S_PAGE   0x00

◆ LT7182S_PAGE_PLUS_READ

#define LT7182S_PAGE_PLUS_READ   0x06

◆ LT7182S_PAGE_PLUS_WRITE

#define LT7182S_PAGE_PLUS_WRITE   0x05

◆ LT7182S_PHASE_FULL_MILLI

#define LT7182S_PHASE_FULL_MILLI   360000

◆ LT7182S_PWM_OP_MODE_BIT

#define LT7182S_PWM_OP_MODE_BIT   NO_OS_BIT(0)

◆ LT7182S_QUERY

#define LT7182S_QUERY   0x1A

◆ LT7182S_READ_FREQUENCY

#define LT7182S_READ_FREQUENCY   0x95

◆ LT7182S_READ_IIN

#define LT7182S_READ_IIN   0x89

◆ LT7182S_READ_IOUT

#define LT7182S_READ_IOUT   0x8C

◆ LT7182S_READ_POUT

#define LT7182S_READ_POUT   0x96

◆ LT7182S_READ_TEMPERATURE_1

#define LT7182S_READ_TEMPERATURE_1   0x8D

◆ LT7182S_READ_VIN

#define LT7182S_READ_VIN   0x88

◆ LT7182S_READ_VOUT

#define LT7182S_READ_VOUT   0x8B

◆ LT7182S_RESTORE_USER_ALL

#define LT7182S_RESTORE_USER_ALL   0x16

◆ LT7182S_REVISION

#define LT7182S_REVISION   0x98

◆ LT7182S_SMBALERT_MASK

#define LT7182S_SMBALERT_MASK   0x1B

◆ LT7182S_SPECIAL_ID_VALUE

#define LT7182S_SPECIAL_ID_VALUE   0x1C1D

◆ LT7182S_STATUS_ALL_TYPE_MSK

#define LT7182S_STATUS_ALL_TYPE_MSK   0xFF

◆ LT7182S_STATUS_BYTE

#define LT7182S_STATUS_BYTE   0x78

◆ LT7182S_STATUS_BYTE_TYPE_MSK

#define LT7182S_STATUS_BYTE_TYPE_MSK   0x01

◆ LT7182S_STATUS_CML

#define LT7182S_STATUS_CML   0x7E

◆ LT7182S_STATUS_CML_TYPE_MSK

#define LT7182S_STATUS_CML_TYPE_MSK   0x20

◆ LT7182S_STATUS_INPUT

#define LT7182S_STATUS_INPUT   0x7C

◆ LT7182S_STATUS_INPUT_TYPE_MSK

#define LT7182S_STATUS_INPUT_TYPE_MSK   0x08

◆ LT7182S_STATUS_IOUT

#define LT7182S_STATUS_IOUT   0x7B

◆ LT7182S_STATUS_IOUT_TYPE_MSK

#define LT7182S_STATUS_IOUT_TYPE_MSK   0x04

◆ LT7182S_STATUS_MFR_SPECIFIC

#define LT7182S_STATUS_MFR_SPECIFIC   0x80

◆ LT7182S_STATUS_MFR_SPECIFIC_TYPE_MSK

#define LT7182S_STATUS_MFR_SPECIFIC_TYPE_MSK   0x40

◆ LT7182S_STATUS_TEMP_TYPE_MSK

#define LT7182S_STATUS_TEMP_TYPE_MSK   0x10

◆ LT7182S_STATUS_TEMPERATURE

#define LT7182S_STATUS_TEMPERATURE   0x7D

◆ LT7182S_STATUS_VOUT

#define LT7182S_STATUS_VOUT   0x7A

◆ LT7182S_STATUS_VOUT_TYPE_MSK

#define LT7182S_STATUS_VOUT_TYPE_MSK   0x02

◆ LT7182S_STATUS_WORD

#define LT7182S_STATUS_WORD   0x79

◆ LT7182S_STATUS_WORD_TYPE_MSK

#define LT7182S_STATUS_WORD_TYPE_MSK   0x80

◆ LT7182S_STORE_USER_ALL

#define LT7182S_STORE_USER_ALL   0x15

◆ LT7182S_SYNC_CLK_INPUT_BIT

#define LT7182S_SYNC_CLK_INPUT_BIT   NO_OS_BIT(1)

◆ LT7182S_SYNC_CLK_OUTPUT_BIT

#define LT7182S_SYNC_CLK_OUTPUT_BIT   NO_OS_BIT(0)

◆ LT7182S_TOFF_DELAY

#define LT7182S_TOFF_DELAY   0x64

◆ LT7182S_TOFF_FALL

#define LT7182S_TOFF_FALL   0x65

◆ LT7182S_TOFF_MAX_WARN_LIMIT

#define LT7182S_TOFF_MAX_WARN_LIMIT   0x66

◆ LT7182S_TON_DELAY

#define LT7182S_TON_DELAY   0x60

◆ LT7182S_TON_MAX_FAULT_LIMIT

#define LT7182S_TON_MAX_FAULT_LIMIT   0x62

◆ LT7182S_TON_MAX_FAULT_RESPONSE

#define LT7182S_TON_MAX_FAULT_RESPONSE   0x63

◆ LT7182S_TON_RISE

#define LT7182S_TON_RISE   0x61

◆ LT7182S_VIN_OFF

#define LT7182S_VIN_OFF   0x36

◆ LT7182S_VIN_OFF_MAX

#define LT7182S_VIN_OFF_MAX   20000

◆ LT7182S_VIN_OFF_MIN

#define LT7182S_VIN_OFF_MIN   1350

◆ LT7182S_VIN_ON

#define LT7182S_VIN_ON   0x35

◆ LT7182S_VIN_ON_MAX

#define LT7182S_VIN_ON_MAX   20000

◆ LT7182S_VIN_ON_MIN

#define LT7182S_VIN_ON_MIN   1400

◆ LT7182S_VIN_OV_FAULT_RESPONSE

#define LT7182S_VIN_OV_FAULT_RESPONSE   0x56

◆ LT7182S_VIN_UV_WARN_LIMIT

#define LT7182S_VIN_UV_WARN_LIMIT   0x58

◆ LT7182S_VOUT_COMMAND

#define LT7182S_VOUT_COMMAND   0x21

◆ LT7182S_VOUT_MARGIN_HIGH

#define LT7182S_VOUT_MARGIN_HIGH   0x25

◆ LT7182S_VOUT_MARGIN_LOW

#define LT7182S_VOUT_MARGIN_LOW   0x26

◆ LT7182S_VOUT_MAX

#define LT7182S_VOUT_MAX   0x24

◆ LT7182S_VOUT_MODE

#define LT7182S_VOUT_MODE   0x20

◆ LT7182S_VOUT_MODE_VAL_MSK

#define LT7182S_VOUT_MODE_VAL_MSK   NO_OS_GENMASK(4,0)

◆ LT7182S_VOUT_OV_FAULT_LIMIT

#define LT7182S_VOUT_OV_FAULT_LIMIT   0x40

◆ LT7182S_VOUT_OV_FAULT_RESPONSE

#define LT7182S_VOUT_OV_FAULT_RESPONSE   0x41

◆ LT7182S_VOUT_OV_WARN_LIMIT

#define LT7182S_VOUT_OV_WARN_LIMIT   0x42

◆ LT7182S_VOUT_TRANSITION_RATE

#define LT7182S_VOUT_TRANSITION_RATE   0x27

◆ LT7182S_VOUT_UV_FAULT_LIMIT

#define LT7182S_VOUT_UV_FAULT_LIMIT   0x44

◆ LT7182S_VOUT_UV_FAULT_RESPONSE

#define LT7182S_VOUT_UV_FAULT_RESPONSE   0x45

◆ LT7182S_VOUT_UV_WARN_LIMIT

#define LT7182S_VOUT_UV_WARN_LIMIT   0x43

◆ LT7182S_WRITE_PROTECT

#define LT7182S_WRITE_PROTECT   0x10

◆ LT7182S_ZONE_ACTIVE

#define LT7182S_ZONE_ACTIVE   0x08

◆ LT7182S_ZONE_CONFIG

#define LT7182S_ZONE_CONFIG   0x07

Enumeration Type Documentation

◆ lt7182s_chip_id

Enumerator
ID_LT7182S 
ID_LT7184S 

◆ lt7182s_data_format

Enumerator
LT7182S_DATA_FORMAT_LINEAR 
LT7182S_DATA_FORMAT_IEEE754 

◆ lt7182s_fault_pin_config

Enumerator
LT7182S_FAULT_PIN_INPUT 
LT7182S_FAULT_PIN_OUTPUT 

◆ lt7182s_limit_type

Enumerator
LT7182S_VOUT_OV_FAULT_LIMIT_TYPE 
LT7182S_VOUT_OV_WARN_LIMIT_TYPE 
LT7182S_VOUT_UV_FAULT_LIMIT_TYPE 
LT7182S_VOUT_UV_WARN_LIMIT_TYPE 
LT7182S_IIN_OC_WARN_LIMIT_TYPE 
LT7182S_IOUT_OC_WARN_LIMIT_TYPE 
LT7182S_OT_FAULT_LIMIT_TYPE 
LT7182S_OT_WARN_LIMIT_TYPE 
LT7182S_VIN_UV_WARN_LIMIT_TYPE 
LT7182S_TON_MAX_FAULT_LIMIT_TYPE 
LT7182S_TOFF_MAX_WARN_LIMIT_TYPE 

◆ lt7182s_nvm_cmd_type

Enumerator
LT7182S_LOCK_USER 
LT7182S_UNLOCK_USER 
LT7182S_STORE_USER 
LT7182S_RESTORE_USER 
LT7182S_COMPARE_USER 

◆ lt7182s_operation_type

Enumerator
LT7182S_OPERATION_OFF 
LT7182S_OPERATION_ON 
LT7182S_OPERATION_MARGIN_HIGH 
LT7182S_OPERATION_MARGIN_LOW 
LT7182S_OPERATION_SEQ_OFF 

◆ lt7182s_output_channel

Enumerator
LT7182S_CHAN_0 
LT7182S_CHAN_1 
LT7182S_CHAN_ALL 

◆ lt7182s_pwm_mode

Enumerator
LT7182S_PWM_FORCED_CONTINUOUS_MODE 
LT7182S_PWM_PULSE_SKIP_MODE 

◆ lt7182s_status_type

Enumerator
LT7182S_STATUS_BYTE_TYPE 
LT7182S_STATUS_VOUT_TYPE 
LT7182S_STATUS_IOUT_TYPE 
LT7182S_STATUS_INPUT_TYPE 
LT7182S_STATUS_TEMP_TYPE 
LT7182S_STATUS_CML_TYPE 
LT7182S_STATUS_MFR_SPECIFIC_TYPE 
LT7182S_STATUS_WORD_TYPE 
LT7182S_STATUS_ALL_TYPE 

◆ lt7182s_timing_type

Enumerator
LT7182S_TON_DELAY_TYPE 
LT7182S_TON_RISE_TYPE 
LT7182S_TOFF_DELAY_TYPE 
LT7182S_TOFF_FALL_TYPE 
LT7182_RETRY_DELAY_TYPE 
LT7182S_RESTART_DELAY_TYPE 

◆ lt7182s_value_type

Enumerator
LT7182S_VIN 
LT7182S_IIN 
LT7182S_VOUT 
LT7182S_IOUT 
LT7182S_TEMP 
LT7182S_FREQUENCY 
LT7182S_POUT 
LT7182S_ITH 
LT7182S_EXTVCC 
LT7182S_IOUT_PEAK 
LT7182S_VOUT_PEAK 
LT7182S_VIN_PEAK 
LT7182S_TEMP_PEAK 

Function Documentation

◆ lt7182s_adc_control()

int lt7182s_adc_control ( struct lt7182s_dev dev,
bool  low_freq_telemetry,
bool  debug_telemetry 
)

Configure ADC control.

Parameters
dev- Device structure
low_freq_telemetry- Enable for low frequency telemetry (every 100ms)
debug_telemetry- Enable for debug telemetry with EXTVcc and Ith
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_clear_faults()

int lt7182s_clear_faults ( struct lt7182s_dev dev)

Clear all asserted faults.

Parameters
dev- Device structure
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_init()

int lt7182s_init ( struct lt7182s_dev **  device,
struct lt7182s_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:

◆ lt7182s_nvm_cmd()

int lt7182s_nvm_cmd ( struct lt7182s_dev dev,
enum lt7182s_nvm_cmd_type  cmd 
)

Perform commands for non-volatile memory/EEPROM.

Parameters
dev- Device structure
cmd- NVM commands. Example: LT7182S_LOCK_USER LT7182S_UNLOCK_USER LT7182S_STORE_USER LT7182S_COMPARE_USER LT7182S_RESTORE_USER
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_pwm_mode()

int lt7182s_pwm_mode ( struct lt7182s_dev dev,
int  channel,
enum lt7182s_pwm_mode  pwm_mode 
)

Set output PWM mode.

Parameters
dev- Device structure
channel- Output channel
pwm_mode-
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_pwm_phase()

int lt7182s_pwm_phase ( struct lt7182s_dev dev,
int  channel,
int  phase 
)

Set output PWM phase.

Parameters
dev- Device structure
channel- Channel
phase- Phase in milli-degrees
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_read_block_data()

int lt7182s_read_block_data ( struct lt7182s_dev dev,
int  page,
uint8_t  cmd,
uint8_t *  data,
size_t  nbytes 
)

Perform a PMBus read block operation.

Parameters
dev- Device structure
page- Page/channel of the command
cmd- PMBus command
data- Address of the read block
nbytes- Size of the block in bytes
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ lt7182s_read_byte()

int lt7182s_read_byte ( struct lt7182s_dev dev,
int  page,
uint8_t  cmd,
uint8_t *  data 
)

Perform a raw PMBus read byte operation.

Parameters
dev- Device structure
page- Page or channel of the command
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:

◆ lt7182s_read_status()

int lt7182s_read_status ( struct lt7182s_dev dev,
int  channel,
enum lt7182s_status_type  status_type,
struct lt7182s_status status 
)

Read statuses.

Parameters
dev- Device structure
channel- Channel of the status to read
status_type- Status type. Example values: LT7182S_STATUS_BYTE_TYPE LT7182S_STATUS_VOUT_TYPE LT7182S_STATUS_IOUT_TYPE LT7182S_STATUS_INPUT_TYPE LT7182S_STATUS_CML_TYPE
status- Address of the status structure
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ lt7182s_read_value()

int lt7182s_read_value ( struct lt7182s_dev dev,
int  channel,
enum lt7182s_value_type  value_type,
int *  value 
)

Read a value.

Parameters
dev- Device structure
channel- Channel selected
value_type- Value type. Example values: LT7182S_VIN LT7182S_VOUT LT7182S_IIN LT7182S_IOUT LT7182S_TEMP LT7182S_FREQUENCY
value- Address of the read value
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ lt7182s_read_word()

int lt7182s_read_word ( struct lt7182s_dev dev,
int  page,
uint8_t  cmd,
uint16_t *  word 
)

Perform a raw PMBus read word operation.

Parameters
dev- Device structure
page- Page/channel of the command
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:

◆ lt7182s_read_word_data()

int lt7182s_read_word_data ( struct lt7182s_dev dev,
int  page,
uint8_t  cmd,
int *  data 
)

Perform a PMBus read word operation and converts to actual value.

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

◆ lt7182s_remove()

int lt7182s_remove ( struct lt7182s_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:

◆ lt7182s_send_byte()

int lt7182s_send_byte ( struct lt7182s_dev dev,
int  page,
uint8_t  cmd 
)

Send a PMBus command to the device.

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

◆ lt7182s_set_channel_state()

int lt7182s_set_channel_state ( struct lt7182s_dev dev,
int  channel,
bool  state 
)

Set channel state using the RUN pin.

Parameters
dev- Device structure
channel- Channel
state- true for ON, false for OFF
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_set_limit()

int lt7182s_set_limit ( struct lt7182s_dev dev,
int  channel,
enum lt7182s_limit_type  limit,
int  limit_val 
)

Set overvalue and undervalue limits.

Parameters
dev- Device structure
channel- Channel
limit- Limit value type. Example: LT7182S_VOUT_OV_FAULT_LIMIT_TYPE LT7182S_OT_WARN_LIMIT_TYPE LT7182S_TON_MAX_FAULT_LIMIT_TYPE LT7182S_IIN_OC_WARN_LIMIT_TYPE
limit_val- Limit value in milli-units for voltage and current, and microseconds for timing.
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_set_operation()

int lt7182s_set_operation ( struct lt7182s_dev dev,
int  channel,
enum lt7182s_operation_type  operation 
)

Set channel operation.

Parameters
dev- Device structure
channel- Channel
operation- Operation. Accepted values are: LT7182S_OPERATION_OFF LT7182S_OPERATION_ON LT7182S_OPERATION_MARGIN_HIGH LT7182S_OPERATION_MARGIN_LOW LT7182S_OPERATION_SEQ_OFF
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_set_page()

int lt7182s_set_page ( struct lt7182s_dev dev,
int  page 
)

Set page of the device. Page 0x0 - Channel 0 Page 0x1 - Channel 1 Page 0xff - Both channels.

Parameters
dev- Device structure
page- Page to set
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_set_timing()

int lt7182s_set_timing ( struct lt7182s_dev dev,
int  channel,
enum lt7182s_timing_type  timing_type,
int  time 
)

Set timing values.

Parameters
dev- Device structure
channel- Channel
timing_type- Timing value type. Example: LT7182S_TON_DELAY_TYPE LT7182S_TON_RISE_TYPE LT7182S_TOFF_DELAY_TYPE LT7182_RETRY_DELAY_TYPE
time- Time value in microseconds
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_set_vin()

int lt7182s_set_vin ( struct lt7182s_dev dev,
int  channel,
int  vin_on,
int  vin_off 
)

Set input voltage window at which power conversion will proceed.

Parameters
dev- Device structure
channel- Channel
vin_on- Input voltage in millivolts at which conversion will start
vin_off- Input voltage in millivolts at which conversion will stop
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_software_reset()

int lt7182s_software_reset ( struct lt7182s_dev dev)

Perform a device software reset.

Parameters
dev- Device structure
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_switch_freq()

int lt7182s_switch_freq ( struct lt7182s_dev dev,
int  freq 
)

Set switching frequency.

Parameters
dev- Device structure
freq- Frequency to set in Hz. Value should be between 400 kHz and 4000 kHz.
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_sync_config()

int lt7182s_sync_config ( struct lt7182s_dev dev,
bool  input_clk,
bool  output_clk 
)

Configure SYNC pin for clock synchronization.

Parameters
dev- Device structure
input_clk- Enable to use SYNC clock input
output_clk- Enable to use SYNC output clock
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_vout_margin()

int lt7182s_vout_margin ( struct lt7182s_dev dev,
int  channel,
int  margin_high,
int  margin_low 
)

Set output voltage margin.

Parameters
dev- Device structure
channel- Channel
margin_high- Upper margin in millivolts
margin_low- Lower margin in millivolts
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_vout_tr()

int lt7182s_vout_tr ( struct lt7182s_dev dev,
int  channel,
int  tr 
)

Set output voltage transition rate.

Parameters
dev- Device structure
channel- Channel
tr- Transition rate in V/s or mV/ms
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_vout_value()

int lt7182s_vout_value ( struct lt7182s_dev dev,
int  channel,
int  vout_command,
int  vout_max 
)

Set output voltage and its upper limit.

Parameters
dev- Device structure
channel- Channel
vout_command- Output voltage in millivolts
vout_max- Output voltage upper limit in millivolts
Returns
0 in case of success, negative error code otherwise

◆ lt7182s_write_byte()

int lt7182s_write_byte ( struct lt7182s_dev dev,
int  page,
uint8_t  cmd,
uint8_t  value 
)

Perform a raw PMBus write byte operation.

Parameters
dev- Device structure
page- Page/channel of the command
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:

◆ lt7182s_write_word()

int lt7182s_write_word ( struct lt7182s_dev dev,
int  page,
uint8_t  cmd,
uint16_t  word 
)

Perform a raw PMBus write word operation.

Parameters
dev- Device structure
page- Page/channel of the command
cmd- PMBus command
word- Word to write
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ lt7182s_write_word_data()

int lt7182s_write_word_data ( struct lt7182s_dev dev,
int  page,
uint8_t  cmd,
int  data 
)

Converts value to register data and do PMBus write word operation.

Parameters
dev- Device structure
page- Page/channel of the command
cmd- PMBus command
data- Value to write
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function: