no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lt7170.h
Go to the documentation of this file.
1/*******************************************************************************
2* @file lt7170.h
3* @brief Header file of the LT7170 Driver
4* @authors Cherrence Sarip (cherrence.sarip@analog.com)
5********************************************************************************
6* Copyright 2024(c) Analog Devices, Inc.
7*
8* All rights reserved.
9*
10* Redistribution and use in source and binary forms, with or without
11* modification, are permitted provided that the following conditions are met:
12* - Redistributions of source code must retain the above copyright
13* notice, this list of conditions and the following disclaimer.
14* - Redistributions in binary form must reproduce the above copyright
15* notice, this list of conditions and the following disclaimer in
16* the documentation and/or other materials provided with the
17* distribution.
18* - Neither the name of Analog Devices, Inc. nor the names of its
19* contributors may be used to endorse or promote products derived
20* from this software without specific prior written permission.
21* - The use of this software may or may not infringe the patent rights
22* of one or more patent holders. This license does not release you
23* from the requirement that you obtain separate licenses from these
24* patent holders to use this software.
25* - Use of the software either in source or binary form, must be run
26* on or directly connected to an Analog Devices Inc. component.
27*
28* THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
29* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
30* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31* IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
32* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33* LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
34* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38*******************************************************************************/
39
40#ifndef __LT7170_H__
41#define __LT7170_H__
42
43#include <stdint.h>
44#include <string.h>
45#include "no_os_util.h"
46#include "no_os_i2c.h"
47
48/* PMBus commands */
49#define LT7170_PAGE 0x00
50#define LT7170_OPERATION 0x01
51#define LT7170_ON_OFF_CONFIG 0x02
52#define LT7170_CLEAR_FAULTS 0x03
53#define LT7170_PAGE_PLUS_WRITE 0x05
54#define LT7170_PAGE_PLUS_READ 0x06
55#define LT7170_ZONE_CONFIG 0x07
56#define LT7170_ZONE_ACTIVE 0x08
57
58#define LT7170_WRITE_PROTECT 0x10
59
60#define LT7170_STORE_USER_ALL 0x15
61#define LT7170_RESTORE_USER_ALL 0x16
62
63#define LT7170_CAPABILITY 0x19
64#define LT7170_QUERY 0x1A
65#define LT7170_SMBALERT_MASK 0x1B
66
67#define LT7170_VOUT_MODE 0x20
68#define LT7170_VOUT_COMMAND 0x21
69#define LT7170_VOUT_MAX 0x24
70#define LT7170_VOUT_MARGIN_HIGH 0x25
71#define LT7170_VOUT_MARGIN_LOW 0x26
72#define LT7170_VOUT_TRANSITION_RATE 0x27
73
74#define LT7170_FREQUENCY_SWITCH 0x33
75#define LT7170_VIN_ON 0x35
76#define LT7170_VIN_OFF 0x36
77
78#define LT7170_IOUT_CAL_OFFSET 0x39
79#define LT7170_VOUT_OV_FAULT_LIMIT 0x40
80#define LT7170_VOUT_OV_FAULT_RESPONSE 0x41
81#define LT7170_VOUT_OV_WARN_LIMIT 0x42
82#define LT7170_VOUT_UV_WARN_LIMIT 0x43
83#define LT7170_VOUT_UV_FAULT_LIMIT 0x44
84#define LT7170_VOUT_UV_FAULT_RESPONSE 0x45
85#define LT7170_IOUT_OC_FAULT_RESPONSE 0x47
86#define LT7170_IOUT_OC_WARN_LIMIT 0x4A
87
88#define LT7170_OT_FAULT_LIMIT 0x4F
89#define LT7170_OT_FAULT_RESPONSE 0x50
90#define LT7170_OT_WARN_LIMIT 0x51
91
92#define LT7170_VIN_OV_FAULT_RESPONSE 0x56
93#define LT7170_VIN_UV_WARN_LIMIT 0x58
94
95#define LT7170_TON_DELAY 0x60
96#define LT7170_TON_RISE 0x61
97#define LT7170_TON_MAX_FAULT_LIMIT 0x62
98#define LT7170_TON_MAX_FAULT_RESPONSE 0x63
99#define LT7170_TOFF_DELAY 0x64
100#define LT7170_TOFF_FALL 0x65
101#define LT7170_TOFF_MAX_WARN_LIMIT 0x66
102
103#define LT7170_STATUS_BYTE 0x78
104#define LT7170_STATUS_WORD 0x79
105#define LT7170_STATUS_VOUT 0x7A
106#define LT7170_STATUS_IOUT 0x7B
107#define LT7170_STATUS_INPUT 0x7C
108#define LT7170_STATUS_TEMPERATURE 0x7D
109#define LT7170_STATUS_CML 0x7E
110#define LT7170_STATUS_MFR_SPECIFIC 0x80
111
112#define LT7170_READ_VIN 0x88
113#define LT7170_READ_VOUT 0x8B
114#define LT7170_READ_IOUT 0x8C
115#define LT7170_READ_TEMPERATURE_1 0x8D
116#define LT7170_READ_FREQUENCY 0x95
117
118#define LT7170_REVISION 0x98
119#define LT7170_MFR_ID 0x99
120#define LT7170_MFR_SERIAL 0x9E
121
122#define LT7170_IC_DEVICE_ID 0xAD
123#define LT7170_IC_DEVICE_REV 0xAE
124
125#define LT7170_MFR_NVM_UNLOCK 0xBD
126#define LT7170_MFR_NVM_USER_WRITES_REMAINING 0xBE
127#define LT7170_MFR_NVM_DATA 0xBF
128#define LT7170_MFR_USER_DATA_00 0xC9
129#define LT7170_MFR_USER_DATA_01 0xCA
130#define LT7170_MFR_READ_EXTVCC 0xCD
131#define LT7170_MFR_READ_ITH 0xCE
132#define LT7170_MFR_CHAN_CONFIG 0xD0
133#define LT7170_MFR_CONFIG_ALL 0xD1
134#define LT7170_MFR_FAULT_PROPAGATE 0xD2
135#define LT7170_MFR_READ_ASEL 0xD3
136#define LT7170_MFR_PWM_MODE 0xD4
137#define LT7170_MFR_FAULT_RESPONSE 0xD5
138#define LT7170_MFR_IOUT_PEAK 0xD7
139#define LT7170_MFR_ADC_CONTROL 0xD8
140#define LT7170_MFR_RETRY_DELAY 0xDB
141#define LT7170_MFR_VOUT_PEAK 0xDD
142#define LT7170_MFR_VIN_PEAK 0xDE
143#define LT7170_MFR_TEMPERATURE_1_PEAK 0xDF
144#define LT7170_MFR_READ_PWM_CFG 0xE0
145#define LT7170_MFR_READ_VOUT_CFG 0xE1
146#define LT7170_MFR_CLEAR_PEAKS 0xE3
147#define LT7170_MFR_DISCHARGE_THRESHOLD 0xE4
148#define LT7170_MFR_PADS 0xE5
149#define LT7170_MFR_I2C_ADDRESS 0xE6
150#define LT7170_MFR_SPECIAL_ID 0xE7
151#define LT7170_MFR_COMMON 0xEF
152#define LT7170_MFR_COMPARE_USER_ALL 0xF0
153#define LT7170_MFR_CHANNEL_STATE 0xF1
154#define LT7170_MFR_PGOOD_DELAY 0xF2
155#define LT7170_MFR_NOT_PGOOD_DELAY 0xF3
156#define LT7170_MFR_PWM_PHASE 0xF5
157#define LT7170_MFR_SYNC_CONFIG 0xF6
158#define LT7170_MFR_PIN_CONFIG_STATUS 0xF7
159#define LT7170_MFR_RAIL_ADDRESS 0xFA
160#define LT7170_MFR_DISABLE_OUTPUT 0xFB
161#define LT7170_MFR_NVM_USER_WP 0xFC
162#define LT7170_MFR_RESET 0xFD
163
164/* PMBus-specific parameters */
165#define LT7170_CRC_POLYNOMIAL 0x7
166#define LT7170_VOUT_MODE_VAL_MSK NO_OS_GENMASK(4,0)
167
168/* IEEE754 data format params */
169#define LT7170_IEEE754_SIGN_BIT NO_OS_BIT(15)
170#define LT7170_IEEE754_EXPONENT_MSK NO_OS_GENMASK(14, 10)
171#define LT7170_IEEE754_MANTISSA_MSK NO_OS_GENMASK(9, 0)
172#define LT7170_IEEE754_MAX_MANTISSA 0x7ff
173#define LT7170_IEEE754_MIN_MANTISSA 0x400
174
175/* Device specific constants */
176#define LT7170_FREQ_MIN 400000
177#define LT7170_FREQ_MAX 4000000
178#define LT7170_VIN_ON_MIN 1400
179#define LT7170_VIN_ON_MAX 16000
180#define LT7170_VIN_OFF_MIN 1350
181#define LT7170_VIN_OFF_MAX 16000
182#define LT7170_PHASE_FULL_MILLI 360000
183
184/* Status types masks */
185#define LT7170_STATUS_BYTE_TYPE_MSK 0x01
186#define LT7170_STATUS_VOUT_TYPE_MSK 0x02
187#define LT7170_STATUS_IOUT_TYPE_MSK 0x04
188#define LT7170_STATUS_INPUT_TYPE_MSK 0x08
189#define LT7170_STATUS_TEMP_TYPE_MSK 0x10
190#define LT7170_STATUS_CML_TYPE_MSK 0x20
191#define LT7170_STATUS_MFR_SPECIFIC_TYPE_MSK 0x40
192#define LT7170_STATUS_WORD_TYPE_MSK 0x80
193#define LT7170_STATUS_ALL_TYPE_MSK 0xFF
194
195/* LT7170 configurable bits and masks */
196#define LT7170_PWM_OP_MODE_BIT NO_OS_BIT(0)
197#define LT7170_SYNC_CLK_INPUT_BIT NO_OS_BIT(1)
198#define LT7170_SYNC_CLK_OUTPUT_BIT NO_OS_BIT(0)
199#define LT7170_ADC_CTRL_LOW_FREQ_BIT NO_OS_BIT(1)
200#define LT7170_ADC_CTRL_DEBUG_BIT NO_OS_BIT(0)
201#define LT7170_CONFIG_ALL_PEC_BIT NO_OS_BIT(2)
202#define LT7170_PADS_RUN_BIT NO_OS_BIT(2)
203
204#define LT7170_SPECIAL_ID_VALUE 0x1C1D
205
212
217
225
239
252
264
272
280
285
297
312
314 char *name;
315 uint8_t name_size;
316};
317
319 uint16_t word;
320 uint8_t byte;
321 uint8_t vout;
322 uint8_t iout;
323 uint8_t input;
324 uint8_t temp;
325 uint8_t cml;
327};
328
329/* Initialize the device structure */
330int lt7170_init(struct lt7170_dev **dev,
332
333/* Free or remove device instance */
334int lt7170_remove(struct lt7170_dev *dev);
335
336/* Send a PMBus command to the device */
337int lt7170_send_byte(struct lt7170_dev *dev, uint8_t cmd);
338
339/* Perform a PMBus read_byte operation */
340int lt7170_read_byte(struct lt7170_dev *dev,
341 uint8_t cmd, uint8_t *data);
342
343/* Perform a PMBus write_byte operation */
344int lt7170_write_byte(struct lt7170_dev *dev,
345 uint8_t cmd, uint8_t value);
346
347/* Perform a PMBus read_word operation */
348int lt7170_read_word(struct lt7170_dev *dev,
349 uint8_t cmd, uint16_t *word);
350
351/* Perform a PMBus write_word operation */
352int lt7170_write_word(struct lt7170_dev *dev,
353 uint8_t cmd, uint16_t word);
354
355/* Perform a PMBus read_word operation then perform conversion*/
356int lt7170_read_word_data(struct lt7170_dev *dev,
357 uint8_t cmd, int *data);
358
359/* Perform conversion then perform a PMBus write_word operation */
360int lt7170_write_word_data(struct lt7170_dev *dev,
361 uint8_t cmd, int data);
362
363/* Read a block of bytes */
364int lt7170_read_block_data(struct lt7170_dev *dev,
365 uint8_t cmd, uint8_t *data, size_t nbytes);
366
367/* Read specific value type */
368int lt7170_read_value(struct lt7170_dev *dev,
369 enum lt7170_value_type value_type,
370 int *value);
371
372/* Read status */
373int lt7170_read_status(struct lt7170_dev *dev,
374 enum lt7170_status_type status_type,
375 struct lt7170_status *status);
376
377/* Set VOUT parameters: VOUT_COMMAND and VOUT_MAX */
378int lt7170_vout_value(struct lt7170_dev *dev,
379 int vout_command, int vout_max);
380
381/* Set VOUT transition rate */
382int lt7170_vout_tr(struct lt7170_dev *dev, int tr);
383
384/* Set VOUT margins */
385int lt7170_vout_margin(struct lt7170_dev *dev,
386 int margin_high, int margin_low);
387
388/* Set VIN threshold when to start power conversion */
389int lt7170_set_vin(struct lt7170_dev *dev,
390 int vin_on, int vin_off);
391
392/* Set timing values */
393int lt7170_set_timing(struct lt7170_dev *dev,
394 enum lt7170_timing_type timing_type, int time);
395
396/* Set switching frequency */
397int lt7170_switch_freq(struct lt7170_dev *dev, int freq);
398
399/* Set PWM mode of a channel */
400int lt7170_pwm_mode(struct lt7170_dev *dev,
401 enum lt7170_pwm_mode pwm_mode);
402
403/* Set PWM phase offset of a channel */
404int lt7170_pwm_phase(struct lt7170_dev *dev,
405 int phase);
406
407/* Set fault/warning limit values */
408int lt7170_set_limit(struct lt7170_dev *dev,
409 enum lt7170_limit_type limit, int limit_val);
410
411/* Set operation */
412int lt7170_set_operation(struct lt7170_dev *dev,
413 enum lt7170_operation_type operation);
414
415/* Set channel state */
417 bool state);
418
419/* Set clock synchronization configs */
420int lt7170_sync_config(struct lt7170_dev *dev,
421 bool input_clk,
422 bool output_clk);
423
424/* Set ADC telemetry control */
425int lt7170_adc_control(struct lt7170_dev *dev, bool low_freq_telemetry,
426 bool debug_telemetry);
427
428/* NVM/EEPROM user commands */
429int lt7170_nvm_cmd(struct lt7170_dev *dev, enum lt7170_nvm_cmd_type cmd);
430
431/* Clear status registers */
432int lt7170_clear_faults(struct lt7170_dev *dev);
433
434/* Software reset */
435int lt7170_software_reset(struct lt7170_dev *dev);
436
437#endif /* __LT7170_H__ */
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
#define LT7170_MFR_TEMPERATURE_1_PEAK
Definition lt7170.h:143
#define LT7170_RESTORE_USER_ALL
Definition lt7170.h:61
int lt7170_nvm_cmd(struct lt7170_dev *dev, enum lt7170_nvm_cmd_type cmd)
Perform commands for non-volatile memory (NVM)
Definition lt7170.c:1011
int lt7170_init(struct lt7170_dev **dev, struct lt7170_init_param *init_param)
Initialize the device structure.
Definition lt7170.c:304
int lt7170_set_limit(struct lt7170_dev *dev, enum lt7170_limit_type limit, int limit_val)
Set overvalue and undervalue limits.
Definition lt7170.c:925
int lt7170_vout_tr(struct lt7170_dev *dev, int tr)
Set output voltage transition rate.
Definition lt7170.c:789
int lt7170_vout_margin(struct lt7170_dev *dev, int margin_high, int margin_low)
Set output voltage margin.
Definition lt7170.c:801
int lt7170_read_status(struct lt7170_dev *dev, enum lt7170_status_type status_type, struct lt7170_status *status)
Read statuses.
Definition lt7170.c:698
#define LT7170_MFR_RETRY_DELAY
Definition lt7170.h:140
int lt7170_pwm_phase(struct lt7170_dev *dev, int phase)
Set output PWM phase.
Definition lt7170.c:904
int lt7170_write_byte(struct lt7170_dev *dev, uint8_t cmd, uint8_t value)
Perform a raw PMBus write byte operation.
Definition lt7170.c:519
#define LT7170_MFR_VOUT_PEAK
Definition lt7170.h:141
#define LT7170_STATUS_MFR_SPECIFIC_TYPE_MSK
Definition lt7170.h:191
#define LT7170_OT_FAULT_LIMIT
Definition lt7170.h:88
#define LT7170_STATUS_IOUT_TYPE_MSK
Definition lt7170.h:187
#define LT7170_VOUT_UV_WARN_LIMIT
Definition lt7170.h:82
#define LT7170_STATUS_VOUT_TYPE_MSK
Definition lt7170.h:186
int lt7170_read_byte(struct lt7170_dev *dev, uint8_t cmd, uint8_t *data)
Perform a raw PMBus read byte operation.
Definition lt7170.c:488
int lt7170_set_channel_state(struct lt7170_dev *dev, bool state)
Set channel state using the RUN pin.
Definition lt7170.c:954
#define LT7170_IOUT_OC_WARN_LIMIT
Definition lt7170.h:86
int lt7170_vout_value(struct lt7170_dev *dev, int vout_command, int vout_max)
Set output voltage and its upper limit.
Definition lt7170.c:772
lt7170_nvm_cmd_type
Definition lt7170.h:273
@ LT7170_LOCK_USER
Definition lt7170.h:274
@ LT7170_COMPARE_USER
Definition lt7170.h:278
@ LT7170_RESTORE_USER
Definition lt7170.h:277
@ LT7170_STORE_USER
Definition lt7170.h:276
@ LT7170_UNLOCK_USER
Definition lt7170.h:275
int lt7170_read_word(struct lt7170_dev *dev, uint8_t cmd, uint16_t *word)
Perform a raw PMBus read word operation.
Definition lt7170.c:540
#define LT7170_MFR_READ_EXTVCC
Definition lt7170.h:130
#define LT7170_STATUS_BYTE_TYPE_MSK
Definition lt7170.h:185
#define LT7170_TON_RISE
Definition lt7170.h:96
lt7170_pwm_mode
Definition lt7170.h:281
@ LT7170_PWM_PULSE_SKIP_MODE
Definition lt7170.h:283
@ LT7170_PWM_FORCED_CONTINUOUS_MODE
Definition lt7170.h:282
#define LT7170_VOUT_OV_FAULT_LIMIT
Definition lt7170.h:79
#define LT7170_STATUS_INPUT_TYPE_MSK
Definition lt7170.h:188
#define LT7170_MFR_VIN_PEAK
Definition lt7170.h:142
lt7170_fault_pin_config
Definition lt7170.h:213
@ LT7170_FAULT_PIN_OUTPUT
Definition lt7170.h:215
@ LT7170_FAULT_PIN_INPUT
Definition lt7170.h:214
#define LT7170_STORE_USER_ALL
Definition lt7170.h:60
#define LT7170_STATUS_ALL_TYPE_MSK
Definition lt7170.h:193
#define LT7170_VOUT_UV_FAULT_LIMIT
Definition lt7170.h:83
#define LT7170_STATUS_TEMP_TYPE_MSK
Definition lt7170.h:189
int lt7170_remove(struct lt7170_dev *dev)
Free or remove device instance.
Definition lt7170.c:428
lt7170_chip_id
Definition lt7170.h:206
@ ID_LT7170_1
Definition lt7170.h:208
@ ID_LT7171_1
Definition lt7170.h:210
@ ID_LT7171
Definition lt7170.h:209
@ ID_LT7170
Definition lt7170.h:207
int lt7170_set_vin(struct lt7170_dev *dev, int vin_on, int vin_off)
Set input voltage window at which power conversion will proceed.
Definition lt7170.c:822
#define LT7170_VIN_UV_WARN_LIMIT
Definition lt7170.h:93
#define LT7170_READ_TEMPERATURE_1
Definition lt7170.h:115
#define LT7170_READ_VOUT
Definition lt7170.h:113
lt7170_status_type
Definition lt7170.h:253
@ LT7170_STATUS_BYTE_TYPE
Definition lt7170.h:254
@ LT7170_STATUS_WORD_TYPE
Definition lt7170.h:261
@ LT7170_STATUS_ALL_TYPE
Definition lt7170.h:262
@ LT7170_STATUS_VOUT_TYPE
Definition lt7170.h:255
@ LT7170_STATUS_MFR_SPECIFIC_TYPE
Definition lt7170.h:260
@ LT7170_STATUS_TEMP_TYPE
Definition lt7170.h:258
@ LT7170_STATUS_IOUT_TYPE
Definition lt7170.h:256
@ LT7170_STATUS_CML_TYPE
Definition lt7170.h:259
@ LT7170_STATUS_INPUT_TYPE
Definition lt7170.h:257
#define LT7170_TOFF_MAX_WARN_LIMIT
Definition lt7170.h:101
#define LT7170_READ_VIN
Definition lt7170.h:112
#define LT7170_READ_IOUT
Definition lt7170.h:114
#define LT7170_OT_WARN_LIMIT
Definition lt7170.h:90
#define LT7170_MFR_IOUT_PEAK
Definition lt7170.h:138
#define LT7170_TON_DELAY
Definition lt7170.h:95
int lt7170_clear_faults(struct lt7170_dev *dev)
Clear all asserted faults.
Definition lt7170.c:1040
int lt7170_write_word(struct lt7170_dev *dev, uint8_t cmd, uint16_t word)
Perform a raw PMBus write word operation.
Definition lt7170.c:573
#define LT7170_MFR_COMPARE_USER_ALL
Definition lt7170.h:152
int lt7170_adc_control(struct lt7170_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition lt7170.c:990
lt7170_limit_type
Definition lt7170.h:240
@ LT7170_VOUT_UV_WARN_LIMIT_TYPE
Definition lt7170.h:244
@ LT7170_IOUT_OC_WARN_LIMIT_TYPE
Definition lt7170.h:245
@ LT7170_TON_MAX_FAULT_LIMIT_TYPE
Definition lt7170.h:249
@ LT7170_VOUT_OV_WARN_LIMIT_TYPE
Definition lt7170.h:242
@ LT7170_OT_FAULT_LIMIT_TYPE
Definition lt7170.h:246
@ LT7170_TOFF_MAX_WARN_LIMIT_TYPE
Definition lt7170.h:250
@ LT7170_VOUT_OV_FAULT_LIMIT_TYPE
Definition lt7170.h:241
@ LT7170_VIN_UV_WARN_LIMIT_TYPE
Definition lt7170.h:248
@ LT7170_OT_WARN_LIMIT_TYPE
Definition lt7170.h:247
@ LT7170_VOUT_UV_FAULT_LIMIT_TYPE
Definition lt7170.h:243
int lt7170_send_byte(struct lt7170_dev *dev, uint8_t cmd)
Send a PMBus command to the device.
Definition lt7170.c:469
int lt7170_write_word_data(struct lt7170_dev *dev, uint8_t cmd, int data)
Converts value to register data and do PMBus write word operation.
Definition lt7170.c:613
#define LT7170_READ_FREQUENCY
Definition lt7170.h:116
#define LT7170_TON_MAX_FAULT_LIMIT
Definition lt7170.h:97
int lt7170_set_operation(struct lt7170_dev *dev, enum lt7170_operation_type operation)
Set channel operation.
Definition lt7170.c:942
#define LT7170_TOFF_FALL
Definition lt7170.h:100
int lt7170_read_value(struct lt7170_dev *dev, enum lt7170_value_type value_type, int *value)
Read a value.
Definition lt7170.c:680
lt7170_operation_type
Definition lt7170.h:218
@ LT7170_OPERATION_OFF
Definition lt7170.h:219
@ LT7170_OPERATION_MARGIN_HIGH
Definition lt7170.h:221
@ LT7170_OPERATION_SEQ_OFF
Definition lt7170.h:223
@ LT7170_OPERATION_ON
Definition lt7170.h:220
@ LT7170_OPERATION_MARGIN_LOW
Definition lt7170.h:222
int lt7170_switch_freq(struct lt7170_dev *dev, int freq)
Set switching frequency.
Definition lt7170.c:866
int lt7170_sync_config(struct lt7170_dev *dev, bool input_clk, bool output_clk)
Configure SYNC pin for clock synchronization.
Definition lt7170.c:966
#define LT7170_TOFF_DELAY
Definition lt7170.h:99
#define LT7170_VOUT_OV_WARN_LIMIT
Definition lt7170.h:81
int lt7170_set_timing(struct lt7170_dev *dev, enum lt7170_timing_type timing_type, int time)
Set timing values.
Definition lt7170.c:853
int lt7170_software_reset(struct lt7170_dev *dev)
Perform a device software reset.
Definition lt7170.c:1050
int lt7170_read_word_data(struct lt7170_dev *dev, uint8_t cmd, int *data)
Perform a PMBus read word operation and converts to actual value.
Definition lt7170.c:594
lt7170_value_type
Definition lt7170.h:226
@ LT7170_TEMP_PEAK
Definition lt7170.h:237
@ LT7170_VIN_PEAK
Definition lt7170.h:236
@ LT7170_VOUT
Definition lt7170.h:228
@ LT7170_VOUT_PEAK
Definition lt7170.h:235
@ LT7170_IOUT_PEAK
Definition lt7170.h:234
@ LT7170_FREQUENCY
Definition lt7170.h:231
@ LT7170_TEMP
Definition lt7170.h:230
@ LT7170_EXTVCC
Definition lt7170.h:233
@ LT7170_ITH
Definition lt7170.h:232
@ LT7170_IOUT
Definition lt7170.h:229
@ LT7170_VIN
Definition lt7170.h:227
#define LT7170_STATUS_WORD_TYPE_MSK
Definition lt7170.h:192
lt7170_timing_type
Definition lt7170.h:265
@ LT7170_TON_RISE_TYPE
Definition lt7170.h:267
@ LT7170_TON_DELAY_TYPE
Definition lt7170.h:266
@ LT7170_TOFF_DELAY_TYPE
Definition lt7170.h:268
@ LT7170_RETRY_DELAY
Definition lt7170.h:270
@ LT7170_TOFF_FALL_TYPE
Definition lt7170.h:269
#define LT7170_STATUS_CML_TYPE_MSK
Definition lt7170.h:190
int lt7170_read_block_data(struct lt7170_dev *dev, uint8_t cmd, uint8_t *data, size_t nbytes)
Perform a PMBus read block operation.
Definition lt7170.c:633
#define LT7170_MFR_READ_ITH
Definition lt7170.h:131
Header file of I2C Interface.
Header file of utility functions.
Definition lt7170.h:313
uint8_t name_size
Definition lt7170.h:315
char * name
Definition lt7170.h:314
Definition lt7170.h:286
struct no_os_gpio_desc * pg_desc
Definition lt7170.h:288
bool crc_en
Definition lt7170.h:295
struct no_os_gpio_desc * run_desc
Definition lt7170.h:289
enum lt7170_chip_id chip_id
Definition lt7170.h:294
struct no_os_gpio_desc * fault_desc
Definition lt7170.h:291
struct no_os_i2c_desc * i2c_desc
Definition lt7170.h:287
struct no_os_pwm_desc * sync_desc
Definition lt7170.h:292
struct no_os_gpio_desc * alert_desc
Definition lt7170.h:290
Definition lt7170.h:298
enum lt7170_chip_id chip_id
Definition lt7170.h:306
struct no_os_i2c_init_param * i2c_init
Definition lt7170.h:299
struct no_os_gpio_init_param * run_param
Definition lt7170.h:301
struct no_os_pwm_init_param * sync_param
Definition lt7170.h:304
struct no_os_gpio_init_param * alert_param
Definition lt7170.h:302
bool external_clk_en
Definition lt7170.h:309
bool crc_en
Definition lt7170.h:310
enum lt7170_fault_pin_config fault_cfg
Definition lt7170.h:307
struct no_os_gpio_init_param * fault_param
Definition lt7170.h:303
struct no_os_gpio_init_param * pg_param
Definition lt7170.h:300
Definition lt7170.h:318
uint8_t cml
Definition lt7170.h:325
uint8_t byte
Definition lt7170.h:320
uint8_t iout
Definition lt7170.h:322
uint8_t input
Definition lt7170.h:323
uint16_t word
Definition lt7170.h:319
uint8_t vout
Definition lt7170.h:321
uint8_t mfr_specific
Definition lt7170.h:326
uint8_t temp
Definition lt7170.h:324
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding I2C address descriptor.
Definition no_os_i2c.h:89
Structure holding the parameters for I2C initialization.
Definition no_os_i2c.h:52
Structure representing an PWM generator device.
Definition no_os_pwm.h:83
Structure containing the init parameters needed by the PWM generator.
Definition no_os_pwm.h:56