Go to the documentation of this file.
42 #define LTM4686_PAGE 0x00
43 #define LTM4686_OPERATION 0x01
44 #define LTM4686_ON_OFF_CONFIG 0x02
45 #define LTM4686_CLEAR_FAULTS 0x03
46 #define LTM4686_PAGE_PLUS_WRITE 0x05
47 #define LTM4686_PAGE_PLUS_READ 0x06
49 #define LTM4686_WRITE_PROTECT 0x10
50 #define LTM4686_STORE_USER_ALL 0x15
51 #define LTM4686_RESTORE_USER_ALL 0x16
53 #define LTM4686_CAPABILITY 0x19
54 #define LTM4686_SMBALERT_MASK 0x1B
56 #define LTM4686_VOUT_MODE 0x20
57 #define LTM4686_VOUT_COMMAND 0x21
58 #define LTM4686_VOUT_MAX 0x24
59 #define LTM4686_VOUT_MARGIN_HIGH 0x25
60 #define LTM4686_VOUT_MARGIN_LOW 0x26
61 #define LTM4686_VOUT_TRANSITION_RATE 0x27
63 #define LTM4686_FREQUENCY_SWITCH 0x33
64 #define LTM4686_VIN_ON 0x35
65 #define LTM4686_VIN_OFF 0x36
66 #define LTM4686_IOUT_CAL_GAIN 0x38
68 #define LTM4686_VOUT_OV_FAULT_LIMIT 0x40
69 #define LTM4686_VOUT_OV_FAULT_RESPONSE 0x41
70 #define LTM4686_VOUT_OV_WARN_LIMIT 0x42
71 #define LTM4686_VOUT_UV_WARN_LIMIT 0x43
72 #define LTM4686_VOUT_UV_FAULT_LIMIT 0x44
73 #define LTM4686_VOUT_UV_FAULT_RESPONSE 0x45
74 #define LTM4686_IOUT_OC_FAULT_LIMIT 0x46
75 #define LTM4686_IOUT_OC_FAULT_RESPONSE 0x47
76 #define LTM4686_IOUT_OC_WARN_LIMIT 0x4A
78 #define LTM4686_OT_FAULT_LIMIT 0x4F
79 #define LTM4686_OT_FAULT_RESPONSE 0x50
80 #define LTM4686_OT_WARN_LIMIT 0x51
81 #define LTM4686_UT_FAULT_LIMIT 0x53
82 #define LTM4686_UT_FAULT_RESPONSE 0x54
84 #define LTM4686_VIN_OV_FAULT_LIMIT 0x55
85 #define LTM4686_VIN_OV_FAULT_RESPONSE 0x56
86 #define LTM4686_VIN_UV_WARN_LIMIT 0x58
87 #define LTM4686_IIN_OC_WARN_LIMIT 0x5D
89 #define LTM4686_TON_DELAY 0x60
90 #define LTM4686_TON_RISE 0x61
91 #define LTM4686_TON_MAX_FAULT_LIMIT 0x62
92 #define LTM4686_TON_MAX_FAULT_RESPONSE 0x63
93 #define LTM4686_TOFF_DELAY 0x64
94 #define LTM4686_TOFF_FALL 0x65
95 #define LTM4686_TOFF_MAX_WARN_LIMIT 0x66
97 #define LTM4686_STATUS_BYTE 0x78
98 #define LTM4686_STATUS_WORD 0x79
99 #define LTM4686_STATUS_VOUT 0x7A
100 #define LTM4686_STATUS_IOUT 0x7B
101 #define LTM4686_STATUS_INPUT 0x7C
102 #define LTM4686_STATUS_TEMPERATURE 0x7D
103 #define LTM4686_STATUS_CML 0x7E
104 #define LTM4686_STATUS_MFR_SPECIFIC 0x80
106 #define LTM4686_READ_VIN 0x88
107 #define LTM4686_READ_IIN 0x89
108 #define LTM4686_READ_VOUT 0x8B
109 #define LTM4686_READ_IOUT 0x8C
110 #define LTM4686_READ_TEMPERATURE_1 0x8D
111 #define LTM4686_READ_TEMPERATURE_2 0x8E
112 #define LTM4686_READ_DUTY_CYCLE 0x94
113 #define LTM4686_READ_POUT 0x96
115 #define LTM4686_REVISION 0x98
116 #define LTM4686_MFR_ID 0x99
117 #define LTM4686_MFR_MODEL 0x9A
118 #define LTM4686_MFR_SERIAL 0x9E
119 #define LTM4686_MFR_VOUT_MAX 0xA5
121 #define LTM4686_MFR_USER_DATA_00 0xB0
122 #define LTM4686_MFR_USER_DATA_01 0xB1
123 #define LTM4686_MFR_USER_DATA_02 0xB2
124 #define LTM4686_MFR_USER_DATA_03 0xB3
125 #define LTM4686_MFR_USER_DATA_04 0xB4
127 #define LTM4686_MFR_INFO 0xB6
128 #define LTM4686_MFR_EE_UNLOCK 0xBD
129 #define LTM4686_MFR_EE_ERASE 0xBE
130 #define LTM4686_MFR_EE_DATA 0xBF
132 #define LTM4686_MFR_CHAN_CONFIG 0xD0
133 #define LTM4686_MFR_CONFIG_ALL 0xD1
134 #define LTM4686_MFR_GPIO_PROPAGATE 0xD2
135 #define LTM4686_MFR_PWM_MODE 0xD4
136 #define LTM4686_MFR_GPIO_RESPONSE 0xD5
137 #define LTM4686_MFR_OT_FAULT_RESPONSE 0xD6
138 #define LTM4686_MFR_IOUT_PEAK 0xD7
139 #define LTM4686_MFR_ADC_CONTROL 0xD8
140 #define LTM4686_MFR_ADC_TELEMETRY_STATUS 0xDA
141 #define LTM4686_MFR_RETRY_DELAY 0xDB
142 #define LTM4686_MFR_RESTART_DELAY 0xDC
143 #define LTM4686_MFR_VOUT_PEAK 0xDD
144 #define LTM4686_MFR_VIN_PEAK 0xDE
145 #define LTM4686_MFR_TEMPERATURE_1_PEAK 0xDF
146 #define LTM4686_MFR_CLEAR_PEAKS 0xE3
147 #define LTM4686_MFR_PADS 0xE5
148 #define LTM4686_MFR_ADDRESS 0xE6
149 #define LTM4686_MFR_SPECIAL_ID 0xE7
150 #define LTM4686_MFR_IIN_OFFSET 0xE9
151 #define LTM4686_MFR_FAULT_LOG_STORE 0xEA
152 #define LTM4686_MFR_FAULT_LOG_CLEAR 0xEC
153 #define LTM4686_MFR_READ_IIN 0xED
154 #define LTM4686_MFR_FAULT_LOG 0xEE
155 #define LTM4686_MFR_COMMON 0xEF
156 #define LTM4686_MFR_COMPARE_USER_ALL 0xF0
157 #define LTM4686_MFR_TEMPERATURE_2_PEAK 0xF4
158 #define LTM4686_MFR_PWM_CONFIG 0xF5
159 #define LTM4686_MFR_IOUT_CAL_GAIN_TC 0xF6
160 #define LTM4686_MFR_TEMP_1_GAIN 0xF8
161 #define LTM4686_MFR_TEMP_1_OFFSET 0xF9
162 #define LTM4686_MFR_RAIL_ADDRESS 0xFA
163 #define LTM4686_MFR_RESET 0xFD
166 #define LTM4673_MFR_FAULTB0_PROPAGATE 0xD2
167 #define LTM4673_MFR_FAULTB1_PROPAGATE 0xD3
168 #define LTM4673_MFR_PWRGD_ENABLE 0xD4
169 #define LTM4673_MFR_FAULTB0_RESPONSE 0xD5
170 #define LTM4673_MFR_FAULTB1_RESPONSE 0xD6
171 #define LTM4673_MFR_IOUT_MIN 0xD8
172 #define LTM4673_MFR_CONFIG2 0xD9
173 #define LTM4673_MFR_CONFIG3 0xDA
174 #define LTM4673_MFR_DAC 0xE0
175 #define LTM4673_MFR_PGD_ASSERTION_DELAY 0xE1
176 #define LTM4673_MFR_WATCHDOG_T_FIRST 0xE2
177 #define LTM4673_MFR_WATCHDOG_T 0xE3
178 #define LTM4673_MFR_PAGE_FF_MASK 0xE4
179 #define LTM4673_MFR_IIN_CAL_GAIN 0xE8
180 #define LTM4673_MFR_VOUT_DISCHARGE_THRESHOLD 0xE9
181 #define LTM4673_MFR_FAULT_LOG_RESTORE 0xEB
182 #define LTM4673_MFR_FAULT_LOG_STATUS 0xED
183 #define LTM4673_MFR_RETRY_COUNT 0xF7
184 #define LTM4673_MFR_IOUT_SENSE_VOLTAGE 0xFA
185 #define LTM4673_MFR_VOUT_MIN 0xFB
186 #define LTM4673_MFR_VIN_MIN 0xFC
187 #define LTM4673_MFR_TEMPERATURE_1_MIN 0xFD
190 #define LTM4686_CRC_POLYNOMIAL 0x7
191 #define LTM4686_VOUT_MODE_VAL_MSK NO_OS_GENMASK(4,0)
194 #define LTM4686_LIN11_MANTISSA_MAX 1023L
195 #define LTM4686_LIN11_MANTISSA_MIN 511L
196 #define LTM4686_LIN11_EXPONENT_MAX 15
197 #define LTM4686_LIN11_EXPONENT_MIN -15
198 #define LTM4686_LIN11_MANTISSA_MSK NO_OS_GENMASK(10,0)
199 #define LTM4686_LIN11_EXPONENT_MSK NO_OS_GENMASK(15,11)
200 #define LTM4686_LIN11_EXPONENT(x) ((int16_t)(x) >> 11)
201 #define LTM4686_LIN11_MANTISSA(x) (((int16_t)((x & 0x7FF) << 5)) >> 5)
202 #define LTM4686_LIN16_EXPONENT -12
205 #define LTM4686_CHAN_0 0x0
206 #define LTM4686_CHAN_1 0x1
207 #define LTM4686_CHAN_2 0x2
208 #define LTM4686_CHAN_3 0x3
209 #define LTM4686_CHAN_ALL 0xFF
212 #define LTM4686_STATUS_BYTE_TYPE_MSK 0x01
213 #define LTM4686_STATUS_VOUT_TYPE_MSK 0x02
214 #define LTM4686_STATUS_IOUT_TYPE_MSK 0x04
215 #define LTM4686_STATUS_INPUT_TYPE_MSK 0x08
216 #define LTM4686_STATUS_TEMP_TYPE_MSK 0x10
217 #define LTM4686_STATUS_CML_TYPE_MSK 0x20
218 #define LTM4686_STATUS_MFR_SPECIFIC_TYPE_MSK 0x40
219 #define LTM4686_STATUS_WORD_TYPE_MSK 0x80
220 #define LTM4686_STATUS_ALL_TYPE_MSK 0xFF
223 #define LTM4686_PWM_OP_MODE_BIT NO_OS_BIT(0)
224 #define LTM4686_CONFIG_ALL_DIS_SYNC_BIT NO_OS_BIT(4)
225 #define LTM4686_CONFIG_ALL_PEC_BIT NO_OS_BIT(2)
228 #define LTM4686_ID_MSK 0xFFF0
229 #define LTM4686_SPECIAL_ID_VALUE 0x4770
230 #define LTM4673_SPECIAL_ID_VALUE_REV_1 0x0230
231 #define LTM4673_SPECIAL_ID_VALUE_REV_2 0x4480
367 uint8_t cmd, uint8_t *data);
371 uint8_t cmd, uint8_t value);
375 uint8_t cmd, uint16_t *word);
379 uint8_t cmd, uint16_t word);
383 uint8_t cmd,
int *data);
387 uint8_t cmd,
int data);
391 uint8_t *data,
size_t nbytes);
407 int vout_command,
int vout_max);
414 int margin_low,
int margin_high);
#define LTM4686_READ_VIN
Definition: ltm4686.h:106
#define LTM4686_STATUS_MFR_SPECIFIC
Definition: ltm4686.h:104
#define LTM4686_LIN16_EXPONENT
Definition: ltm4686.h:202
@ LTM4686_RESTART_DELAY
Definition: ltm4686.h:285
uint8_t mfr_specific
Definition: ltm4686.h:349
#define MILLI
Definition: no_os_units.h:48
#define LTM4686_MFR_IOUT_CAL_GAIN_TC
Definition: ltm4686.h:159
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
#define LTM4686_MFR_TEMP_1_OFFSET
Definition: ltm4686.h:161
int ltm4686_write_byte(struct ltm4686_dev *dev, int page, uint8_t cmd, uint8_t value)
Perform a raw PMBus write byte operation.
Definition: ltm4686.c:743
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:159
int ltm4686_software_reset(struct ltm4686_dev *dev)
Perform a device software reset.
Definition: ltm4686.c:1241
ltm4686_timing_type
Definition: ltm4686.h:279
#define dev_err(dev, format,...)
Definition: ad9361_util.h:63
@ LTM4686_STATUS_BYTE_TYPE
Definition: ltm4686.h:269
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:52
int ltm4686_vout_margin(struct ltm4686_dev *dev, uint8_t channel, int margin_low, int margin_high)
Set output voltage margin.
Definition: ltm4686.c:1083
int ltm4686_write_word(struct ltm4686_dev *dev, int page, uint8_t cmd, uint16_t word)
Perform a raw PMBus write word operation.
Definition: ltm4686.c:815
void no_os_put_unaligned_le16(uint16_t val, uint8_t *buf)
@ LTM4686_PWM_FORCED_CONTINUOUS_MODE
Definition: ltm4686.h:307
@ LTM4686_TON_DELAY_TYPE
Definition: ltm4686.h:280
ltm4686_pwm_mode
Definition: ltm4686.h:306
uint8_t temp
Definition: ltm4686.h:347
bool crc_en
Definition: ltm4686.h:334
int ltm4686_write_byte(struct ltm4686_dev *dev, int page, uint8_t cmd, uint8_t value)
Perform a raw PMBus write byte operation.
Definition: ltm4686.c:743
#define LTM4686_IOUT_CAL_GAIN
Definition: ltm4686.h:66
ltm4686_chip_id
Definition: ltm4686.h:233
#define LTM4686_STATUS_BYTE_TYPE_MSK
Definition: ltm4686.h:212
enum ltm4686_chip_id id
Definition: ltm4686.h:318
int ltm4686_nvm_cmd(struct ltm4686_dev *dev, enum ltm4686_nvm_cmd_type cmd)
Perform commands for non-volatile memory/EEPROM.
Definition: ltm4686.c:1230
int ltm4686_send_byte(struct ltm4686_dev *dev, int page, uint8_t cmd)
Send a PMBus command to the device.
Definition: ltm4686.c:682
int ltm4686_vout_tr(struct ltm4686_dev *dev, uint8_t channel, int tr)
Set output voltage transition rate.
Definition: ltm4686.c:1068
#define MICROWATT_PER_WATT
Definition: no_os_units.h:69
int ltm4686_read_value(struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_value_type value_type, int *value)
Read a value.
Definition: ltm4686.c:946
#define LTM4686_UT_FAULT_RESPONSE
Definition: ltm4686.h:82
#define LTM4686_MFR_VIN_PEAK
Definition: ltm4686.h:144
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.
Definition: ltm4686.c:845
#define LTM4686_STATUS_VOUT
Definition: ltm4686.h:99
@ LTM4686_VOUT
Definition: ltm4686.h:255
#define LTM4686_OT_FAULT_LIMIT
Definition: ltm4686.h:78
#define LTM4686_CONFIG_ALL_PEC_BIT
Definition: ltm4686.h:225
#define LTM4686_LIN11_EXPONENT_MAX
Definition: ltm4686.h:196
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:113
@ LTM4686_TOFF_DELAY_TYPE
Definition: ltm4686.h:282
@ LTM4686_TEMP_TSNS
Definition: ltm4686.h:257
#define LTM4686_STATUS_IOUT
Definition: ltm4686.h:100
#define LTM4686_MFR_RESTART_DELAY
Definition: ltm4686.h:142
#define LTM4686_MFR_VOUT_PEAK
Definition: ltm4686.h:143
@ ID_LTM4686B
Definition: ltm4686.h:235
#define LTM4686_STORE_USER_ALL
Definition: ltm4686.h:50
#define LTM4686_VOUT_MARGIN_HIGH
Definition: ltm4686.h:59
#define LTM4686_READ_TEMPERATURE_2
Definition: ltm4686.h:111
#define LTM4686_MFR_USER_DATA_03
Definition: ltm4686.h:124
uint8_t input
Definition: ltm4686.h:346
#define LTM4686_MFR_TEMP_1_GAIN
Definition: ltm4686.h:160
#define LTM4686_MFR_PWM_MODE
Definition: ltm4686.h:135
uint8_t iout
Definition: ltm4686.h:345
Header file of Delay functions.
@ LTM4686_DUTY_CYCLE
Definition: ltm4686.h:259
#define LTM4686_STATUS_TEMPERATURE
Definition: ltm4686.h:102
int ltm4686_read_word(struct ltm4686_dev *dev, int page, uint8_t cmd, uint16_t *word)
Perform a raw PMBus read word operation.
Definition: ltm4686.c:773
Definition: ltm4686.h:325
@ LTM4686_FREQ_EXT_OSC
Definition: ltm4686.h:289
#define LTM4686_ON_OFF_CONFIG
Definition: ltm4686.h:44
#define LTM4686_LIN11_MANTISSA_MIN
Definition: ltm4686.h:195
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
int ltm4686_write_word(struct ltm4686_dev *dev, int page, uint8_t cmd, uint16_t word)
Perform a raw PMBus write word operation.
Definition: ltm4686.c:815
NO_OS_DECLARE_CRC8_TABLE(ltm4686_crc_table)
int ltm4686_switch_freq(struct ltm4686_dev *dev, enum ltm4686_freq freq)
Set switching frequency.
Definition: ltm4686.c:1150
@ LTM4686_TOFF_FALL_TYPE
Definition: ltm4686.h:283
#define LTM4686_TON_MAX_FAULT_RESPONSE
Definition: ltm4686.h:92
#define LTM4686_MFR_READ_IIN
Definition: ltm4686.h:153
Definition: ad9361_util.h:69
#define LTM4686_TON_RISE
Definition: ltm4686.h:90
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
Definition: ltm4686.h:341
int ltm4686_vout_value(struct ltm4686_dev *dev, uint8_t channel, int vout_command, int vout_max)
Set output voltage and its upper limit.
Definition: ltm4686.c:1046
#define LTM4686_READ_VOUT
Definition: ltm4686.h:108
#define LTM4686_SMBALERT_MASK
Definition: ltm4686.h:54
#define LTM4686_STATUS_MFR_SPECIFIC_TYPE_MSK
Definition: ltm4686.h:218
#define LTM4686_CHAN_ALL
Definition: ltm4686.h:209
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
#define LTM4686_MFR_CONFIG_ALL
Definition: ltm4686.h:133
int32_t no_os_gpio_direction_input(struct no_os_gpio_desc *desc)
Enable the input direction of the specified GPIO.
Definition: no_os_gpio.c:124
#define LTM4686_TON_DELAY
Definition: ltm4686.h:89
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.
Definition: ltm4686.c:867
int ltm4686_vout_value(struct ltm4686_dev *dev, uint8_t channel, int vout_command, int vout_max)
Set output voltage and its upper limit.
Definition: ltm4686.c:1046
@ LTM4686_STATUS_IOUT_TYPE
Definition: ltm4686.h:271
@ LTM4686_TON_RISE_TYPE
Definition: ltm4686.h:281
@ LTM4686_OPERATION_MARGIN_HIGH
Definition: ltm4686.h:248
@ LTM4686_FREQ_575_KHZ
Definition: ltm4686.h:294
#define LTM4686_STATUS_INPUT
Definition: ltm4686.h:101
@ LTM4686_VOUT_PEAK
Definition: ltm4686.h:262
@ LTM4686_OPERATION_SEQ_OFF
Definition: ltm4686.h:249
@ LTM4686_POUT
Definition: ltm4686.h:260
#define LTM4686_UT_FAULT_LIMIT
Definition: ltm4686.h:81
#define LTM4686_MFR_GPIO_RESPONSE
Definition: ltm4686.h:136
ltm4686_operation_type
Definition: ltm4686.h:244
uint8_t slave_address
Definition: no_os_i2c.h:109
@ LTM4686_FREQ_650_KHZ
Definition: ltm4686.h:295
#define LTM4686_IOUT_OC_WARN_LIMIT
Definition: ltm4686.h:76
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
int ltm4686_read_status(struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_status_type status_type, struct ltm4686_status *status)
Read statuses.
Definition: ltm4686.c:969
@ LTM4686_OPERATION_MARGIN_LOW
Definition: ltm4686.h:247
uint8_t num_channels
Definition: ltm4686.h:322
ltm4686_status_type
Definition: ltm4686.h:267
#define LTM4686_VIN_UV_WARN_LIMIT
Definition: ltm4686.h:86
struct no_os_gpio_desc ** run_descs
Definition: ltm4686.h:315
#define LTM4686_TOFF_DELAY
Definition: ltm4686.h:93
@ LTM4686_STATUS_CML_TYPE
Definition: ltm4686.h:274
#define LTM4686_LIN11_MANTISSA_MSK
Definition: ltm4686.h:198
int ltm4686_set_vin(struct ltm4686_dev *dev, int vin_on, int vin_off)
Set input voltage window at which power conversion will proceed.
Definition: ltm4686.c:1108
#define LTM4686_MFR_IOUT_PEAK
Definition: ltm4686.h:138
#define LTM4686_VOUT_MARGIN_LOW
Definition: ltm4686.h:60
struct no_os_gpio_init_param ** pgood_params
Definition: ltm4686.h:328
@ LTM4686_FREQ_350_KHZ
Definition: ltm4686.h:291
void no_os_crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
#define LTM4686_CLEAR_FAULTS
Definition: ltm4686.h:45
#define LTM4686_MFR_IIN_OFFSET
Definition: ltm4686.h:150
#define LTM4686_READ_TEMPERATURE_1
Definition: ltm4686.h:110
#define LTM4686_STATUS_WORD_TYPE_MSK
Definition: ltm4686.h:219
#define MILLIVOLT_PER_VOLT
Definition: no_os_units.h:58
int ltm4686_vout_tr(struct ltm4686_dev *dev, uint8_t channel, int tr)
Set output voltage transition rate.
Definition: ltm4686.c:1068
#define LTM4673_SPECIAL_ID_VALUE_REV_2
Definition: ltm4686.h:231
int ltm4686_nvm_cmd(struct ltm4686_dev *dev, enum ltm4686_nvm_cmd_type cmd)
Perform commands for non-volatile memory/EEPROM.
Definition: ltm4686.c:1230
#define LTM4686_IOUT_OC_FAULT_RESPONSE
Definition: ltm4686.h:75
ltm4686_freq
Definition: ltm4686.h:288
#define LTM4686_MFR_RETRY_DELAY
Definition: ltm4686.h:141
bool external_clk_en
Definition: ltm4686.h:333
uint8_t num_channels
Definition: ltm4686.h:338
int ltm4686_remove(struct ltm4686_dev *dev)
Free or remove device instance.
Definition: ltm4686.c:592
#define LTM4686_STATUS_BYTE
Definition: ltm4686.h:97
#define LTM4686_READ_DUTY_CYCLE
Definition: ltm4686.h:112
int ltm4686_read_byte(struct ltm4686_dev *dev, int page, uint8_t cmd, uint8_t *data)
Perform a raw PMBus read byte operation.
Definition: ltm4686.c:704
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.
Definition: ltm4686.c:890
struct no_os_i2c_init_param * i2c_init
Definition: ltm4686.h:326
#define LTM4686_STATUS_IOUT_TYPE_MSK
Definition: ltm4686.h:214
#define LTM4686_RESTORE_USER_ALL
Definition: ltm4686.h:51
struct no_os_i2c_desc * i2c_desc
Definition: ltm4686.h:312
#define LTM4686_LIN11_MANTISSA(x)
Definition: ltm4686.h:201
int ltm4686_read_value(struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_value_type value_type, int *value)
Read a value.
Definition: ltm4686.c:946
const struct ltm4686_chip_info ltm4686_info[]
Definition: ltm4686.c:50
struct no_os_gpio_init_param * alert_param
Definition: ltm4686.h:327
#define LTM4686_TOFF_MAX_WARN_LIMIT
Definition: ltm4686.h:95
int32_t no_os_gpio_remove(struct no_os_gpio_desc *desc)
Free the resources allocated by no_os_gpio_get().
Definition: no_os_gpio.c:104
@ LTM4686_IIN
Definition: ltm4686.h:254
int ltm4686_vout_margin(struct ltm4686_dev *dev, uint8_t channel, int margin_low, int margin_high)
Set output voltage margin.
Definition: ltm4686.c:1083
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:69
#define LTM4686_STATUS_ALL_TYPE_MSK
Definition: ltm4686.h:220
#define LTM4686_TON_MAX_FAULT_LIMIT
Definition: ltm4686.h:91
#define LTM4686_FREQUENCY_SWITCH
Definition: ltm4686.h:63
@ LTM4686_FREQ_425_KHZ
Definition: ltm4686.h:292
#define LTM4686_STATUS_TEMP_TYPE_MSK
Definition: ltm4686.h:216
#define LTM4686_VOUT_OV_FAULT_LIMIT
Definition: ltm4686.h:68
struct no_os_gpio_desc ** fault_descs
Definition: ltm4686.h:316
@ ID_LTM4686
Definition: ltm4686.h:234
@ LTM4686_FAULT_PIN_INPUT
Definition: ltm4686.h:240
int ltm4686_send_byte(struct ltm4686_dev *dev, int page, uint8_t cmd)
Send a PMBus command to the device.
Definition: ltm4686.c:682
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
int ltm4686_read_word(struct ltm4686_dev *dev, int page, uint8_t cmd, uint16_t *word)
Perform a raw PMBus read word operation.
Definition: ltm4686.c:773
#define LTM4686_MFR_TEMPERATURE_1_PEAK
Definition: ltm4686.h:145
#define LTM4686_MFR_SPECIAL_ID
Definition: ltm4686.h:149
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.
Definition: ltm4686.c:890
#define LTM4686_MFR_CHAN_CONFIG
Definition: ltm4686.h:132
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.
Definition: ltm4686.c:845
#define LTM4686_LIN11_EXPONENT_MSK
Definition: ltm4686.h:199
#define LTM4686_MFR_COMPARE_USER_ALL
Definition: ltm4686.h:156
#define LTM4686_LIN11_EXPONENT(x)
Definition: ltm4686.h:200
#define LTM4686_STATUS_CML
Definition: ltm4686.h:103
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
int ltm4686_read_byte(struct ltm4686_dev *dev, int page, uint8_t cmd, uint8_t *data)
Perform a raw PMBus read byte operation.
Definition: ltm4686.c:704
#define LTM4686_TOFF_FALL
Definition: ltm4686.h:94
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:190
#define LTM4686_OT_WARN_LIMIT
Definition: ltm4686.h:80
#define LTM4686_MFR_TEMPERATURE_2_PEAK
Definition: ltm4686.h:157
@ LTM4686_FAULT_PIN_OUTPUT
Definition: ltm4686.h:241
Header file of I2C Interface.
#define LTM4686_MFR_VOUT_MAX
Definition: ltm4686.h:119
#define LTM4673_SPECIAL_ID_VALUE_REV_1
Definition: ltm4686.h:230
int ltm4686_set_operation(struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_operation_type operation)
Set channel operation.
Definition: ltm4686.c:1213
@ LTM4686_TEMP_IC
Definition: ltm4686.h:258
ltm4686_fault_pin_config
Definition: ltm4686.h:239
@ LTM4686_FREQ_250_KHZ
Definition: ltm4686.h:290
#define LTM4686_IOUT_OC_FAULT_LIMIT
Definition: ltm4686.h:74
struct no_os_gpio_init_param ** run_params
Definition: ltm4686.h:329
uint16_t word
Definition: ltm4686.h:342
#define LTM4686_READ_IIN
Definition: ltm4686.h:107
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
@ LTM4686_IOUT_PEAK
Definition: ltm4686.h:261
#define LTM4686_MFR_USER_DATA_01
Definition: ltm4686.h:122
enum ltm4686_chip_id id
Definition: ltm4686.h:332
#define LTM4686_VOUT_TRANSITION_RATE
Definition: ltm4686.h:61
#define LTM4686_CRC_POLYNOMIAL
Definition: ltm4686.h:190
#define LTM4686_VOUT_MAX
Definition: ltm4686.h:58
uint16_t no_os_get_unaligned_le16(uint8_t *buf)
@ LTM4686_RESTORE_USER
Definition: ltm4686.h:302
#define LTM4686_VOUT_MODE
Definition: ltm4686.h:56
uint8_t byte
Definition: ltm4686.h:343
int ltm4686_software_reset(struct ltm4686_dev *dev)
Perform a device software reset.
Definition: ltm4686.c:1241
@ LTM4686_FREQ_1000_KHZ
Definition: ltm4686.h:297
int ltm4686_switch_freq(struct ltm4686_dev *dev, enum ltm4686_freq freq)
Set switching frequency.
Definition: ltm4686.c:1150
@ LTM4686_OPERATION_ON
Definition: ltm4686.h:246
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
int ltm4686_init(struct ltm4686_dev **device, struct ltm4686_init_param *init_param)
Initialize the device structure.
Definition: ltm4686.c:460
@ LTM4686_IOUT
Definition: ltm4686.h:256
@ LTM4686_TEMP_PEAK
Definition: ltm4686.h:264
#define LTM4686_OT_FAULT_RESPONSE
Definition: ltm4686.h:79
#define LTM4686_VOUT_COMMAND
Definition: ltm4686.h:57
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
bool crc_en
Definition: ltm4686.h:321
#define LTM4686_READ_IOUT
Definition: ltm4686.h:109
#define LTM4686_LIN11_MANTISSA_MAX
Definition: ltm4686.h:194
int ltm4686_set_timing(struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_timing_type timing_type, int time)
Set timing values.
Definition: ltm4686.c:1137
#define LTM4686_CONFIG_ALL_DIS_SYNC_BIT
Definition: ltm4686.h:224
#define LTM4686_VIN_OFF
Definition: ltm4686.h:65
#define LTM4686_VIN_ON
Definition: ltm4686.h:64
#define LTM4686_PAGE
Definition: ltm4686.h:42
#define LTM4686_MFR_GPIO_PROPAGATE
Definition: ltm4686.h:134
#define LTM4686_VOUT_UV_FAULT_LIMIT
Definition: ltm4686.h:72
@ LTM4686_STATUS_WORD_TYPE
Definition: ltm4686.h:276
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 - Cha...
Definition: ltm4686.c:623
#define LTM4686_IIN_OC_WARN_LIMIT
Definition: ltm4686.h:87
Header file of the LTM4686 driver.
@ LTM4686_FREQ_750_KHZ
Definition: ltm4686.h:296
@ LTM4686_STATUS_VOUT_TYPE
Definition: ltm4686.h:270
int lin16_exp
Definition: ltm4686.h:320
Definition: ltm4686.h:311
#define LTM4686_ID_MSK
Definition: ltm4686.h:228
@ LTM4686_OPERATION_OFF
Definition: ltm4686.h:245
Header file of GPIO Interface.
#define LTM4686_VIN_OV_FAULT_LIMIT
Definition: ltm4686.h:84
@ LTM4686_STATUS_INPUT_TYPE
Definition: ltm4686.h:272
@ LTM4686_STORE_USER
Definition: ltm4686.h:301
#define LTM4686_LIN11_EXPONENT_MIN
Definition: ltm4686.h:197
@ LTM4686_COMPARE_USER
Definition: ltm4686.h:303
int ltm4686_set_operation(struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_operation_type operation)
Set channel operation.
Definition: ltm4686.c:1213
#define LTM4686_STATUS_CML_TYPE_MSK
Definition: ltm4686.h:217
#define LTM4686_STATUS_INPUT_TYPE_MSK
Definition: ltm4686.h:215
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.
Definition: ltm4686.c:867
#define LTM4686_VOUT_OV_FAULT_RESPONSE
Definition: ltm4686.h:69
@ LTM4686_VIN
Definition: ltm4686.h:253
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.
Definition: ltm4686.c:1180
@ LTM4686_VIN_PEAK
Definition: ltm4686.h:263
Header file of utility functions.
uint8_t cml
Definition: ltm4686.h:348
#define LTM4686_MFR_RESET
Definition: ltm4686.h:163
#define LTM4686_MFR_RAIL_ADDRESS
Definition: ltm4686.h:162
#define LTM4686_OPERATION
Definition: ltm4686.h:43
#define LTM4686_STATUS_VOUT_TYPE_MSK
Definition: ltm4686.h:213
@ LTM4686_STATUS_TEMP_TYPE
Definition: ltm4686.h:273
@ LTM4686_STATUS_MFR_SPECIFIC_TYPE
Definition: ltm4686.h:275
#define LTM4686_SPECIAL_ID_VALUE
Definition: ltm4686.h:229
@ LT7182_RETRY_DELAY
Definition: ltm4686.h:284
int ltm4686_set_timing(struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_timing_type timing_type, int time)
Set timing values.
Definition: ltm4686.c:1137
int32_t no_os_gpio_direction_output(struct no_os_gpio_desc *desc, uint8_t value)
Enable the output direction of the specified GPIO.
Definition: no_os_gpio.c:147
struct no_os_gpio_init_param ** fault_params
Definition: ltm4686.h:330
#define LTM4686_VOUT_UV_WARN_LIMIT
Definition: ltm4686.h:71
#define LTM4686_READ_POUT
Definition: ltm4686.h:113
int ltm4686_set_vin(struct ltm4686_dev *dev, int vin_on, int vin_off)
Set input voltage window at which power conversion will proceed.
Definition: ltm4686.c:1108
int ltm4686_read_status(struct ltm4686_dev *dev, uint8_t channel, enum ltm4686_status_type status_type, struct ltm4686_status *status)
Read statuses.
Definition: ltm4686.c:969
@ LTM4686_PWM_PULSE_SKIP_MODE
Definition: ltm4686.h:308
ltm4686_nvm_cmd_type
Definition: ltm4686.h:300
Definition: ltm4686.h:337
#define LTM4686_PWM_OP_MODE_BIT
Definition: ltm4686.h:223
uint8_t vout
Definition: ltm4686.h:344
Header file of CRC-8 computation.
#define MICROVOLT_PER_VOLT
Definition: no_os_units.h:59
@ LTM4686_STATUS_ALL_TYPE
Definition: ltm4686.h:268
@ ID_LTM4673
Definition: ltm4686.h:236
#define LTM4686_STATUS_WORD
Definition: ltm4686.h:98
Error macro definition for ARM Compiler.
@ LTM4686_FREQ_500_KHZ
Definition: ltm4686.h:293
int page
Definition: ltm4686.h:319
#define LTM4686_VOUT_OV_WARN_LIMIT
Definition: ltm4686.h:70
#define LTM4686_VOUT_UV_FAULT_RESPONSE
Definition: ltm4686.h:73
struct no_os_gpio_desc ** pgood_descs
Definition: ltm4686.h:314
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 - Cha...
Definition: ltm4686.c:623
ltm4686_value_type
Definition: ltm4686.h:252
int ltm4686_init(struct ltm4686_dev **device, struct ltm4686_init_param *init_param)
Initialize the device structure.
Definition: ltm4686.c:460
struct no_os_gpio_desc * alert_desc
Definition: ltm4686.h:313
int ltm4686_remove(struct ltm4686_dev *dev)
Free or remove device instance.
Definition: ltm4686.c:592
int32_t no_os_gpio_get_optional(struct no_os_gpio_desc **desc, const struct no_os_gpio_init_param *param)
Get the value of an optional GPIO.
Definition: no_os_gpio.c:75