no-OS
Classes | Macros | Enumerations | Functions
ltm4686.h File Reference

Header file of the LTM4686 driver. More...

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

Go to the source code of this file.

Classes

struct  ltm4686_dev
 
struct  ltm4686_init_param
 
struct  ltm4686_chip_info
 
struct  ltm4686_status
 

Macros

#define LTM4686_PAGE   0x00
 
#define LTM4686_OPERATION   0x01
 
#define LTM4686_ON_OFF_CONFIG   0x02
 
#define LTM4686_CLEAR_FAULTS   0x03
 
#define LTM4686_PAGE_PLUS_WRITE   0x05
 
#define LTM4686_PAGE_PLUS_READ   0x06
 
#define LTM4686_WRITE_PROTECT   0x10
 
#define LTM4686_STORE_USER_ALL   0x15
 
#define LTM4686_RESTORE_USER_ALL   0x16
 
#define LTM4686_CAPABILITY   0x19
 
#define LTM4686_SMBALERT_MASK   0x1B
 
#define LTM4686_VOUT_MODE   0x20
 
#define LTM4686_VOUT_COMMAND   0x21
 
#define LTM4686_VOUT_MAX   0x24
 
#define LTM4686_VOUT_MARGIN_HIGH   0x25
 
#define LTM4686_VOUT_MARGIN_LOW   0x26
 
#define LTM4686_VOUT_TRANSITION_RATE   0x27
 
#define LTM4686_FREQUENCY_SWITCH   0x33
 
#define LTM4686_VIN_ON   0x35
 
#define LTM4686_VIN_OFF   0x36
 
#define LTM4686_IOUT_CAL_GAIN   0x38
 
#define LTM4686_VOUT_OV_FAULT_LIMIT   0x40
 
#define LTM4686_VOUT_OV_FAULT_RESPONSE   0x41
 
#define LTM4686_VOUT_OV_WARN_LIMIT   0x42
 
#define LTM4686_VOUT_UV_WARN_LIMIT   0x43
 
#define LTM4686_VOUT_UV_FAULT_LIMIT   0x44
 
#define LTM4686_VOUT_UV_FAULT_RESPONSE   0x45
 
#define LTM4686_IOUT_OC_FAULT_LIMIT   0x46
 
#define LTM4686_IOUT_OC_FAULT_RESPONSE   0x47
 
#define LTM4686_IOUT_OC_WARN_LIMIT   0x4A
 
#define LTM4686_OT_FAULT_LIMIT   0x4F
 
#define LTM4686_OT_FAULT_RESPONSE   0x50
 
#define LTM4686_OT_WARN_LIMIT   0x51
 
#define LTM4686_UT_FAULT_LIMIT   0x53
 
#define LTM4686_UT_FAULT_RESPONSE   0x54
 
#define LTM4686_VIN_OV_FAULT_LIMIT   0x55
 
#define LTM4686_VIN_OV_FAULT_RESPONSE   0x56
 
#define LTM4686_VIN_UV_WARN_LIMIT   0x58
 
#define LTM4686_IIN_OC_WARN_LIMIT   0x5D
 
#define LTM4686_TON_DELAY   0x60
 
#define LTM4686_TON_RISE   0x61
 
#define LTM4686_TON_MAX_FAULT_LIMIT   0x62
 
#define LTM4686_TON_MAX_FAULT_RESPONSE   0x63
 
#define LTM4686_TOFF_DELAY   0x64
 
#define LTM4686_TOFF_FALL   0x65
 
#define LTM4686_TOFF_MAX_WARN_LIMIT   0x66
 
#define LTM4686_STATUS_BYTE   0x78
 
#define LTM4686_STATUS_WORD   0x79
 
#define LTM4686_STATUS_VOUT   0x7A
 
#define LTM4686_STATUS_IOUT   0x7B
 
#define LTM4686_STATUS_INPUT   0x7C
 
#define LTM4686_STATUS_TEMPERATURE   0x7D
 
#define LTM4686_STATUS_CML   0x7E
 
#define LTM4686_STATUS_MFR_SPECIFIC   0x80
 
#define LTM4686_READ_VIN   0x88
 
#define LTM4686_READ_IIN   0x89
 
#define LTM4686_READ_VOUT   0x8B
 
#define LTM4686_READ_IOUT   0x8C
 
#define LTM4686_READ_TEMPERATURE_1   0x8D
 
#define LTM4686_READ_TEMPERATURE_2   0x8E
 
#define LTM4686_READ_DUTY_CYCLE   0x94
 
#define LTM4686_READ_POUT   0x96
 
#define LTM4686_REVISION   0x98
 
#define LTM4686_MFR_ID   0x99
 
#define LTM4686_MFR_MODEL   0x9A
 
#define LTM4686_MFR_SERIAL   0x9E
 
#define LTM4686_MFR_VOUT_MAX   0xA5
 
#define LTM4686_MFR_USER_DATA_00   0xB0
 
#define LTM4686_MFR_USER_DATA_01   0xB1
 
#define LTM4686_MFR_USER_DATA_02   0xB2
 
#define LTM4686_MFR_USER_DATA_03   0xB3
 
#define LTM4686_MFR_USER_DATA_04   0xB4
 
#define LTM4686_MFR_INFO   0xB6
 
#define LTM4686_MFR_EE_UNLOCK   0xBD
 
#define LTM4686_MFR_EE_ERASE   0xBE
 
#define LTM4686_MFR_EE_DATA   0xBF
 
#define LTM4686_MFR_CHAN_CONFIG   0xD0
 
#define LTM4686_MFR_CONFIG_ALL   0xD1
 
#define LTM4686_MFR_GPIO_PROPAGATE   0xD2
 
#define LTM4686_MFR_PWM_MODE   0xD4
 
#define LTM4686_MFR_GPIO_RESPONSE   0xD5
 
#define LTM4686_MFR_OT_FAULT_RESPONSE   0xD6
 
#define LTM4686_MFR_IOUT_PEAK   0xD7
 
#define LTM4686_MFR_ADC_CONTROL   0xD8
 
#define LTM4686_MFR_ADC_TELEMETRY_STATUS   0xDA
 
#define LTM4686_MFR_RETRY_DELAY   0xDB
 
#define LTM4686_MFR_RESTART_DELAY   0xDC
 
#define LTM4686_MFR_VOUT_PEAK   0xDD
 
#define LTM4686_MFR_VIN_PEAK   0xDE
 
#define LTM4686_MFR_TEMPERATURE_1_PEAK   0xDF
 
#define LTM4686_MFR_CLEAR_PEAKS   0xE3
 
#define LTM4686_MFR_PADS   0xE5
 
#define LTM4686_MFR_ADDRESS   0xE6
 
#define LTM4686_MFR_SPECIAL_ID   0xE7
 
#define LTM4686_MFR_IIN_OFFSET   0xE9
 
#define LTM4686_MFR_FAULT_LOG_STORE   0xEA
 
#define LTM4686_MFR_FAULT_LOG_CLEAR   0xEC
 
#define LTM4686_MFR_READ_IIN   0xED
 
#define LTM4686_MFR_FAULT_LOG   0xEE
 
#define LTM4686_MFR_COMMON   0xEF
 
#define LTM4686_MFR_COMPARE_USER_ALL   0xF0
 
#define LTM4686_MFR_TEMPERATURE_2_PEAK   0xF4
 
#define LTM4686_MFR_PWM_CONFIG   0xF5
 
#define LTM4686_MFR_IOUT_CAL_GAIN_TC   0xF6
 
#define LTM4686_MFR_TEMP_1_GAIN   0xF8
 
#define LTM4686_MFR_TEMP_1_OFFSET   0xF9
 
#define LTM4686_MFR_RAIL_ADDRESS   0xFA
 
#define LTM4686_MFR_RESET   0xFD
 
#define LTM4673_MFR_FAULTB0_PROPAGATE   0xD2
 
#define LTM4673_MFR_FAULTB1_PROPAGATE   0xD3
 
#define LTM4673_MFR_PWRGD_ENABLE   0xD4
 
#define LTM4673_MFR_FAULTB0_RESPONSE   0xD5
 
#define LTM4673_MFR_FAULTB1_RESPONSE   0xD6
 
#define LTM4673_MFR_IOUT_MIN   0xD8
 
#define LTM4673_MFR_CONFIG2   0xD9
 
#define LTM4673_MFR_CONFIG3   0xDA
 
#define LTM4673_MFR_DAC   0xE0
 
#define LTM4673_MFR_PGD_ASSERTION_DELAY   0xE1
 
#define LTM4673_MFR_WATCHDOG_T_FIRST   0xE2
 
#define LTM4673_MFR_WATCHDOG_T   0xE3
 
#define LTM4673_MFR_PAGE_FF_MASK   0xE4
 
#define LTM4673_MFR_IIN_CAL_GAIN   0xE8
 
#define LTM4673_MFR_VOUT_DISCHARGE_THRESHOLD   0xE9
 
#define LTM4673_MFR_FAULT_LOG_RESTORE   0xEB
 
#define LTM4673_MFR_FAULT_LOG_STATUS   0xED
 
#define LTM4673_MFR_RETRY_COUNT   0xF7
 
#define LTM4673_MFR_IOUT_SENSE_VOLTAGE   0xFA
 
#define LTM4673_MFR_VOUT_MIN   0xFB
 
#define LTM4673_MFR_VIN_MIN   0xFC
 
#define LTM4673_MFR_TEMPERATURE_1_MIN   0xFD
 
#define LTM4686_CRC_POLYNOMIAL   0x7
 
#define LTM4686_VOUT_MODE_VAL_MSK   NO_OS_GENMASK(4,0)
 
#define LTM4686_LIN11_MANTISSA_MAX   1023L
 
#define LTM4686_LIN11_MANTISSA_MIN   511L
 
#define LTM4686_LIN11_EXPONENT_MAX   15
 
#define LTM4686_LIN11_EXPONENT_MIN   -15
 
#define LTM4686_LIN11_MANTISSA_MSK   NO_OS_GENMASK(10,0)
 
#define LTM4686_LIN11_EXPONENT_MSK   NO_OS_GENMASK(15,11)
 
#define LTM4686_LIN11_EXPONENT(x)   ((int16_t)(x) >> 11)
 
#define LTM4686_LIN11_MANTISSA(x)   (((int16_t)((x & 0x7FF) << 5)) >> 5)
 
#define LTM4686_LIN16_EXPONENT   -12
 
#define LTM4686_CHAN_0   0x0
 
#define LTM4686_CHAN_1   0x1
 
#define LTM4686_CHAN_2   0x2
 
#define LTM4686_CHAN_3   0x3
 
#define LTM4686_CHAN_ALL   0xFF
 
#define LTM4686_STATUS_BYTE_TYPE_MSK   0x01
 
#define LTM4686_STATUS_VOUT_TYPE_MSK   0x02
 
#define LTM4686_STATUS_IOUT_TYPE_MSK   0x04
 
#define LTM4686_STATUS_INPUT_TYPE_MSK   0x08
 
#define LTM4686_STATUS_TEMP_TYPE_MSK   0x10
 
#define LTM4686_STATUS_CML_TYPE_MSK   0x20
 
#define LTM4686_STATUS_MFR_SPECIFIC_TYPE_MSK   0x40
 
#define LTM4686_STATUS_WORD_TYPE_MSK   0x80
 
#define LTM4686_STATUS_ALL_TYPE_MSK   0xFF
 
#define LTM4686_PWM_OP_MODE_BIT   NO_OS_BIT(0)
 
#define LTM4686_CONFIG_ALL_DIS_SYNC_BIT   NO_OS_BIT(4)
 
#define LTM4686_CONFIG_ALL_PEC_BIT   NO_OS_BIT(2)
 
#define LTM4686_ID_MSK   0xFFF0
 
#define LTM4686_SPECIAL_ID_VALUE   0x4770
 
#define LTM4673_SPECIAL_ID_VALUE_REV_1   0x0230
 
#define LTM4673_SPECIAL_ID_VALUE_REV_2   0x4480
 

Enumerations

enum  ltm4686_chip_id {
  ID_LTM4686,
  ID_LTM4686B,
  ID_LTM4673
}
 
enum  ltm4686_fault_pin_config {
  LTM4686_FAULT_PIN_INPUT,
  LTM4686_FAULT_PIN_OUTPUT
}
 
enum  ltm4686_operation_type {
  LTM4686_OPERATION_OFF = 0x00,
  LTM4686_OPERATION_ON = 0x80,
  LTM4686_OPERATION_MARGIN_LOW = 0x98,
  LTM4686_OPERATION_MARGIN_HIGH = 0xA8,
  LTM4686_OPERATION_SEQ_OFF = 0x40
}
 
enum  ltm4686_value_type {
  LTM4686_VIN = LTM4686_READ_VIN,
  LTM4686_IIN = LTM4686_READ_IIN,
  LTM4686_VOUT = LTM4686_READ_VOUT,
  LTM4686_IOUT = LTM4686_READ_IOUT,
  LTM4686_TEMP_TSNS = LTM4686_READ_TEMPERATURE_1,
  LTM4686_TEMP_IC = LTM4686_READ_TEMPERATURE_2,
  LTM4686_DUTY_CYCLE = LTM4686_READ_DUTY_CYCLE,
  LTM4686_POUT = LTM4686_READ_POUT,
  LTM4686_IOUT_PEAK = LTM4686_MFR_IOUT_PEAK,
  LTM4686_VOUT_PEAK = LTM4686_MFR_VOUT_PEAK,
  LTM4686_VIN_PEAK = LTM4686_MFR_VIN_PEAK,
  LTM4686_TEMP_PEAK = LTM4686_MFR_TEMPERATURE_1_PEAK
}
 
enum  ltm4686_status_type {
  LTM4686_STATUS_ALL_TYPE = LTM4686_STATUS_ALL_TYPE_MSK,
  LTM4686_STATUS_BYTE_TYPE = LTM4686_STATUS_BYTE_TYPE_MSK,
  LTM4686_STATUS_VOUT_TYPE = LTM4686_STATUS_VOUT_TYPE_MSK,
  LTM4686_STATUS_IOUT_TYPE = LTM4686_STATUS_IOUT_TYPE_MSK,
  LTM4686_STATUS_INPUT_TYPE = LTM4686_STATUS_INPUT_TYPE_MSK,
  LTM4686_STATUS_TEMP_TYPE = LTM4686_STATUS_TEMP_TYPE_MSK,
  LTM4686_STATUS_CML_TYPE = LTM4686_STATUS_CML_TYPE_MSK,
  LTM4686_STATUS_MFR_SPECIFIC_TYPE = LTM4686_STATUS_MFR_SPECIFIC_TYPE_MSK,
  LTM4686_STATUS_WORD_TYPE = LTM4686_STATUS_WORD_TYPE_MSK
}
 
enum  ltm4686_timing_type {
  LTM4686_TON_DELAY_TYPE = LTM4686_TON_DELAY,
  LTM4686_TON_RISE_TYPE = LTM4686_TON_RISE,
  LTM4686_TOFF_DELAY_TYPE = LTM4686_TOFF_DELAY,
  LTM4686_TOFF_FALL_TYPE = LTM4686_TOFF_FALL,
  LT7182_RETRY_DELAY = LTM4686_MFR_RETRY_DELAY,
  LTM4686_RESTART_DELAY = LTM4686_MFR_RESTART_DELAY
}
 
enum  ltm4686_freq {
  LTM4686_FREQ_EXT_OSC,
  LTM4686_FREQ_250_KHZ = 0xF3E8,
  LTM4686_FREQ_350_KHZ = 0xFABC,
  LTM4686_FREQ_425_KHZ = 0xFB52,
  LTM4686_FREQ_500_KHZ = 0xFBE8,
  LTM4686_FREQ_575_KHZ = 0x023F,
  LTM4686_FREQ_650_KHZ = 0x028A,
  LTM4686_FREQ_750_KHZ = 0x02EE,
  LTM4686_FREQ_1000_KHZ = 0x03E8
}
 
enum  ltm4686_nvm_cmd_type {
  LTM4686_STORE_USER = LTM4686_STORE_USER_ALL,
  LTM4686_RESTORE_USER = LTM4686_RESTORE_USER_ALL,
  LTM4686_COMPARE_USER = LTM4686_MFR_COMPARE_USER_ALL
}
 
enum  ltm4686_pwm_mode {
  LTM4686_PWM_FORCED_CONTINUOUS_MODE,
  LTM4686_PWM_PULSE_SKIP_MODE
}
 

Functions

int ltm4686_init (struct ltm4686_dev **device, struct ltm4686_init_param *init_param)
 Initialize the device structure. More...
 
int ltm4686_remove (struct ltm4686_dev *dev)
 Free or remove device instance. More...
 
int ltm4686_set_page (struct ltm4686_dev *dev, int page)
 Set page of the device. Page 0x0 - Channel 0 Page 0x1 - Channel 1 Page 0x2 - Channel 2 Page 0x3 - Channel 3 Page 0xff - All channels. More...
 
int ltm4686_send_byte (struct ltm4686_dev *dev, int page, uint8_t cmd)
 Send a PMBus command to the device. More...
 
int ltm4686_read_byte (struct ltm4686_dev *dev, int page, uint8_t cmd, uint8_t *data)
 Perform a raw PMBus read byte operation. More...
 
int ltm4686_write_byte (struct ltm4686_dev *dev, int page, uint8_t cmd, uint8_t value)
 Perform a raw PMBus write byte operation. More...
 
int ltm4686_read_word (struct ltm4686_dev *dev, int page, uint8_t cmd, uint16_t *word)
 Perform a raw PMBus read word operation. More...
 
int ltm4686_write_word (struct ltm4686_dev *dev, int page, uint8_t cmd, uint16_t word)
 Perform a raw PMBus write word operation. More...
 
int ltm4686_read_word_data (struct ltm4686_dev *dev, int page, uint8_t cmd, int *data)
 Perform a PMBus read word operation and converts to actual value. More...
 
int ltm4686_write_word_data (struct ltm4686_dev *dev, int page, uint8_t cmd, int data)
 Converts value to register data and do PMBus write word operation. More...
 
int ltm4686_read_block_data (struct ltm4686_dev *dev, int page, uint8_t cmd, uint8_t *data, size_t nbytes)
 Perform a PMBus read block operation. More...
 
int ltm4686_read_value (struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_value_type value_type, int *value)
 Read a value. More...
 
int ltm4686_read_status (struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_status_type status_type, struct ltm4686_status *status)
 Read statuses. More...
 
int ltm4686_vout_value (struct ltm4686_dev *dev, uint8_t channel, int vout_command, int vout_max)
 Set output voltage and its upper limit. More...
 
int ltm4686_vout_tr (struct ltm4686_dev *dev, uint8_t channel, int tr)
 Set output voltage transition rate. More...
 
int ltm4686_vout_margin (struct ltm4686_dev *dev, uint8_t channel, int margin_low, int margin_high)
 Set output voltage margin. More...
 
int ltm4686_set_vin (struct ltm4686_dev *dev, int vin_on, int vin_off)
 Set input voltage window at which power conversion will proceed. More...
 
int ltm4686_set_timing (struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_timing_type timing_type, int time)
 Set timing values. More...
 
int ltm4686_switch_freq (struct ltm4686_dev *dev, enum ltm4686_freq freq)
 Set switching frequency. More...
 
int ltm4686_pwm_mode (struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_pwm_mode pwm_mode)
 Sets the PWM mode for a specific channel of the LTM4686 device. More...
 
int ltm4686_set_operation (struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_operation_type operation)
 Set channel operation. More...
 
int ltm4686_nvm_cmd (struct ltm4686_dev *dev, enum ltm4686_nvm_cmd_type cmd)
 Perform commands for non-volatile memory/EEPROM. More...
 
int ltm4686_software_reset (struct ltm4686_dev *dev)
 Perform a device software reset. More...
 

Detailed Description

Header file of the LTM4686 driver.

Author
Cedric Justine Encarnacion (cedri.nosp@m.cjus.nosp@m.tine..nosp@m.enca.nosp@m.rnaci.nosp@m.on@a.nosp@m.nalog.nosp@m..com)

Copyright 2024(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

◆ LTM4673_MFR_CONFIG2

#define LTM4673_MFR_CONFIG2   0xD9

◆ LTM4673_MFR_CONFIG3

#define LTM4673_MFR_CONFIG3   0xDA

◆ LTM4673_MFR_DAC

#define LTM4673_MFR_DAC   0xE0

◆ LTM4673_MFR_FAULT_LOG_RESTORE

#define LTM4673_MFR_FAULT_LOG_RESTORE   0xEB

◆ LTM4673_MFR_FAULT_LOG_STATUS

#define LTM4673_MFR_FAULT_LOG_STATUS   0xED

◆ LTM4673_MFR_FAULTB0_PROPAGATE

#define LTM4673_MFR_FAULTB0_PROPAGATE   0xD2

◆ LTM4673_MFR_FAULTB0_RESPONSE

#define LTM4673_MFR_FAULTB0_RESPONSE   0xD5

◆ LTM4673_MFR_FAULTB1_PROPAGATE

#define LTM4673_MFR_FAULTB1_PROPAGATE   0xD3

◆ LTM4673_MFR_FAULTB1_RESPONSE

#define LTM4673_MFR_FAULTB1_RESPONSE   0xD6

◆ LTM4673_MFR_IIN_CAL_GAIN

#define LTM4673_MFR_IIN_CAL_GAIN   0xE8

◆ LTM4673_MFR_IOUT_MIN

#define LTM4673_MFR_IOUT_MIN   0xD8

◆ LTM4673_MFR_IOUT_SENSE_VOLTAGE

#define LTM4673_MFR_IOUT_SENSE_VOLTAGE   0xFA

◆ LTM4673_MFR_PAGE_FF_MASK

#define LTM4673_MFR_PAGE_FF_MASK   0xE4

◆ LTM4673_MFR_PGD_ASSERTION_DELAY

#define LTM4673_MFR_PGD_ASSERTION_DELAY   0xE1

◆ LTM4673_MFR_PWRGD_ENABLE

#define LTM4673_MFR_PWRGD_ENABLE   0xD4

◆ LTM4673_MFR_RETRY_COUNT

#define LTM4673_MFR_RETRY_COUNT   0xF7

◆ LTM4673_MFR_TEMPERATURE_1_MIN

#define LTM4673_MFR_TEMPERATURE_1_MIN   0xFD

◆ LTM4673_MFR_VIN_MIN

#define LTM4673_MFR_VIN_MIN   0xFC

◆ LTM4673_MFR_VOUT_DISCHARGE_THRESHOLD

#define LTM4673_MFR_VOUT_DISCHARGE_THRESHOLD   0xE9

◆ LTM4673_MFR_VOUT_MIN

#define LTM4673_MFR_VOUT_MIN   0xFB

◆ LTM4673_MFR_WATCHDOG_T

#define LTM4673_MFR_WATCHDOG_T   0xE3

◆ LTM4673_MFR_WATCHDOG_T_FIRST

#define LTM4673_MFR_WATCHDOG_T_FIRST   0xE2

◆ LTM4673_SPECIAL_ID_VALUE_REV_1

#define LTM4673_SPECIAL_ID_VALUE_REV_1   0x0230

◆ LTM4673_SPECIAL_ID_VALUE_REV_2

#define LTM4673_SPECIAL_ID_VALUE_REV_2   0x4480

◆ LTM4686_CAPABILITY

#define LTM4686_CAPABILITY   0x19

◆ LTM4686_CHAN_0

#define LTM4686_CHAN_0   0x0

◆ LTM4686_CHAN_1

#define LTM4686_CHAN_1   0x1

◆ LTM4686_CHAN_2

#define LTM4686_CHAN_2   0x2

◆ LTM4686_CHAN_3

#define LTM4686_CHAN_3   0x3

◆ LTM4686_CHAN_ALL

#define LTM4686_CHAN_ALL   0xFF

◆ LTM4686_CLEAR_FAULTS

#define LTM4686_CLEAR_FAULTS   0x03

◆ LTM4686_CONFIG_ALL_DIS_SYNC_BIT

#define LTM4686_CONFIG_ALL_DIS_SYNC_BIT   NO_OS_BIT(4)

◆ LTM4686_CONFIG_ALL_PEC_BIT

#define LTM4686_CONFIG_ALL_PEC_BIT   NO_OS_BIT(2)

◆ LTM4686_CRC_POLYNOMIAL

#define LTM4686_CRC_POLYNOMIAL   0x7

◆ LTM4686_FREQUENCY_SWITCH

#define LTM4686_FREQUENCY_SWITCH   0x33

◆ LTM4686_ID_MSK

#define LTM4686_ID_MSK   0xFFF0

◆ LTM4686_IIN_OC_WARN_LIMIT

#define LTM4686_IIN_OC_WARN_LIMIT   0x5D

◆ LTM4686_IOUT_CAL_GAIN

#define LTM4686_IOUT_CAL_GAIN   0x38

◆ LTM4686_IOUT_OC_FAULT_LIMIT

#define LTM4686_IOUT_OC_FAULT_LIMIT   0x46

◆ LTM4686_IOUT_OC_FAULT_RESPONSE

#define LTM4686_IOUT_OC_FAULT_RESPONSE   0x47

◆ LTM4686_IOUT_OC_WARN_LIMIT

#define LTM4686_IOUT_OC_WARN_LIMIT   0x4A

◆ LTM4686_LIN11_EXPONENT

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

◆ LTM4686_LIN11_EXPONENT_MAX

#define LTM4686_LIN11_EXPONENT_MAX   15

◆ LTM4686_LIN11_EXPONENT_MIN

#define LTM4686_LIN11_EXPONENT_MIN   -15

◆ LTM4686_LIN11_EXPONENT_MSK

#define LTM4686_LIN11_EXPONENT_MSK   NO_OS_GENMASK(15,11)

◆ LTM4686_LIN11_MANTISSA

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

◆ LTM4686_LIN11_MANTISSA_MAX

#define LTM4686_LIN11_MANTISSA_MAX   1023L

◆ LTM4686_LIN11_MANTISSA_MIN

#define LTM4686_LIN11_MANTISSA_MIN   511L

◆ LTM4686_LIN11_MANTISSA_MSK

#define LTM4686_LIN11_MANTISSA_MSK   NO_OS_GENMASK(10,0)

◆ LTM4686_LIN16_EXPONENT

#define LTM4686_LIN16_EXPONENT   -12

◆ LTM4686_MFR_ADC_CONTROL

#define LTM4686_MFR_ADC_CONTROL   0xD8

◆ LTM4686_MFR_ADC_TELEMETRY_STATUS

#define LTM4686_MFR_ADC_TELEMETRY_STATUS   0xDA

◆ LTM4686_MFR_ADDRESS

#define LTM4686_MFR_ADDRESS   0xE6

◆ LTM4686_MFR_CHAN_CONFIG

#define LTM4686_MFR_CHAN_CONFIG   0xD0

◆ LTM4686_MFR_CLEAR_PEAKS

#define LTM4686_MFR_CLEAR_PEAKS   0xE3

◆ LTM4686_MFR_COMMON

#define LTM4686_MFR_COMMON   0xEF

◆ LTM4686_MFR_COMPARE_USER_ALL

#define LTM4686_MFR_COMPARE_USER_ALL   0xF0

◆ LTM4686_MFR_CONFIG_ALL

#define LTM4686_MFR_CONFIG_ALL   0xD1

◆ LTM4686_MFR_EE_DATA

#define LTM4686_MFR_EE_DATA   0xBF

◆ LTM4686_MFR_EE_ERASE

#define LTM4686_MFR_EE_ERASE   0xBE

◆ LTM4686_MFR_EE_UNLOCK

#define LTM4686_MFR_EE_UNLOCK   0xBD

◆ LTM4686_MFR_FAULT_LOG

#define LTM4686_MFR_FAULT_LOG   0xEE

◆ LTM4686_MFR_FAULT_LOG_CLEAR

#define LTM4686_MFR_FAULT_LOG_CLEAR   0xEC

◆ LTM4686_MFR_FAULT_LOG_STORE

#define LTM4686_MFR_FAULT_LOG_STORE   0xEA

◆ LTM4686_MFR_GPIO_PROPAGATE

#define LTM4686_MFR_GPIO_PROPAGATE   0xD2

◆ LTM4686_MFR_GPIO_RESPONSE

#define LTM4686_MFR_GPIO_RESPONSE   0xD5

◆ LTM4686_MFR_ID

#define LTM4686_MFR_ID   0x99

◆ LTM4686_MFR_IIN_OFFSET

#define LTM4686_MFR_IIN_OFFSET   0xE9

◆ LTM4686_MFR_INFO

#define LTM4686_MFR_INFO   0xB6

◆ LTM4686_MFR_IOUT_CAL_GAIN_TC

#define LTM4686_MFR_IOUT_CAL_GAIN_TC   0xF6

◆ LTM4686_MFR_IOUT_PEAK

#define LTM4686_MFR_IOUT_PEAK   0xD7

◆ LTM4686_MFR_MODEL

#define LTM4686_MFR_MODEL   0x9A

◆ LTM4686_MFR_OT_FAULT_RESPONSE

#define LTM4686_MFR_OT_FAULT_RESPONSE   0xD6

◆ LTM4686_MFR_PADS

#define LTM4686_MFR_PADS   0xE5

◆ LTM4686_MFR_PWM_CONFIG

#define LTM4686_MFR_PWM_CONFIG   0xF5

◆ LTM4686_MFR_PWM_MODE

#define LTM4686_MFR_PWM_MODE   0xD4

◆ LTM4686_MFR_RAIL_ADDRESS

#define LTM4686_MFR_RAIL_ADDRESS   0xFA

◆ LTM4686_MFR_READ_IIN

#define LTM4686_MFR_READ_IIN   0xED

◆ LTM4686_MFR_RESET

#define LTM4686_MFR_RESET   0xFD

◆ LTM4686_MFR_RESTART_DELAY

#define LTM4686_MFR_RESTART_DELAY   0xDC

◆ LTM4686_MFR_RETRY_DELAY

#define LTM4686_MFR_RETRY_DELAY   0xDB

◆ LTM4686_MFR_SERIAL

#define LTM4686_MFR_SERIAL   0x9E

◆ LTM4686_MFR_SPECIAL_ID

#define LTM4686_MFR_SPECIAL_ID   0xE7

◆ LTM4686_MFR_TEMP_1_GAIN

#define LTM4686_MFR_TEMP_1_GAIN   0xF8

◆ LTM4686_MFR_TEMP_1_OFFSET

#define LTM4686_MFR_TEMP_1_OFFSET   0xF9

◆ LTM4686_MFR_TEMPERATURE_1_PEAK

#define LTM4686_MFR_TEMPERATURE_1_PEAK   0xDF

◆ LTM4686_MFR_TEMPERATURE_2_PEAK

#define LTM4686_MFR_TEMPERATURE_2_PEAK   0xF4

◆ LTM4686_MFR_USER_DATA_00

#define LTM4686_MFR_USER_DATA_00   0xB0

◆ LTM4686_MFR_USER_DATA_01

#define LTM4686_MFR_USER_DATA_01   0xB1

◆ LTM4686_MFR_USER_DATA_02

#define LTM4686_MFR_USER_DATA_02   0xB2

◆ LTM4686_MFR_USER_DATA_03

#define LTM4686_MFR_USER_DATA_03   0xB3

◆ LTM4686_MFR_USER_DATA_04

#define LTM4686_MFR_USER_DATA_04   0xB4

◆ LTM4686_MFR_VIN_PEAK

#define LTM4686_MFR_VIN_PEAK   0xDE

◆ LTM4686_MFR_VOUT_MAX

#define LTM4686_MFR_VOUT_MAX   0xA5

◆ LTM4686_MFR_VOUT_PEAK

#define LTM4686_MFR_VOUT_PEAK   0xDD

◆ LTM4686_ON_OFF_CONFIG

#define LTM4686_ON_OFF_CONFIG   0x02

◆ LTM4686_OPERATION

#define LTM4686_OPERATION   0x01

◆ LTM4686_OT_FAULT_LIMIT

#define LTM4686_OT_FAULT_LIMIT   0x4F

◆ LTM4686_OT_FAULT_RESPONSE

#define LTM4686_OT_FAULT_RESPONSE   0x50

◆ LTM4686_OT_WARN_LIMIT

#define LTM4686_OT_WARN_LIMIT   0x51

◆ LTM4686_PAGE

#define LTM4686_PAGE   0x00

◆ LTM4686_PAGE_PLUS_READ

#define LTM4686_PAGE_PLUS_READ   0x06

◆ LTM4686_PAGE_PLUS_WRITE

#define LTM4686_PAGE_PLUS_WRITE   0x05

◆ LTM4686_PWM_OP_MODE_BIT

#define LTM4686_PWM_OP_MODE_BIT   NO_OS_BIT(0)

◆ LTM4686_READ_DUTY_CYCLE

#define LTM4686_READ_DUTY_CYCLE   0x94

◆ LTM4686_READ_IIN

#define LTM4686_READ_IIN   0x89

◆ LTM4686_READ_IOUT

#define LTM4686_READ_IOUT   0x8C

◆ LTM4686_READ_POUT

#define LTM4686_READ_POUT   0x96

◆ LTM4686_READ_TEMPERATURE_1

#define LTM4686_READ_TEMPERATURE_1   0x8D

◆ LTM4686_READ_TEMPERATURE_2

#define LTM4686_READ_TEMPERATURE_2   0x8E

◆ LTM4686_READ_VIN

#define LTM4686_READ_VIN   0x88

◆ LTM4686_READ_VOUT

#define LTM4686_READ_VOUT   0x8B

◆ LTM4686_RESTORE_USER_ALL

#define LTM4686_RESTORE_USER_ALL   0x16

◆ LTM4686_REVISION

#define LTM4686_REVISION   0x98

◆ LTM4686_SMBALERT_MASK

#define LTM4686_SMBALERT_MASK   0x1B

◆ LTM4686_SPECIAL_ID_VALUE

#define LTM4686_SPECIAL_ID_VALUE   0x4770

◆ LTM4686_STATUS_ALL_TYPE_MSK

#define LTM4686_STATUS_ALL_TYPE_MSK   0xFF

◆ LTM4686_STATUS_BYTE

#define LTM4686_STATUS_BYTE   0x78

◆ LTM4686_STATUS_BYTE_TYPE_MSK

#define LTM4686_STATUS_BYTE_TYPE_MSK   0x01

◆ LTM4686_STATUS_CML

#define LTM4686_STATUS_CML   0x7E

◆ LTM4686_STATUS_CML_TYPE_MSK

#define LTM4686_STATUS_CML_TYPE_MSK   0x20

◆ LTM4686_STATUS_INPUT

#define LTM4686_STATUS_INPUT   0x7C

◆ LTM4686_STATUS_INPUT_TYPE_MSK

#define LTM4686_STATUS_INPUT_TYPE_MSK   0x08

◆ LTM4686_STATUS_IOUT

#define LTM4686_STATUS_IOUT   0x7B

◆ LTM4686_STATUS_IOUT_TYPE_MSK

#define LTM4686_STATUS_IOUT_TYPE_MSK   0x04

◆ LTM4686_STATUS_MFR_SPECIFIC

#define LTM4686_STATUS_MFR_SPECIFIC   0x80

◆ LTM4686_STATUS_MFR_SPECIFIC_TYPE_MSK

#define LTM4686_STATUS_MFR_SPECIFIC_TYPE_MSK   0x40

◆ LTM4686_STATUS_TEMP_TYPE_MSK

#define LTM4686_STATUS_TEMP_TYPE_MSK   0x10

◆ LTM4686_STATUS_TEMPERATURE

#define LTM4686_STATUS_TEMPERATURE   0x7D

◆ LTM4686_STATUS_VOUT

#define LTM4686_STATUS_VOUT   0x7A

◆ LTM4686_STATUS_VOUT_TYPE_MSK

#define LTM4686_STATUS_VOUT_TYPE_MSK   0x02

◆ LTM4686_STATUS_WORD

#define LTM4686_STATUS_WORD   0x79

◆ LTM4686_STATUS_WORD_TYPE_MSK

#define LTM4686_STATUS_WORD_TYPE_MSK   0x80

◆ LTM4686_STORE_USER_ALL

#define LTM4686_STORE_USER_ALL   0x15

◆ LTM4686_TOFF_DELAY

#define LTM4686_TOFF_DELAY   0x64

◆ LTM4686_TOFF_FALL

#define LTM4686_TOFF_FALL   0x65

◆ LTM4686_TOFF_MAX_WARN_LIMIT

#define LTM4686_TOFF_MAX_WARN_LIMIT   0x66

◆ LTM4686_TON_DELAY

#define LTM4686_TON_DELAY   0x60

◆ LTM4686_TON_MAX_FAULT_LIMIT

#define LTM4686_TON_MAX_FAULT_LIMIT   0x62

◆ LTM4686_TON_MAX_FAULT_RESPONSE

#define LTM4686_TON_MAX_FAULT_RESPONSE   0x63

◆ LTM4686_TON_RISE

#define LTM4686_TON_RISE   0x61

◆ LTM4686_UT_FAULT_LIMIT

#define LTM4686_UT_FAULT_LIMIT   0x53

◆ LTM4686_UT_FAULT_RESPONSE

#define LTM4686_UT_FAULT_RESPONSE   0x54

◆ LTM4686_VIN_OFF

#define LTM4686_VIN_OFF   0x36

◆ LTM4686_VIN_ON

#define LTM4686_VIN_ON   0x35

◆ LTM4686_VIN_OV_FAULT_LIMIT

#define LTM4686_VIN_OV_FAULT_LIMIT   0x55

◆ LTM4686_VIN_OV_FAULT_RESPONSE

#define LTM4686_VIN_OV_FAULT_RESPONSE   0x56

◆ LTM4686_VIN_UV_WARN_LIMIT

#define LTM4686_VIN_UV_WARN_LIMIT   0x58

◆ LTM4686_VOUT_COMMAND

#define LTM4686_VOUT_COMMAND   0x21

◆ LTM4686_VOUT_MARGIN_HIGH

#define LTM4686_VOUT_MARGIN_HIGH   0x25

◆ LTM4686_VOUT_MARGIN_LOW

#define LTM4686_VOUT_MARGIN_LOW   0x26

◆ LTM4686_VOUT_MAX

#define LTM4686_VOUT_MAX   0x24

◆ LTM4686_VOUT_MODE

#define LTM4686_VOUT_MODE   0x20

◆ LTM4686_VOUT_MODE_VAL_MSK

#define LTM4686_VOUT_MODE_VAL_MSK   NO_OS_GENMASK(4,0)

◆ LTM4686_VOUT_OV_FAULT_LIMIT

#define LTM4686_VOUT_OV_FAULT_LIMIT   0x40

◆ LTM4686_VOUT_OV_FAULT_RESPONSE

#define LTM4686_VOUT_OV_FAULT_RESPONSE   0x41

◆ LTM4686_VOUT_OV_WARN_LIMIT

#define LTM4686_VOUT_OV_WARN_LIMIT   0x42

◆ LTM4686_VOUT_TRANSITION_RATE

#define LTM4686_VOUT_TRANSITION_RATE   0x27

◆ LTM4686_VOUT_UV_FAULT_LIMIT

#define LTM4686_VOUT_UV_FAULT_LIMIT   0x44

◆ LTM4686_VOUT_UV_FAULT_RESPONSE

#define LTM4686_VOUT_UV_FAULT_RESPONSE   0x45

◆ LTM4686_VOUT_UV_WARN_LIMIT

#define LTM4686_VOUT_UV_WARN_LIMIT   0x43

◆ LTM4686_WRITE_PROTECT

#define LTM4686_WRITE_PROTECT   0x10

Enumeration Type Documentation

◆ ltm4686_chip_id

Enumerator
ID_LTM4686 
ID_LTM4686B 
ID_LTM4673 

◆ ltm4686_fault_pin_config

Enumerator
LTM4686_FAULT_PIN_INPUT 
LTM4686_FAULT_PIN_OUTPUT 

◆ ltm4686_freq

Enumerator
LTM4686_FREQ_EXT_OSC 
LTM4686_FREQ_250_KHZ 
LTM4686_FREQ_350_KHZ 
LTM4686_FREQ_425_KHZ 
LTM4686_FREQ_500_KHZ 
LTM4686_FREQ_575_KHZ 
LTM4686_FREQ_650_KHZ 
LTM4686_FREQ_750_KHZ 
LTM4686_FREQ_1000_KHZ 

◆ ltm4686_nvm_cmd_type

Enumerator
LTM4686_STORE_USER 
LTM4686_RESTORE_USER 
LTM4686_COMPARE_USER 

◆ ltm4686_operation_type

Enumerator
LTM4686_OPERATION_OFF 
LTM4686_OPERATION_ON 
LTM4686_OPERATION_MARGIN_LOW 
LTM4686_OPERATION_MARGIN_HIGH 
LTM4686_OPERATION_SEQ_OFF 

◆ ltm4686_pwm_mode

Enumerator
LTM4686_PWM_FORCED_CONTINUOUS_MODE 
LTM4686_PWM_PULSE_SKIP_MODE 

◆ ltm4686_status_type

Enumerator
LTM4686_STATUS_ALL_TYPE 
LTM4686_STATUS_BYTE_TYPE 
LTM4686_STATUS_VOUT_TYPE 
LTM4686_STATUS_IOUT_TYPE 
LTM4686_STATUS_INPUT_TYPE 
LTM4686_STATUS_TEMP_TYPE 
LTM4686_STATUS_CML_TYPE 
LTM4686_STATUS_MFR_SPECIFIC_TYPE 
LTM4686_STATUS_WORD_TYPE 

◆ ltm4686_timing_type

Enumerator
LTM4686_TON_DELAY_TYPE 
LTM4686_TON_RISE_TYPE 
LTM4686_TOFF_DELAY_TYPE 
LTM4686_TOFF_FALL_TYPE 
LT7182_RETRY_DELAY 
LTM4686_RESTART_DELAY 

◆ ltm4686_value_type

Enumerator
LTM4686_VIN 
LTM4686_IIN 
LTM4686_VOUT 
LTM4686_IOUT 
LTM4686_TEMP_TSNS 
LTM4686_TEMP_IC 
LTM4686_DUTY_CYCLE 
LTM4686_POUT 
LTM4686_IOUT_PEAK 
LTM4686_VOUT_PEAK 
LTM4686_VIN_PEAK 
LTM4686_TEMP_PEAK 

Function Documentation

◆ ltm4686_init()

int ltm4686_init ( struct ltm4686_dev **  device,
struct ltm4686_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:

◆ ltm4686_nvm_cmd()

int ltm4686_nvm_cmd ( struct ltm4686_dev dev,
enum ltm4686_nvm_cmd_type  cmd 
)

Perform commands for non-volatile memory/EEPROM.

Parameters
dev- Device structure
cmd- NVM commands. Example: LTM4686_STORE_USER LTM4686_COMPARE_USER LTM4686_RESTORE_USER
Returns
0 in case of success, negative error code otherwise

◆ ltm4686_pwm_mode()

int ltm4686_pwm_mode ( struct ltm4686_dev dev,
uint8_t  channel,
enum ltm4686_pwm_mode  pwm_mode 
)

Sets the PWM mode for a specific channel of the LTM4686 device.

Parameters
devThe LTM4686 device structure.
channelThe channel number.
pwm_modeThe PWM mode to be set.
Returns
0 on success, negative error code on failure.

◆ ltm4686_read_block_data()

int ltm4686_read_block_data ( struct ltm4686_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

◆ ltm4686_read_byte()

int ltm4686_read_byte ( struct ltm4686_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:

◆ ltm4686_read_status()

int ltm4686_read_status ( struct ltm4686_dev dev,
uint8_t  channel,
enum ltm4686_status_type  status_type,
struct ltm4686_status status 
)

Read statuses.

Parameters
dev- Device structure
channel- Channel of the status to read
status_type- Status type. Example values: LTM4686_STATUS_BYTE_TYPE LTM4686_STATUS_VOUT_TYPE LTM4686_STATUS_IOUT_TYPE LTM4686_STATUS_INPUT_TYPE LTM4686_STATUS_CML_TYPE
status- Address of the status structure
Returns
0 in case of success, negative error code otherwise

◆ ltm4686_read_value()

int ltm4686_read_value ( struct ltm4686_dev dev,
uint8_t  channel,
enum ltm4686_value_type  value_type,
int *  value 
)

Read a value.

Parameters
dev- Device structure
channel- Channel selected
value_type- Value type. Example values: LTM4686_VIN LTM4686_VOUT LTM4686_IIN LTM4686_IOUT LTM4686_TEMP
value- Address of the read value
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4686_read_word()

int ltm4686_read_word ( struct ltm4686_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:

◆ ltm4686_read_word_data()

int ltm4686_read_word_data ( struct ltm4686_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:

◆ ltm4686_remove()

int ltm4686_remove ( struct ltm4686_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:

◆ ltm4686_send_byte()

int ltm4686_send_byte ( struct ltm4686_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:

◆ ltm4686_set_operation()

int ltm4686_set_operation ( struct ltm4686_dev dev,
uint8_t  channel,
enum ltm4686_operation_type  operation 
)

Set channel operation.

Parameters
dev- Device structure
channel- Channel
operation- Operation. Accepted values are: LTM4686_OPERATION_OFF LTM4686_OPERATION_ON LTM4686_OPERATION_MARGIN_HIGH LTM4686_OPERATION_MARGIN_LOW LTM4686_OPERATION_SEQ_OFF
Returns
0 in case of success, negative error code otherwise
Here is the caller graph for this function:

◆ ltm4686_set_page()

int ltm4686_set_page ( struct ltm4686_dev dev,
int  page 
)

Set page of the device. Page 0x0 - Channel 0 Page 0x1 - Channel 1 Page 0x2 - Channel 2 Page 0x3 - Channel 3 Page 0xff - All channels.

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

◆ ltm4686_set_timing()

int ltm4686_set_timing ( struct ltm4686_dev dev,
uint8_t  channel,
enum ltm4686_timing_type  timing_type,
int  time 
)

Set timing values.

Parameters
dev- Device structure
channel- Channel
timing_type- Timing value type. Example: LTM4686_TON_DELAY_TYPE LTM4686_TON_RISE_TYPE LTM4686_TOFF_DELAY_TYPE LTM4686_RETRY_DELAY_TYPE
time- Time value in microseconds
Returns
0 in case of success, negative error code otherwise

◆ ltm4686_set_vin()

int ltm4686_set_vin ( struct ltm4686_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

◆ ltm4686_software_reset()

int ltm4686_software_reset ( struct ltm4686_dev dev)

Perform a device software reset.

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

◆ ltm4686_switch_freq()

int ltm4686_switch_freq ( struct ltm4686_dev dev,
enum ltm4686_freq  freq 
)

Set switching frequency.

Parameters
dev- Device structure
freq- Frequency to set.
Returns
0 in case of success, negative error code otherwise

◆ ltm4686_vout_margin()

int ltm4686_vout_margin ( struct ltm4686_dev dev,
uint8_t  channel,
int  margin_low,
int  margin_high 
)

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

◆ ltm4686_vout_tr()

int ltm4686_vout_tr ( struct ltm4686_dev dev,
uint8_t  channel,
int  tr 
)

Set output voltage transition rate.

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

◆ ltm4686_vout_value()

int ltm4686_vout_value ( struct ltm4686_dev dev,
uint8_t  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

◆ ltm4686_write_byte()

int ltm4686_write_byte ( struct ltm4686_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:

◆ ltm4686_write_word()

int ltm4686_write_word ( struct ltm4686_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:

◆ ltm4686_write_word_data()

int ltm4686_write_word_data ( struct ltm4686_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: