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

Go to the source code of this file.

Classes

struct  ltp8800_dev
 
struct  ltp8800_init_param
 
struct  ltp8800_status
 

Macros

#define LTP8800_PAGE   0x00
 
#define LTP8800_OPERATION   0x01
 
#define LTP8800_WRITE_PROTECT   0x10
 
#define LTP8800_STORE_USER_ALL   0x15
 
#define LTP8800_RESTORE_USER_ALL   0x16
 
#define LTP8800_VOUT_MODE   0x20
 
#define LTP8800_VOUT_COMMAND   0x21
 
#define LTP8800_VOUT_SCALE_LOOP   0x29
 
#define LTP8800_VOUT_SCALE_MONITOR   0x2A
 
#define LTP8800_FREQUENCY_SWITCH   0x33
 
#define LTP8800_VIN_ON   0x35
 
#define LTP8800_VIN_OFF   0x36
 
#define LTP8800_INTERLEAVE   0x37
 
#define LTP8800_VIN_OV_FAULT_LIMIT   0x55
 
#define LTP8800_VIN_UV_FAULT_LIMIT   0x59
 
#define LTP8800_IIN_OC_FAULT_LIMIT   0x5B
 
#define LTP8800_POUT_OP_FAULT_LIMIT   0x68
 
#define LTP8800_STATUS_BYTE   0x78
 
#define LTP8800_STATUS_WORD   0x79
 
#define LTP8800_STATUS_VOUT   0x7A
 
#define LTP8800_STATUS_IOUT   0x7B
 
#define LTP8800_STATUS_INPUT   0x7C
 
#define LTP8800_STATUS_TEMPERATURE   0x7D
 
#define LTP8800_STATUS_CML   0x7E
 
#define LTP8800_STATUS_OTHER   0x7F
 
#define LTP8800_STATUS_MFR_SPECIFIC   0x80
 
#define LTP8800_READ_VIN   0x88
 
#define LTP8800_READ_IIN   0x89
 
#define LTP8800_READ_VOUT   0x8B
 
#define LTP8800_READ_IOUT   0x8C
 
#define LTP8800_READ_TEMPERATURE_2   0x8E
 
#define LTP8800_READ_TEMPERATURE_3   0x8F
 
#define LTP8800_READ_DUTY_CYCLE   0x94
 
#define LTP8800_READ_FREQUENCY   0x95
 
#define LTP8800_READ_POUT   0x96
 
#define LTP8800_REVISION   0x98
 
#define LTP8800_MFR_ID   0x99
 
#define LTP8800_MFR_MODEL   0x9A
 
#define LTP8800_MFR_REVISION   0x9B
 
#define LTP8800_MFR_SERIAL   0x9E
 
#define LTP8800_IC_DEVICE_ID   0xAD
 
#define LTP8800_IC_DEVICE_REV   0xAE
 
#define LTP8800_EEPROM_PASSWORD   0xD5
 
#define LTP8800_GO_CMD   0xFE00
 
#define LTP8800_NM_DIGFILT_LF_GAIN   0xFE01
 
#define LTP8800_NM_DIGFILT_ZERO   0xFE02
 
#define LTP8800_NM_DIGFILT_POLE   0xFE03
 
#define LTP8800_NM_DIGFILT_HF_GAIN   0xFE04
 
#define LTP8800_SYNC   0xFE55
 
#define LTP8800_CRC_POLYNOMIAL   0x7
 
#define LTP8800_VOUT_MODE_VAL_MSK   NO_OS_GENMASK(4,0)
 
#define LTP8800_LIN11_MANTISSA_MAX   1023L
 
#define LTP8800_LIN11_MANTISSA_MIN   511L
 
#define LTP8800_LIN11_EXPONENT_MAX   15
 
#define LTP8800_LIN11_EXPONENT_MIN   -15
 
#define LTP8800_LIN11_MANTISSA_MSK   NO_OS_GENMASK(10,0)
 
#define LTP8800_LIN11_EXPONENT_MSK   NO_OS_GENMASK(15,11)
 
#define LTP8800_LIN11_EXPONENT(x)   ((int16_t)(x) >> 11)
 
#define LTP8800_LIN11_MANTISSA(x)   (((int16_t)((x & 0x7FF) << 5)) >> 5)
 
#define LTP8800_LIN16_EXPONENT   -14
 
#define LTP8800_EXTENDED_COMMAND_PREFIX   0xFE
 
#define LTP8800_EXTENDED_COMMAND_BEGIN   0xFE00
 
#define LTP8800_COMMAND_LSB_MSK   NO_OS_GENMASK(7, 0)
 
#define LTP8800_COMMAND_MSB_MSK   NO_OS_GENMASK(15, 8)
 
#define LTP8800_STATUS_BYTE_TYPE_MSK   0x01
 
#define LTP8800_STATUS_VOUT_TYPE_MSK   0x02
 
#define LTP8800_STATUS_IOUT_TYPE_MSK   0x04
 
#define LTP8800_STATUS_INPUT_TYPE_MSK   0x08
 
#define LTP8800_STATUS_TEMP_TYPE_MSK   0x10
 
#define LTP8800_STATUS_CML_TYPE_MSK   0x20
 
#define LTP8800_STATUS_MFR_SPECIFIC_TYPE_MSK   0x40
 
#define LTP8800_STATUS_WORD_TYPE_MSK   0x80
 
#define LTP8800_STATUS_ALL_TYPE_MSK   0xFF
 
#define LTP8800_SYNC_ENABLE_BIT   NO_OS_BIT(6)
 
#define LTP8800_SYNC_LATCH_BIT   NO_OS_BIT(6)
 
#define LTP8800_WRITE_PROTECT_1_BIT   NO_OS_BIT(7)
 
#define LTP8800_WRITE_PROTECT_2_BIT   NO_OS_BIT(6)
 
#define LTP8800_WRITE_PROTECT_3_BIT   NO_OS_BIT(5)
 
#define LTP8800_INTERLEAVE_ORDER_MSK   NO_OS_GENMASK(3, 0)
 
#define LTP8800_IC_DEVICE_ID_VALUE   {0x41, 0x55}
 
#define LTP8800_MAX_INTERLEAVE_ORDER   0xF
 
#define LTP8800_VOUT_COMMAND_MAX   1100
 
#define LTP8800_VOUT_COMMAND_MIN   500
 
#define LTP8800_VOUT_COMMAND_DEFAULT   0x3000
 
#define LTP8800_EEPROM_PASSWORD_VALUE   0xFF
 
#define LTP8800_EEPROM_LOCK_VALUE   0xAB
 
#define LTP8800_STATE_ON   1
 
#define LTP8800_STATE_OFF   0
 

Enumerations

enum  ltp8800_value_type {
  LTP8800_VIN = LTP8800_READ_VIN,
  LTP8800_IIN = LTP8800_READ_IIN,
  LTP8800_VOUT = LTP8800_READ_VOUT,
  LTP8800_IOUT = LTP8800_READ_IOUT,
  LTP8800_FORWARD_DIODE_TEMP = LTP8800_READ_TEMPERATURE_2,
  LTP8800_REVERSE_DIODE_TEMP = LTP8800_READ_TEMPERATURE_3,
  LTP8800_DUTY_CYCLE = LTP8800_READ_DUTY_CYCLE,
  LTP8800_FREQUENCY = LTP8800_READ_FREQUENCY,
  LTP8800_POUT = LTP8800_READ_POUT
}
 
enum  ltp8800_limit_type {
  LTP8800_VIN_OV_FAULT_LIMIT_TYPE = LTP8800_VIN_OV_FAULT_LIMIT,
  LTP8800_VIN_UV_FAULT_LIMIT_TYPE = LTP8800_VIN_UV_FAULT_LIMIT,
  LTP8800_IIN_OC_FAULT_LIMIT_TYPE = LTP8800_IIN_OC_FAULT_LIMIT,
  LTP8800_POUT_OP_FAULT_LIMIT_TYPE = LTP8800_POUT_OP_FAULT_LIMIT
}
 
enum  ltp8800_status_type {
  LTP8800_STATUS_BYTE_TYPE = LTP8800_STATUS_BYTE_TYPE_MSK,
  LTP8800_STATUS_VOUT_TYPE = LTP8800_STATUS_VOUT_TYPE_MSK,
  LTP8800_STATUS_IOUT_TYPE = LTP8800_STATUS_IOUT_TYPE_MSK,
  LTP8800_STATUS_INPUT_TYPE = LTP8800_STATUS_INPUT_TYPE_MSK,
  LTP8800_STATUS_TEMP_TYPE = LTP8800_STATUS_TEMP_TYPE_MSK,
  LTP8800_STATUS_CML_TYPE = LTP8800_STATUS_CML_TYPE_MSK,
  LTP8800_STATUS_MFR_SPECIFIC_TYPE = LTP8800_STATUS_MFR_SPECIFIC_TYPE_MSK,
  LTP8800_STATUS_WORD_TYPE = LTP8800_STATUS_WORD_TYPE_MSK,
  LTP8800_STATUS_ALL_TYPE = LTP8800_STATUS_ALL_TYPE_MSK
}
 
enum  ltp8800_vout_settings {
  LTP8800_VOUT_SETTING_ADI_FACTORY = 0xB2A6,
  LTP8800_VOUT_SETTING_UNITY = 0xBA00
}
 

Functions

int ltp8800_init (struct ltp8800_dev **device, struct ltp8800_init_param *init_param)
 Initialize the device structure. More...
 
int ltp8800_remove (struct ltp8800_dev *dev)
 Free or remove device instance. More...
 
int ltp8800_send_byte (struct ltp8800_dev *dev, uint16_t cmd)
 Send a PMBus command to the device. More...
 
int ltp8800_read_byte (struct ltp8800_dev *dev, uint16_t cmd, uint8_t *data)
 Perform a raw PMBus read byte operation. More...
 
int ltp8800_write_byte (struct ltp8800_dev *dev, uint16_t cmd, uint8_t value)
 Perform a raw PMBus write byte operation. More...
 
int ltp8800_read_word (struct ltp8800_dev *dev, uint16_t cmd, uint16_t *word)
 Perform a raw PMBus read word operation. More...
 
int ltp8800_write_word (struct ltp8800_dev *dev, uint16_t cmd, uint16_t word)
 Perform a raw PMBus write word operation. More...
 
int ltp8800_read_word_data (struct ltp8800_dev *dev, uint16_t cmd, int *data)
 Perform a PMBus read word operation and converts to actual value. More...
 
int ltp8800_write_word_data (struct ltp8800_dev *dev, uint16_t cmd, int data)
 Converts value to register data and do PMBus write word operation. More...
 
int ltp8800_read_block_data (struct ltp8800_dev *dev, uint16_t cmd, uint8_t *data, size_t nbytes)
 Perform a PMBus read block operation. More...
 
int ltp8800_read_value (struct ltp8800_dev *dev, enum ltp8800_value_type value_type, int *value)
 Read a value. More...
 
int ltp8800_read_status (struct ltp8800_dev *dev, enum ltp8800_status_type status_type, struct ltp8800_status *status)
 Read statuses. More...
 
int ltp8800_vout_value (struct ltp8800_dev *dev, int vout_command)
 Set output voltage command. More...
 
int ltp8800_vout_settings (struct ltp8800_dev *dev, enum ltp8800_vout_settings settings)
 Set output voltage and its upper limit. More...
 
int ltp8800_set_vin (struct ltp8800_dev *dev, int vin_on, int vin_off)
 Set input voltage window at which power conversion will proceed. More...
 
int ltp8800_set_fault_limit (struct ltp8800_dev *dev, enum ltp8800_limit_type limit, int limit_val)
 Set overvalue and undervalue limits. More...
 
int ltp8800_sync_config (struct ltp8800_dev *dev, bool enable)
 Enable or disable sync pin. More...
 
int ltp8800_interleave_order (struct ltp8800_dev *dev, uint8_t order)
 Set phase order for polyphase application. More...
 
int ltp8800_loop_compensation (struct ltp8800_dev *dev, uint8_t pole, uint8_t zero, uint8_t hf_gain, uint8_t lf_gain)
 Program loop compensation for regulator transient response. More...
 
int ltp8800_set_device_state (struct ltp8800_dev *dev, bool state)
 Set device state. More...
 
int ltp8800_store_user_settings (struct ltp8800_dev *dev)
 Store user settings to EEPROM. More...
 
int ltp8800_restore_user_settings (struct ltp8800_dev *dev)
 Restore user settings. More...
 

Macro Definition Documentation

◆ LTP8800_COMMAND_LSB_MSK

#define LTP8800_COMMAND_LSB_MSK   NO_OS_GENMASK(7, 0)

◆ LTP8800_COMMAND_MSB_MSK

#define LTP8800_COMMAND_MSB_MSK   NO_OS_GENMASK(15, 8)

◆ LTP8800_CRC_POLYNOMIAL

#define LTP8800_CRC_POLYNOMIAL   0x7

◆ LTP8800_EEPROM_LOCK_VALUE

#define LTP8800_EEPROM_LOCK_VALUE   0xAB

◆ LTP8800_EEPROM_PASSWORD

#define LTP8800_EEPROM_PASSWORD   0xD5

◆ LTP8800_EEPROM_PASSWORD_VALUE

#define LTP8800_EEPROM_PASSWORD_VALUE   0xFF

◆ LTP8800_EXTENDED_COMMAND_BEGIN

#define LTP8800_EXTENDED_COMMAND_BEGIN   0xFE00

◆ LTP8800_EXTENDED_COMMAND_PREFIX

#define LTP8800_EXTENDED_COMMAND_PREFIX   0xFE

◆ LTP8800_FREQUENCY_SWITCH

#define LTP8800_FREQUENCY_SWITCH   0x33

◆ LTP8800_GO_CMD

#define LTP8800_GO_CMD   0xFE00

◆ LTP8800_IC_DEVICE_ID

#define LTP8800_IC_DEVICE_ID   0xAD

◆ LTP8800_IC_DEVICE_ID_VALUE

#define LTP8800_IC_DEVICE_ID_VALUE   {0x41, 0x55}

◆ LTP8800_IC_DEVICE_REV

#define LTP8800_IC_DEVICE_REV   0xAE

◆ LTP8800_IIN_OC_FAULT_LIMIT

#define LTP8800_IIN_OC_FAULT_LIMIT   0x5B

◆ LTP8800_INTERLEAVE

#define LTP8800_INTERLEAVE   0x37

◆ LTP8800_INTERLEAVE_ORDER_MSK

#define LTP8800_INTERLEAVE_ORDER_MSK   NO_OS_GENMASK(3, 0)

◆ LTP8800_LIN11_EXPONENT

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

◆ LTP8800_LIN11_EXPONENT_MAX

#define LTP8800_LIN11_EXPONENT_MAX   15

◆ LTP8800_LIN11_EXPONENT_MIN

#define LTP8800_LIN11_EXPONENT_MIN   -15

◆ LTP8800_LIN11_EXPONENT_MSK

#define LTP8800_LIN11_EXPONENT_MSK   NO_OS_GENMASK(15,11)

◆ LTP8800_LIN11_MANTISSA

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

◆ LTP8800_LIN11_MANTISSA_MAX

#define LTP8800_LIN11_MANTISSA_MAX   1023L

◆ LTP8800_LIN11_MANTISSA_MIN

#define LTP8800_LIN11_MANTISSA_MIN   511L

◆ LTP8800_LIN11_MANTISSA_MSK

#define LTP8800_LIN11_MANTISSA_MSK   NO_OS_GENMASK(10,0)

◆ LTP8800_LIN16_EXPONENT

#define LTP8800_LIN16_EXPONENT   -14

◆ LTP8800_MAX_INTERLEAVE_ORDER

#define LTP8800_MAX_INTERLEAVE_ORDER   0xF

◆ LTP8800_MFR_ID

#define LTP8800_MFR_ID   0x99

◆ LTP8800_MFR_MODEL

#define LTP8800_MFR_MODEL   0x9A

◆ LTP8800_MFR_REVISION

#define LTP8800_MFR_REVISION   0x9B

◆ LTP8800_MFR_SERIAL

#define LTP8800_MFR_SERIAL   0x9E

◆ LTP8800_NM_DIGFILT_HF_GAIN

#define LTP8800_NM_DIGFILT_HF_GAIN   0xFE04

◆ LTP8800_NM_DIGFILT_LF_GAIN

#define LTP8800_NM_DIGFILT_LF_GAIN   0xFE01

◆ LTP8800_NM_DIGFILT_POLE

#define LTP8800_NM_DIGFILT_POLE   0xFE03

◆ LTP8800_NM_DIGFILT_ZERO

#define LTP8800_NM_DIGFILT_ZERO   0xFE02

◆ LTP8800_OPERATION

#define LTP8800_OPERATION   0x01

◆ LTP8800_PAGE

#define LTP8800_PAGE   0x00

◆ LTP8800_POUT_OP_FAULT_LIMIT

#define LTP8800_POUT_OP_FAULT_LIMIT   0x68

◆ LTP8800_READ_DUTY_CYCLE

#define LTP8800_READ_DUTY_CYCLE   0x94

◆ LTP8800_READ_FREQUENCY

#define LTP8800_READ_FREQUENCY   0x95

◆ LTP8800_READ_IIN

#define LTP8800_READ_IIN   0x89

◆ LTP8800_READ_IOUT

#define LTP8800_READ_IOUT   0x8C

◆ LTP8800_READ_POUT

#define LTP8800_READ_POUT   0x96

◆ LTP8800_READ_TEMPERATURE_2

#define LTP8800_READ_TEMPERATURE_2   0x8E

◆ LTP8800_READ_TEMPERATURE_3

#define LTP8800_READ_TEMPERATURE_3   0x8F

◆ LTP8800_READ_VIN

#define LTP8800_READ_VIN   0x88

◆ LTP8800_READ_VOUT

#define LTP8800_READ_VOUT   0x8B

◆ LTP8800_RESTORE_USER_ALL

#define LTP8800_RESTORE_USER_ALL   0x16

◆ LTP8800_REVISION

#define LTP8800_REVISION   0x98

◆ LTP8800_STATE_OFF

#define LTP8800_STATE_OFF   0

◆ LTP8800_STATE_ON

#define LTP8800_STATE_ON   1

◆ LTP8800_STATUS_ALL_TYPE_MSK

#define LTP8800_STATUS_ALL_TYPE_MSK   0xFF

◆ LTP8800_STATUS_BYTE

#define LTP8800_STATUS_BYTE   0x78

◆ LTP8800_STATUS_BYTE_TYPE_MSK

#define LTP8800_STATUS_BYTE_TYPE_MSK   0x01

◆ LTP8800_STATUS_CML

#define LTP8800_STATUS_CML   0x7E

◆ LTP8800_STATUS_CML_TYPE_MSK

#define LTP8800_STATUS_CML_TYPE_MSK   0x20

◆ LTP8800_STATUS_INPUT

#define LTP8800_STATUS_INPUT   0x7C

◆ LTP8800_STATUS_INPUT_TYPE_MSK

#define LTP8800_STATUS_INPUT_TYPE_MSK   0x08

◆ LTP8800_STATUS_IOUT

#define LTP8800_STATUS_IOUT   0x7B

◆ LTP8800_STATUS_IOUT_TYPE_MSK

#define LTP8800_STATUS_IOUT_TYPE_MSK   0x04

◆ LTP8800_STATUS_MFR_SPECIFIC

#define LTP8800_STATUS_MFR_SPECIFIC   0x80

◆ LTP8800_STATUS_MFR_SPECIFIC_TYPE_MSK

#define LTP8800_STATUS_MFR_SPECIFIC_TYPE_MSK   0x40

◆ LTP8800_STATUS_OTHER

#define LTP8800_STATUS_OTHER   0x7F

◆ LTP8800_STATUS_TEMP_TYPE_MSK

#define LTP8800_STATUS_TEMP_TYPE_MSK   0x10

◆ LTP8800_STATUS_TEMPERATURE

#define LTP8800_STATUS_TEMPERATURE   0x7D

◆ LTP8800_STATUS_VOUT

#define LTP8800_STATUS_VOUT   0x7A

◆ LTP8800_STATUS_VOUT_TYPE_MSK

#define LTP8800_STATUS_VOUT_TYPE_MSK   0x02

◆ LTP8800_STATUS_WORD

#define LTP8800_STATUS_WORD   0x79

◆ LTP8800_STATUS_WORD_TYPE_MSK

#define LTP8800_STATUS_WORD_TYPE_MSK   0x80

◆ LTP8800_STORE_USER_ALL

#define LTP8800_STORE_USER_ALL   0x15

◆ LTP8800_SYNC

#define LTP8800_SYNC   0xFE55

◆ LTP8800_SYNC_ENABLE_BIT

#define LTP8800_SYNC_ENABLE_BIT   NO_OS_BIT(6)

◆ LTP8800_SYNC_LATCH_BIT

#define LTP8800_SYNC_LATCH_BIT   NO_OS_BIT(6)

◆ LTP8800_VIN_OFF

#define LTP8800_VIN_OFF   0x36

◆ LTP8800_VIN_ON

#define LTP8800_VIN_ON   0x35

◆ LTP8800_VIN_OV_FAULT_LIMIT

#define LTP8800_VIN_OV_FAULT_LIMIT   0x55

◆ LTP8800_VIN_UV_FAULT_LIMIT

#define LTP8800_VIN_UV_FAULT_LIMIT   0x59

◆ LTP8800_VOUT_COMMAND

#define LTP8800_VOUT_COMMAND   0x21

◆ LTP8800_VOUT_COMMAND_DEFAULT

#define LTP8800_VOUT_COMMAND_DEFAULT   0x3000

◆ LTP8800_VOUT_COMMAND_MAX

#define LTP8800_VOUT_COMMAND_MAX   1100

◆ LTP8800_VOUT_COMMAND_MIN

#define LTP8800_VOUT_COMMAND_MIN   500

◆ LTP8800_VOUT_MODE

#define LTP8800_VOUT_MODE   0x20

◆ LTP8800_VOUT_MODE_VAL_MSK

#define LTP8800_VOUT_MODE_VAL_MSK   NO_OS_GENMASK(4,0)

◆ LTP8800_VOUT_SCALE_LOOP

#define LTP8800_VOUT_SCALE_LOOP   0x29

◆ LTP8800_VOUT_SCALE_MONITOR

#define LTP8800_VOUT_SCALE_MONITOR   0x2A

◆ LTP8800_WRITE_PROTECT

#define LTP8800_WRITE_PROTECT   0x10

◆ LTP8800_WRITE_PROTECT_1_BIT

#define LTP8800_WRITE_PROTECT_1_BIT   NO_OS_BIT(7)

◆ LTP8800_WRITE_PROTECT_2_BIT

#define LTP8800_WRITE_PROTECT_2_BIT   NO_OS_BIT(6)

◆ LTP8800_WRITE_PROTECT_3_BIT

#define LTP8800_WRITE_PROTECT_3_BIT   NO_OS_BIT(5)

Enumeration Type Documentation

◆ ltp8800_limit_type

Enumerator
LTP8800_VIN_OV_FAULT_LIMIT_TYPE 
LTP8800_VIN_UV_FAULT_LIMIT_TYPE 
LTP8800_IIN_OC_FAULT_LIMIT_TYPE 
LTP8800_POUT_OP_FAULT_LIMIT_TYPE 

◆ ltp8800_status_type

Enumerator
LTP8800_STATUS_BYTE_TYPE 
LTP8800_STATUS_VOUT_TYPE 
LTP8800_STATUS_IOUT_TYPE 
LTP8800_STATUS_INPUT_TYPE 
LTP8800_STATUS_TEMP_TYPE 
LTP8800_STATUS_CML_TYPE 
LTP8800_STATUS_MFR_SPECIFIC_TYPE 
LTP8800_STATUS_WORD_TYPE 
LTP8800_STATUS_ALL_TYPE 

◆ ltp8800_value_type

Enumerator
LTP8800_VIN 
LTP8800_IIN 
LTP8800_VOUT 
LTP8800_IOUT 
LTP8800_FORWARD_DIODE_TEMP 
LTP8800_REVERSE_DIODE_TEMP 
LTP8800_DUTY_CYCLE 
LTP8800_FREQUENCY 
LTP8800_POUT 

◆ ltp8800_vout_settings

Enumerator
LTP8800_VOUT_SETTING_ADI_FACTORY 
LTP8800_VOUT_SETTING_UNITY 

Function Documentation

◆ ltp8800_init()

int ltp8800_init ( struct ltp8800_dev **  device,
struct ltp8800_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:

◆ ltp8800_interleave_order()

int ltp8800_interleave_order ( struct ltp8800_dev dev,
uint8_t  order 
)

Set phase order for polyphase application.

Parameters
dev- Device structure
order- Order number. The resulting phase offset of the device is equivalent to this value multiplied by 22.5 degrees.
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltp8800_loop_compensation()

int ltp8800_loop_compensation ( struct ltp8800_dev dev,
uint8_t  pole,
uint8_t  zero,
uint8_t  hf_gain,
uint8_t  lf_gain 
)

Program loop compensation for regulator transient response.

Parameters
dev- Device structure
pole- Pole setting
zero- Zero setting
hf_gain- High frequency gain setting
lf_gain- Low frequence gain setting
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltp8800_read_block_data()

int ltp8800_read_block_data ( struct ltp8800_dev dev,
uint16_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- Size of the block in bytes
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltp8800_read_byte()

int ltp8800_read_byte ( struct ltp8800_dev dev,
uint16_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:

◆ ltp8800_read_status()

int ltp8800_read_status ( struct ltp8800_dev dev,
enum ltp8800_status_type  status_type,
struct ltp8800_status status 
)

Read statuses.

Parameters
dev- Device structure
status_type- Status type. Example values: LTP8800_STATUS_BYTE_TYPE LTP8800_STATUS_VOUT_TYPE LTP8800_STATUS_IOUT_TYPE LTP8800_STATUS_INPUT_TYPE LTP8800_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:

◆ ltp8800_read_value()

int ltp8800_read_value ( struct ltp8800_dev dev,
enum ltp8800_value_type  value_type,
int *  value 
)

Read a value.

Parameters
dev- Device structure
value_type- Value type. Example values: LTP8800_VIN LTP8800_VOUT LTP8800_IIN LTP8800_IOUT LTP8800_TEMP LTP8800_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:

◆ ltp8800_read_word()

int ltp8800_read_word ( struct ltp8800_dev dev,
uint16_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:

◆ ltp8800_read_word_data()

int ltp8800_read_word_data ( struct ltp8800_dev dev,
uint16_t  cmd,
int *  data 
)

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

Parameters
dev- Device structure
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:

◆ ltp8800_remove()

int ltp8800_remove ( struct ltp8800_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:

◆ ltp8800_restore_user_settings()

int ltp8800_restore_user_settings ( struct ltp8800_dev dev)

Restore user settings.

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

◆ ltp8800_send_byte()

int ltp8800_send_byte ( struct ltp8800_dev dev,
uint16_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:

◆ ltp8800_set_device_state()

int ltp8800_set_device_state ( struct ltp8800_dev dev,
bool  state 
)

Set device state.

Parameters
dev- Device structure
state- Set to true to enable device, false to disable
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltp8800_set_fault_limit()

int ltp8800_set_fault_limit ( struct ltp8800_dev dev,
enum ltp8800_limit_type  limit,
int  limit_val 
)

Set overvalue and undervalue limits.

Parameters
dev- Device structure
limit- Limit value type. Example: LTP8800_VIN_OV_FAULT_LIMIT_TYPE LTP8800_VIN_UV_FAULT_LIMIT_TYPE LTP8800_IIN_OC_FAULT_LIMIT_TYPE LTP8800_POUT_OP_FAULT_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
Here is the caller graph for this function:

◆ ltp8800_set_vin()

int ltp8800_set_vin ( struct ltp8800_dev dev,
int  vin_on,
int  vin_off 
)

Set input voltage window at which power conversion will proceed.

Parameters
dev- Device structure
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
Here is the caller graph for this function:

◆ ltp8800_store_user_settings()

int ltp8800_store_user_settings ( struct ltp8800_dev dev)

Store user settings to EEPROM.

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

◆ ltp8800_sync_config()

int ltp8800_sync_config ( struct ltp8800_dev dev,
bool  enable 
)

Enable or disable sync pin.

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

◆ ltp8800_vout_settings()

int ltp8800_vout_settings ( struct ltp8800_dev dev,
enum ltp8800_vout_settings  settings 
)

Set output voltage and its upper limit.

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

◆ ltp8800_vout_value()

int ltp8800_vout_value ( struct ltp8800_dev dev,
int  vout_command 
)

Set output voltage command.

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

◆ ltp8800_write_byte()

int ltp8800_write_byte ( struct ltp8800_dev dev,
uint16_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:

◆ ltp8800_write_word()

int ltp8800_write_word ( struct ltp8800_dev dev,
uint16_t  cmd,
uint16_t  word 
)

Perform a raw PMBus write word operation.

Parameters
dev- Device structure
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:

◆ ltp8800_write_word_data()

int ltp8800_write_word_data ( struct ltp8800_dev dev,
uint16_t  cmd,
int  data 
)

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

Parameters
dev- Device structure
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: