no-OS
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 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 
47 #include <stdint.h>
48 #include <string.h>
49 #include "no_os_util.h"
50 #include "no_os_i2c.h"
51 
52 /******************************************************************************/
53 /********************** Macros and Constants Definitions **********************/
54 /******************************************************************************/
55 
56 /* PMBus commands */
57 #define LT7170_PAGE 0x00
58 #define LT7170_OPERATION 0x01
59 #define LT7170_ON_OFF_CONFIG 0x02
60 #define LT7170_CLEAR_FAULTS 0x03
61 #define LT7170_PAGE_PLUS_WRITE 0x05
62 #define LT7170_PAGE_PLUS_READ 0x06
63 #define LT7170_ZONE_CONFIG 0x07
64 #define LT7170_ZONE_ACTIVE 0x08
65 
66 #define LT7170_WRITE_PROTECT 0x10
67 
68 #define LT7170_STORE_USER_ALL 0x15
69 #define LT7170_RESTORE_USER_ALL 0x16
70 
71 #define LT7170_CAPABILITY 0x19
72 #define LT7170_QUERY 0x1A
73 #define LT7170_SMBALERT_MASK 0x1B
74 
75 #define LT7170_VOUT_MODE 0x20
76 #define LT7170_VOUT_COMMAND 0x21
77 #define LT7170_VOUT_MAX 0x24
78 #define LT7170_VOUT_MARGIN_HIGH 0x25
79 #define LT7170_VOUT_MARGIN_LOW 0x26
80 #define LT7170_VOUT_TRANSITION_RATE 0x27
81 
82 #define LT7170_FREQUENCY_SWITCH 0x33
83 #define LT7170_VIN_ON 0x35
84 #define LT7170_VIN_OFF 0x36
85 
86 #define LT7170_IOUT_CAL_OFFSET 0x39
87 #define LT7170_VOUT_OV_FAULT_LIMIT 0x40
88 #define LT7170_VOUT_OV_FAULT_RESPONSE 0x41
89 #define LT7170_VOUT_OV_WARN_LIMIT 0x42
90 #define LT7170_VOUT_UV_WARN_LIMIT 0x43
91 #define LT7170_VOUT_UV_FAULT_LIMIT 0x44
92 #define LT7170_VOUT_UV_FAULT_RESPONSE 0x45
93 #define LT7170_IOUT_OC_FAULT_RESPONSE 0x47
94 #define LT7170_IOUT_OC_WARN_LIMIT 0x4A
95 
96 #define LT7170_OT_FAULT_LIMIT 0x4F
97 #define LT7170_OT_FAULT_RESPONSE 0x50
98 #define LT7170_OT_WARN_LIMIT 0x51
99 
100 #define LT7170_VIN_OV_FAULT_RESPONSE 0x56
101 #define LT7170_VIN_UV_WARN_LIMIT 0x58
102 
103 #define LT7170_TON_DELAY 0x60
104 #define LT7170_TON_RISE 0x61
105 #define LT7170_TON_MAX_FAULT_LIMIT 0x62
106 #define LT7170_TON_MAX_FAULT_RESPONSE 0x63
107 #define LT7170_TOFF_DELAY 0x64
108 #define LT7170_TOFF_FALL 0x65
109 #define LT7170_TOFF_MAX_WARN_LIMIT 0x66
110 
111 #define LT7170_STATUS_BYTE 0x78
112 #define LT7170_STATUS_WORD 0x79
113 #define LT7170_STATUS_VOUT 0x7A
114 #define LT7170_STATUS_IOUT 0x7B
115 #define LT7170_STATUS_INPUT 0x7C
116 #define LT7170_STATUS_TEMPERATURE 0x7D
117 #define LT7170_STATUS_CML 0x7E
118 #define LT7170_STATUS_MFR_SPECIFIC 0x80
119 
120 #define LT7170_READ_VIN 0x88
121 #define LT7170_READ_VOUT 0x8B
122 #define LT7170_READ_IOUT 0x8C
123 #define LT7170_READ_TEMPERATURE_1 0x8D
124 #define LT7170_READ_FREQUENCY 0x95
125 
126 #define LT7170_REVISION 0x98
127 #define LT7170_MFR_ID 0x99
128 #define LT7170_MFR_SERIAL 0x9E
129 
130 #define LT7170_IC_DEVICE_ID 0xAD
131 #define LT7170_IC_DEVICE_REV 0xAE
132 
133 #define LT7170_MFR_NVM_UNLOCK 0xBD
134 #define LT7170_MFR_NVM_USER_WRITES_REMAINING 0xBE
135 #define LT7170_MFR_NVM_DATA 0xBF
136 #define LT7170_MFR_USER_DATA_00 0xC9
137 #define LT7170_MFR_USER_DATA_01 0xCA
138 #define LT7170_MFR_READ_EXTVCC 0xCD
139 #define LT7170_MFR_READ_ITH 0xCE
140 #define LT7170_MFR_CHAN_CONFIG 0xD0
141 #define LT7170_MFR_CONFIG_ALL 0xD1
142 #define LT7170_MFR_FAULT_PROPAGATE 0xD2
143 #define LT7170_MFR_READ_ASEL 0xD3
144 #define LT7170_MFR_PWM_MODE 0xD4
145 #define LT7170_MFR_FAULT_RESPONSE 0xD5
146 #define LT7170_MFR_IOUT_PEAK 0xD7
147 #define LT7170_MFR_ADC_CONTROL 0xD8
148 #define LT7170_MFR_RETRY_DELAY 0xDB
149 #define LT7170_MFR_VOUT_PEAK 0xDD
150 #define LT7170_MFR_VIN_PEAK 0xDE
151 #define LT7170_MFR_TEMPERATURE_1_PEAK 0xDF
152 #define LT7170_MFR_READ_PWM_CFG 0xE0
153 #define LT7170_MFR_READ_VOUT_CFG 0xE1
154 #define LT7170_MFR_CLEAR_PEAKS 0xE3
155 #define LT7170_MFR_DISCHARGE_THRESHOLD 0xE4
156 #define LT7170_MFR_PADS 0xE5
157 #define LT7170_MFR_I2C_ADDRESS 0xE6
158 #define LT7170_MFR_SPECIAL_ID 0xE7
159 #define LT7170_MFR_COMMON 0xEF
160 #define LT7170_MFR_COMPARE_USER_ALL 0xF0
161 #define LT7170_MFR_CHANNEL_STATE 0xF1
162 #define LT7170_MFR_PGOOD_DELAY 0xF2
163 #define LT7170_MFR_NOT_PGOOD_DELAY 0xF3
164 #define LT7170_MFR_PWM_PHASE 0xF5
165 #define LT7170_MFR_SYNC_CONFIG 0xF6
166 #define LT7170_MFR_PIN_CONFIG_STATUS 0xF7
167 #define LT7170_MFR_RAIL_ADDRESS 0xFA
168 #define LT7170_MFR_DISABLE_OUTPUT 0xFB
169 #define LT7170_MFR_NVM_USER_WP 0xFC
170 #define LT7170_MFR_RESET 0xFD
171 
172 /* PMBus-specific parameters */
173 #define LT7170_CRC_POLYNOMIAL 0x7
174 #define LT7170_VOUT_MODE_VAL_MSK NO_OS_GENMASK(4,0)
175 
176 /* IEEE754 data format params */
177 #define LT7170_IEEE754_SIGN_BIT NO_OS_BIT(15)
178 #define LT7170_IEEE754_EXPONENT_MSK NO_OS_GENMASK(14, 10)
179 #define LT7170_IEEE754_MANTISSA_MSK NO_OS_GENMASK(9, 0)
180 #define LT7170_IEEE754_MAX_MANTISSA 0x7ff
181 #define LT7170_IEEE754_MIN_MANTISSA 0x400
182 
183 /* Device specific constants */
184 #define LT7170_FREQ_MIN 400000
185 #define LT7170_FREQ_MAX 4000000
186 #define LT7170_VIN_ON_MIN 1400
187 #define LT7170_VIN_ON_MAX 16000
188 #define LT7170_VIN_OFF_MIN 1350
189 #define LT7170_VIN_OFF_MAX 16000
190 #define LT7170_PHASE_FULL_MILLI 360000
191 
192 /* Status types masks */
193 #define LT7170_STATUS_BYTE_TYPE_MSK 0x01
194 #define LT7170_STATUS_VOUT_TYPE_MSK 0x02
195 #define LT7170_STATUS_IOUT_TYPE_MSK 0x04
196 #define LT7170_STATUS_INPUT_TYPE_MSK 0x08
197 #define LT7170_STATUS_TEMP_TYPE_MSK 0x10
198 #define LT7170_STATUS_CML_TYPE_MSK 0x20
199 #define LT7170_STATUS_MFR_SPECIFIC_TYPE_MSK 0x40
200 #define LT7170_STATUS_WORD_TYPE_MSK 0x80
201 #define LT7170_STATUS_ALL_TYPE_MSK 0xFF
202 
203 /* LT7170 configurable bits and masks */
204 #define LT7170_PWM_OP_MODE_BIT NO_OS_BIT(0)
205 #define LT7170_SYNC_CLK_INPUT_BIT NO_OS_BIT(1)
206 #define LT7170_SYNC_CLK_OUTPUT_BIT NO_OS_BIT(0)
207 #define LT7170_ADC_CTRL_LOW_FREQ_BIT NO_OS_BIT(1)
208 #define LT7170_ADC_CTRL_DEBUG_BIT NO_OS_BIT(0)
209 #define LT7170_CONFIG_ALL_PEC_BIT NO_OS_BIT(2)
210 #define LT7170_PADS_RUN_BIT NO_OS_BIT(2)
211 
212 #define LT7170_SPECIAL_ID_VALUE 0x1C1D
213 
219 };
220 
224 };
225 
232 };
233 
246 };
247 
259 };
260 
271 };
272 
279 };
280 
287 };
288 
292 };
293 
294 struct lt7170_dev {
301 
303  bool crc_en;
304 };
305 
313 
316 
318  bool crc_en;
319 };
320 
322  char *name;
323  uint8_t name_size;
324 };
325 
327  uint16_t word;
328  uint8_t byte;
329  uint8_t vout;
330  uint8_t iout;
331  uint8_t input;
332  uint8_t temp;
333  uint8_t cml;
334  uint8_t mfr_specific;
335 };
336 
337 /******************************************************************************/
338 /************************ Functions Declarations ******************************/
339 /******************************************************************************/
340 
341 /* Initialize the device structure */
342 int lt7170_init(struct lt7170_dev **dev,
343  struct lt7170_init_param *init_param);
344 
345 /* Free or remove device instance */
346 int lt7170_remove(struct lt7170_dev *dev);
347 
348 /* Send a PMBus command to the device */
349 int lt7170_send_byte(struct lt7170_dev *dev, uint8_t cmd);
350 
351 /* Perform a PMBus read_byte operation */
352 int lt7170_read_byte(struct lt7170_dev *dev,
353  uint8_t cmd, uint8_t *data);
354 
355 /* Perform a PMBus write_byte operation */
356 int lt7170_write_byte(struct lt7170_dev *dev,
357  uint8_t cmd, uint8_t value);
358 
359 /* Perform a PMBus read_word operation */
360 int lt7170_read_word(struct lt7170_dev *dev,
361  uint8_t cmd, uint16_t *word);
362 
363 /* Perform a PMBus write_word operation */
364 int lt7170_write_word(struct lt7170_dev *dev,
365  uint8_t cmd, uint16_t word);
366 
367 /* Perform a PMBus read_word operation then perform conversion*/
368 int lt7170_read_word_data(struct lt7170_dev *dev,
369  uint8_t cmd, int *data);
370 
371 /* Perform conversion then perform a PMBus write_word operation */
372 int lt7170_write_word_data(struct lt7170_dev *dev,
373  uint8_t cmd, int data);
374 
375 /* Read a block of bytes */
376 int lt7170_read_block_data(struct lt7170_dev *dev,
377  uint8_t cmd, uint8_t *data, size_t nbytes);
378 
379 /* Read specific value type */
380 int lt7170_read_value(struct lt7170_dev *dev,
381  enum lt7170_value_type value_type,
382  int *value);
383 
384 /* Read status */
385 int lt7170_read_status(struct lt7170_dev *dev,
386  enum lt7170_status_type status_type,
387  struct lt7170_status *status);
388 
389 /* Set VOUT parameters: VOUT_COMMAND and VOUT_MAX */
390 int lt7170_vout_value(struct lt7170_dev *dev,
391  int vout_command, int vout_max);
392 
393 /* Set VOUT transition rate */
394 int lt7170_vout_tr(struct lt7170_dev *dev, int tr);
395 
396 /* Set VOUT margins */
397 int lt7170_vout_margin(struct lt7170_dev *dev,
398  int margin_high, int margin_low);
399 
400 /* Set VIN threshold when to start power conversion */
401 int lt7170_set_vin(struct lt7170_dev *dev,
402  int vin_on, int vin_off);
403 
404 /* Set timing values */
405 int lt7170_set_timing(struct lt7170_dev *dev,
406  enum lt7170_timing_type timing_type, int time);
407 
408 /* Set switching frequency */
409 int lt7170_switch_freq(struct lt7170_dev *dev, int freq);
410 
411 /* Set PWM mode of a channel */
412 int lt7170_pwm_mode(struct lt7170_dev *dev,
413  enum lt7170_pwm_mode pwm_mode);
414 
415 /* Set PWM phase offset of a channel */
416 int lt7170_pwm_phase(struct lt7170_dev *dev,
417  int phase);
418 
419 /* Set fault/warning limit values */
420 int lt7170_set_limit(struct lt7170_dev *dev,
421  enum lt7170_limit_type limit, int limit_val);
422 
423 /* Set operation */
424 int lt7170_set_operation(struct lt7170_dev *dev,
425  enum lt7170_operation_type operation);
426 
427 /* Set channel state */
428 int lt7170_set_channel_state(struct lt7170_dev *dev,
429  bool state);
430 
431 /* Set clock synchronization configs */
432 int lt7170_sync_config(struct lt7170_dev *dev,
433  bool input_clk,
434  bool output_clk);
435 
436 /* Set ADC telemetry control */
437 int lt7170_adc_control(struct lt7170_dev *dev, bool low_freq_telemetry,
438  bool debug_telemetry);
439 
440 /* NVM/EEPROM user commands */
441 int lt7170_nvm_cmd(struct lt7170_dev *dev, enum lt7170_nvm_cmd_type cmd);
442 
443 /* Clear status registers */
444 int lt7170_clear_faults(struct lt7170_dev *dev);
445 
446 /* Software reset */
447 int lt7170_software_reset(struct lt7170_dev *dev);
448 
449 #endif /* __LT7170_H__ */
ID_LT7171_1
@ ID_LT7171_1
Definition: lt7170.h:218
lt7170_write_word
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
lt7170_init_param::chip_id
enum lt7170_chip_id chip_id
Definition: lt7170.h:314
lt7170_init_param::crc_en
bool crc_en
Definition: lt7170.h:318
LT7170_STATUS_WORD_TYPE
@ LT7170_STATUS_WORD_TYPE
Definition: lt7170.h:269
MILLI
#define MILLI
Definition: no_os_units.h:48
LT7170_STORE_USER
@ LT7170_STORE_USER
Definition: lt7170.h:284
no_os_alloc.h
no_os_gpio_init_param
Structure holding the parameters for GPIO initialization.
Definition: no_os_gpio.h:79
LT7170_IOUT_CAL_OFFSET
#define LT7170_IOUT_CAL_OFFSET
Definition: lt7170.h:86
no_os_pwm_init_param
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
lt7170_write_byte
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
lt7170_status::byte
uint8_t byte
Definition: lt7170.h:328
LT7170_OPERATION_ON
@ LT7170_OPERATION_ON
Definition: lt7170.h:228
LT7170_UNLOCK_USER
@ LT7170_UNLOCK_USER
Definition: lt7170.h:283
no_os_i2c_write
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
lt7170_status::word
uint16_t word
Definition: lt7170.h:327
dev_err
#define dev_err(dev, format,...)
Definition: ad9361_util.h:63
no_os_i2c_init
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
LT7170_CLEAR_FAULTS
#define LT7170_CLEAR_FAULTS
Definition: lt7170.h:60
no_os_put_unaligned_le16
void no_os_put_unaligned_le16(uint16_t val, uint8_t *buf)
LT7170_VOUT_MARGIN_LOW
#define LT7170_VOUT_MARGIN_LOW
Definition: lt7170.h:79
LT7170_VOUT_UV_WARN_LIMIT
#define LT7170_VOUT_UV_WARN_LIMIT
Definition: lt7170.h:90
LT7170_IEEE754_MAX_MANTISSA
#define LT7170_IEEE754_MAX_MANTISSA
Definition: lt7170.h:180
lt7170.h
LT7170_IOUT
@ LT7170_IOUT
Definition: lt7170.h:237
no_os_pwm_remove
int32_t no_os_pwm_remove(struct no_os_pwm_desc *desc)
Free the resources allocated by no_os_pwm_init().
Definition: no_os_pwm.c:79
lt7170_vout_value
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_init_param::fault_param
struct no_os_gpio_init_param * fault_param
Definition: lt7170.h:311
no_os_i2c_remove
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
LT7170_RETRY_DELAY
@ LT7170_RETRY_DELAY
Definition: lt7170.h:278
LT7170_ADC_CTRL_DEBUG_BIT
#define LT7170_ADC_CTRL_DEBUG_BIT
Definition: lt7170.h:208
LT7170_TON_MAX_FAULT_LIMIT_TYPE
@ LT7170_TON_MAX_FAULT_LIMIT_TYPE
Definition: lt7170.h:257
LT7170_STATUS_INPUT_TYPE_MSK
#define LT7170_STATUS_INPUT_TYPE_MSK
Definition: lt7170.h:196
LT7170_VOUT_MARGIN_HIGH
#define LT7170_VOUT_MARGIN_HIGH
Definition: lt7170.h:78
no_os_units.h
Header file of Units.
lt7170_vout_margin
int lt7170_vout_margin(struct lt7170_dev *dev, int margin_high, int margin_low)
Set output voltage margin.
Definition: lt7170.c:801
lt7170_switch_freq
int lt7170_switch_freq(struct lt7170_dev *dev, int freq)
Set switching frequency.
Definition: lt7170.c:866
lt7170_nvm_cmd
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
LT7170_IOUT_OC_WARN_LIMIT_TYPE
@ LT7170_IOUT_OC_WARN_LIMIT_TYPE
Definition: lt7170.h:253
LT7170_OPERATION_SEQ_OFF
@ LT7170_OPERATION_SEQ_OFF
Definition: lt7170.h:231
LT7170_VOUT_UV_FAULT_LIMIT_TYPE
@ LT7170_VOUT_UV_FAULT_LIMIT_TYPE
Definition: lt7170.h:251
LT7170_TEMP_PEAK
@ LT7170_TEMP_PEAK
Definition: lt7170.h:245
LT7170_STATUS_WORD_TYPE_MSK
#define LT7170_STATUS_WORD_TYPE_MSK
Definition: lt7170.h:200
lt7170_set_limit
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
LT7170_LOCK_USER
@ LT7170_LOCK_USER
Definition: lt7170.h:282
no_os_delay.h
Header file of Delay functions.
LT7170_TON_RISE
#define LT7170_TON_RISE
Definition: lt7170.h:104
LT7170_STORE_USER_ALL
#define LT7170_STORE_USER_ALL
Definition: lt7170.h:68
lt7170_dev::fault_desc
struct no_os_gpio_desc * fault_desc
Definition: lt7170.h:299
lt7170_init_param::pg_param
struct no_os_gpio_init_param * pg_param
Definition: lt7170.h:308
lt7170_write_word_data
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
LT7170_STATUS_IOUT_TYPE_MSK
#define LT7170_STATUS_IOUT_TYPE_MSK
Definition: lt7170.h:195
LT7170_MFR_DISCHARGE_THRESHOLD
#define LT7170_MFR_DISCHARGE_THRESHOLD
Definition: lt7170.h:155
LT7170_TON_DELAY_TYPE
@ LT7170_TON_DELAY_TYPE
Definition: lt7170.h:274
NO_OS_DIV_ROUND_CLOSEST_ULL
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
LT7170_VOUT_OV_WARN_LIMIT_TYPE
@ LT7170_VOUT_OV_WARN_LIMIT_TYPE
Definition: lt7170.h:250
LT7170_TOFF_MAX_WARN_LIMIT_TYPE
@ LT7170_TOFF_MAX_WARN_LIMIT_TYPE
Definition: lt7170.h:258
LT7170_MFR_PGOOD_DELAY
#define LT7170_MFR_PGOOD_DELAY
Definition: lt7170.h:162
LT7170_FAULT_PIN_INPUT
@ LT7170_FAULT_PIN_INPUT
Definition: lt7170.h:222
lt7170_adc_control
int lt7170_adc_control(struct lt7170_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition: lt7170.c:990
LT7170_READ_FREQUENCY
#define LT7170_READ_FREQUENCY
Definition: lt7170.h:124
device
Definition: ad9361_util.h:69
LT7170_VOUT_UV_WARN_LIMIT_TYPE
@ LT7170_VOUT_UV_WARN_LIMIT_TYPE
Definition: lt7170.h:252
NO_OS_GPIO_HIGH
@ NO_OS_GPIO_HIGH
Definition: no_os_gpio.h:117
lt7170_dev
Definition: lt7170.h:294
LT7170_CRC_POLYNOMIAL
#define LT7170_CRC_POLYNOMIAL
Definition: lt7170.h:173
lt7170_sync_config
int lt7170_sync_config(struct lt7170_dev *dev, bool input_clk, bool output_clk)
Configure SYNC pin for clock synchronization.
Definition: lt7170.c:966
lt7170_set_channel_state
int lt7170_set_channel_state(struct lt7170_dev *dev, bool state)
Set channel state using the RUN pin.
Definition: lt7170.c:954
lt7170_timing_type
lt7170_timing_type
Definition: lt7170.h:273
no_os_calloc
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
LT7170_PWM_PULSE_SKIP_MODE
@ LT7170_PWM_PULSE_SKIP_MODE
Definition: lt7170.h:291
lt7170_status
Definition: lt7170.h:326
lt7170_dev::sync_desc
struct no_os_pwm_desc * sync_desc
Definition: lt7170.h:300
no_os_gpio_direction_input
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
lt7170_value_type
lt7170_value_type
Definition: lt7170.h:234
LT7170_VOUT_OV_WARN_LIMIT
#define LT7170_VOUT_OV_WARN_LIMIT
Definition: lt7170.h:89
LT7170_STATUS_BYTE_TYPE
@ LT7170_STATUS_BYTE_TYPE
Definition: lt7170.h:262
lt7170_vout_margin
int lt7170_vout_margin(struct lt7170_dev *dev, int margin_high, int margin_low)
Set output voltage margin.
Definition: lt7170.c:801
LT7170_MFR_NOT_PGOOD_DELAY
#define LT7170_MFR_NOT_PGOOD_DELAY
Definition: lt7170.h:163
LT7170_TOFF_DELAY
#define LT7170_TOFF_DELAY
Definition: lt7170.h:107
LT7170_VOUT
@ LT7170_VOUT
Definition: lt7170.h:236
LT7170_SYNC_CLK_INPUT_BIT
#define LT7170_SYNC_CLK_INPUT_BIT
Definition: lt7170.h:205
lt7170_init_param
Definition: lt7170.h:306
LT7170_STATUS_TEMP_TYPE
@ LT7170_STATUS_TEMP_TYPE
Definition: lt7170.h:266
lt7170_sync_config
int lt7170_sync_config(struct lt7170_dev *dev, bool input_clk, bool output_clk)
Configure SYNC pin for clock synchronization.
Definition: lt7170.c:966
LT7170_VIN_OFF
#define LT7170_VIN_OFF
Definition: lt7170.h:84
lt7170_read_block_data
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
lt7170_chip_info::name_size
uint8_t name_size
Definition: lt7170.h:323
LT7170_IC_DEVICE_ID
#define LT7170_IC_DEVICE_ID
Definition: lt7170.h:130
LT7170_OPERATION
#define LT7170_OPERATION
Definition: lt7170.h:58
lt7170_read_value
int lt7170_read_value(struct lt7170_dev *dev, enum lt7170_value_type value_type, int *value)
Read a value.
Definition: lt7170.c:680
LT7170_VOUT_TRANSITION_RATE
#define LT7170_VOUT_TRANSITION_RATE
Definition: lt7170.h:80
LT7170_VIN_UV_WARN_LIMIT
#define LT7170_VIN_UV_WARN_LIMIT
Definition: lt7170.h:101
LT7170_MFR_RESET
#define LT7170_MFR_RESET
Definition: lt7170.h:170
LT7170_MFR_COMPARE_USER_ALL
#define LT7170_MFR_COMPARE_USER_ALL
Definition: lt7170.h:160
lt7170_dev::chip_id
enum lt7170_chip_id chip_id
Definition: lt7170.h:302
lt7170_status::temp
uint8_t temp
Definition: lt7170.h:332
lt7170_write_byte
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
LT7170_IEEE754_MIN_MANTISSA
#define LT7170_IEEE754_MIN_MANTISSA
Definition: lt7170.h:181
no_os_i2c_desc::slave_address
uint8_t slave_address
Definition: no_os_i2c.h:109
LT7170_MFR_VOUT_PEAK
#define LT7170_MFR_VOUT_PEAK
Definition: lt7170.h:149
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
lt7170_pwm_phase
int lt7170_pwm_phase(struct lt7170_dev *dev, int phase)
Set output PWM phase.
Definition: lt7170.c:904
lt7170_adc_control
int lt7170_adc_control(struct lt7170_dev *dev, bool low_freq_telemetry, bool debug_telemetry)
Configure ADC control.
Definition: lt7170.c:990
lt7170_software_reset
int lt7170_software_reset(struct lt7170_dev *dev)
Perform a device software reset.
Definition: lt7170.c:1050
lt7170_read_block_data
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
LT7170_TOFF_DELAY_TYPE
@ LT7170_TOFF_DELAY_TYPE
Definition: lt7170.h:276
LT7170_OT_WARN_LIMIT
#define LT7170_OT_WARN_LIMIT
Definition: lt7170.h:98
LT7170_OPERATION_MARGIN_HIGH
@ LT7170_OPERATION_MARGIN_HIGH
Definition: lt7170.h:229
lt7170_status::input
uint8_t input
Definition: lt7170.h:331
lt7170_init_param::run_param
struct no_os_gpio_init_param * run_param
Definition: lt7170.h:309
LT7170_STATUS_INPUT
#define LT7170_STATUS_INPUT
Definition: lt7170.h:115
lt7170_init_param::sync_param
struct no_os_pwm_init_param * sync_param
Definition: lt7170.h:312
LT7170_OT_FAULT_LIMIT
#define LT7170_OT_FAULT_LIMIT
Definition: lt7170.h:96
LT7170_STATUS_VOUT_TYPE_MSK
#define LT7170_STATUS_VOUT_TYPE_MSK
Definition: lt7170.h:194
LT7170_TON_RISE_TYPE
@ LT7170_TON_RISE_TYPE
Definition: lt7170.h:275
lt7170_dev::run_desc
struct no_os_gpio_desc * run_desc
Definition: lt7170.h:297
no_os_crc8_populate_msb
void no_os_crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
lt7170_pwm_mode
lt7170_pwm_mode
Definition: lt7170.h:289
lt7170_set_operation
int lt7170_set_operation(struct lt7170_dev *dev, enum lt7170_operation_type operation)
Set channel operation.
Definition: lt7170.c:942
LT7170_STATUS_TEMPERATURE
#define LT7170_STATUS_TEMPERATURE
Definition: lt7170.h:116
lt7170_clear_faults
int lt7170_clear_faults(struct lt7170_dev *dev)
Clear all asserted faults.
Definition: lt7170.c:1040
LT7170_STATUS_ALL_TYPE
@ LT7170_STATUS_ALL_TYPE
Definition: lt7170.h:270
lt7170_dev::crc_en
bool crc_en
Definition: lt7170.h:303
LT7170_MFR_IOUT_PEAK
#define LT7170_MFR_IOUT_PEAK
Definition: lt7170.h:146
lt7170_vout_tr
int lt7170_vout_tr(struct lt7170_dev *dev, int tr)
Set output voltage transition rate.
Definition: lt7170.c:789
lt7170_status::vout
uint8_t vout
Definition: lt7170.h:329
lt7170_init_param::alert_param
struct no_os_gpio_init_param * alert_param
Definition: lt7170.h:310
LT7170_OT_FAULT_LIMIT_TYPE
@ LT7170_OT_FAULT_LIMIT_TYPE
Definition: lt7170.h:254
LT7170_IEEE754_EXPONENT_MSK
#define LT7170_IEEE754_EXPONENT_MSK
Definition: lt7170.h:178
lt7170_remove
int lt7170_remove(struct lt7170_dev *dev)
Free or remove device instance.
Definition: lt7170.c:428
LT7170_VIN
@ LT7170_VIN
Definition: lt7170.h:235
LT7170_STATUS_IOUT
#define LT7170_STATUS_IOUT
Definition: lt7170.h:114
LT7170_FREQUENCY_SWITCH
#define LT7170_FREQUENCY_SWITCH
Definition: lt7170.h:82
LT7170_READ_VOUT
#define LT7170_READ_VOUT
Definition: lt7170.h:121
LT7170_FAULT_PIN_OUTPUT
@ LT7170_FAULT_PIN_OUTPUT
Definition: lt7170.h:223
LT7170_COMPARE_USER
@ LT7170_COMPARE_USER
Definition: lt7170.h:286
lt7170_read_status
int lt7170_read_status(struct lt7170_dev *dev, enum lt7170_status_type status_type, struct lt7170_status *status)
Read statuses.
Definition: lt7170.c:698
lt7170_switch_freq
int lt7170_switch_freq(struct lt7170_dev *dev, int freq)
Set switching frequency.
Definition: lt7170.c:866
lt7170_clear_faults
int lt7170_clear_faults(struct lt7170_dev *dev)
Clear all asserted faults.
Definition: lt7170.c:1040
lt7170_dev::i2c_desc
struct no_os_i2c_desc * i2c_desc
Definition: lt7170.h:295
LT7170_MFR_READ_ITH
#define LT7170_MFR_READ_ITH
Definition: lt7170.h:139
LT7170_STATUS_BYTE_TYPE_MSK
#define LT7170_STATUS_BYTE_TYPE_MSK
Definition: lt7170.h:193
lt7170_software_reset
int lt7170_software_reset(struct lt7170_dev *dev)
Perform a device software reset.
Definition: lt7170.c:1050
LT7170_STATUS_ALL_TYPE_MSK
#define LT7170_STATUS_ALL_TYPE_MSK
Definition: lt7170.h:201
LT7170_VIN_ON
#define LT7170_VIN_ON
Definition: lt7170.h:83
lt7170_nvm_cmd_type
lt7170_nvm_cmd_type
Definition: lt7170.h:281
NO_OS_DECLARE_CRC8_TABLE
NO_OS_DECLARE_CRC8_TABLE(lt7170_crc_table)
LT7170_TOFF_FALL_TYPE
@ LT7170_TOFF_FALL_TYPE
Definition: lt7170.h:277
LT7170_STATUS_INPUT_TYPE
@ LT7170_STATUS_INPUT_TYPE
Definition: lt7170.h:265
LT7170_PWM_FORCED_CONTINUOUS_MODE
@ LT7170_PWM_FORCED_CONTINUOUS_MODE
Definition: lt7170.h:290
lt7170_set_vin
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
LT7170_STATUS_MFR_SPECIFIC
#define LT7170_STATUS_MFR_SPECIFIC
Definition: lt7170.h:118
ID_LT7171
@ ID_LT7171
Definition: lt7170.h:217
LT7170_STATUS_MFR_SPECIFIC_TYPE
@ LT7170_STATUS_MFR_SPECIFIC_TYPE
Definition: lt7170.h:268
no_os_gpio_remove
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
LT7170_MFR_ADC_CONTROL
#define LT7170_MFR_ADC_CONTROL
Definition: lt7170.h:147
lt7170_chip_info
Definition: lt7170.h:321
no_os_clamp
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:69
lt7170_status::iout
uint8_t iout
Definition: lt7170.h:330
LT7170_IOUT_OC_WARN_LIMIT
#define LT7170_IOUT_OC_WARN_LIMIT
Definition: lt7170.h:94
lt7170_set_operation
int lt7170_set_operation(struct lt7170_dev *dev, enum lt7170_operation_type operation)
Set channel operation.
Definition: lt7170.c:942
lt7170_init_param::external_clk_en
bool external_clk_en
Definition: lt7170.h:317
LT7170_TOFF_MAX_WARN_LIMIT
#define LT7170_TOFF_MAX_WARN_LIMIT
Definition: lt7170.h:109
lt7170_set_vin
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
LT7170_MFR_PWM_PHASE
#define LT7170_MFR_PWM_PHASE
Definition: lt7170.h:164
lt7170_vout_tr
int lt7170_vout_tr(struct lt7170_dev *dev, int tr)
Set output voltage transition rate.
Definition: lt7170.c:789
no_os_gpio_desc
Structure holding the GPIO descriptor.
Definition: no_os_gpio.h:96
lt7170_read_word
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
LT7170_MFR_NVM_USER_WP
#define LT7170_MFR_NVM_USER_WP
Definition: lt7170.h:169
LT7170_RESTORE_USER_ALL
#define LT7170_RESTORE_USER_ALL
Definition: lt7170.h:69
LT7170_VOUT_PEAK
@ LT7170_VOUT_PEAK
Definition: lt7170.h:243
LT7170_STATUS_CML_TYPE_MSK
#define LT7170_STATUS_CML_TYPE_MSK
Definition: lt7170.h:198
lt7170_read_status
int lt7170_read_status(struct lt7170_dev *dev, enum lt7170_status_type status_type, struct lt7170_status *status)
Read statuses.
Definition: lt7170.c:698
LT7170_MFR_READ_ASEL
#define LT7170_MFR_READ_ASEL
Definition: lt7170.h:143
no_os_pwm_desc
Structure representing an PWM generator device.
Definition: no_os_pwm.h:93
lt7170_send_byte
int lt7170_send_byte(struct lt7170_dev *dev, uint8_t cmd)
Send a PMBus command to the device.
Definition: lt7170.c:469
LT7170_FREQ_MAX
#define LT7170_FREQ_MAX
Definition: lt7170.h:185
LT7170_MFR_TEMPERATURE_1_PEAK
#define LT7170_MFR_TEMPERATURE_1_PEAK
Definition: lt7170.h:151
LT7170_VOUT_OV_FAULT_LIMIT
#define LT7170_VOUT_OV_FAULT_LIMIT
Definition: lt7170.h:87
no_os_i2c_desc
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
no_os_pwm_init
int32_t no_os_pwm_init(struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
Initialize the PWM peripheral.
Definition: no_os_pwm.c:51
LT7170_TOFF_FALL
#define LT7170_TOFF_FALL
Definition: lt7170.h:108
no_os_i2c_read
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
no_os_i2c.h
Header file of I2C Interface.
lt7170_limit_type
lt7170_limit_type
Definition: lt7170.h:248
lt7170_send_byte
int lt7170_send_byte(struct lt7170_dev *dev, uint8_t cmd)
Send a PMBus command to the device.
Definition: lt7170.c:469
lt7170_fault_pin_config
lt7170_fault_pin_config
Definition: lt7170.h:221
lt7170_read_byte
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
no_os_pwm.h
Header file of PWM Interface.
lt7170_init_param::i2c_init
struct no_os_i2c_init_param * i2c_init
Definition: lt7170.h:307
lt7170_nvm_cmd
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
LT7170_IEEE754_MANTISSA_MSK
#define LT7170_IEEE754_MANTISSA_MSK
Definition: lt7170.h:179
lt7170_read_word_data
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_init_param::fault_cfg
enum lt7170_fault_pin_config fault_cfg
Definition: lt7170.h:315
LT7170_STATUS_BYTE
#define LT7170_STATUS_BYTE
Definition: lt7170.h:111
no_os_field_get
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
LT7170_VIN_PEAK
@ LT7170_VIN_PEAK
Definition: lt7170.h:244
lt7170_pwm_mode
int lt7170_pwm_mode(struct lt7170_dev *dev, enum lt7170_pwm_mode pwm_mode)
Set output PWM mode.
Definition: lt7170.c:883
lt7170_set_limit
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
lt7170_pwm_phase
int lt7170_pwm_phase(struct lt7170_dev *dev, int phase)
Set output PWM phase.
Definition: lt7170.c:904
LT7170_OT_WARN_LIMIT_TYPE
@ LT7170_OT_WARN_LIMIT_TYPE
Definition: lt7170.h:255
no_os_crc8
uint8_t no_os_crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)
lt7170_dev::pg_desc
struct no_os_gpio_desc * pg_desc
Definition: lt7170.h:296
no_os_free
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
LT7170_STATUS_CML
#define LT7170_STATUS_CML
Definition: lt7170.h:117
no_os_get_unaligned_le16
uint16_t no_os_get_unaligned_le16(uint8_t *buf)
LT7170_VIN_ON_MAX
#define LT7170_VIN_ON_MAX
Definition: lt7170.h:187
LT7170_CONFIG_ALL_PEC_BIT
#define LT7170_CONFIG_ALL_PEC_BIT
Definition: lt7170.h:209
lt7170_read_word_data
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_IOUT_PEAK
@ LT7170_IOUT_PEAK
Definition: lt7170.h:242
LT7170_MFR_RETRY_DELAY
#define LT7170_MFR_RETRY_DELAY
Definition: lt7170.h:148
lt7170_set_timing
int lt7170_set_timing(struct lt7170_dev *dev, enum lt7170_timing_type timing_type, int time)
Set timing values.
Definition: lt7170.c:853
lt7170_init
int lt7170_init(struct lt7170_dev **device, struct lt7170_init_param *init_param)
Initialize the device structure.
Definition: lt7170.c:304
LT7170_EXTVCC
@ LT7170_EXTVCC
Definition: lt7170.h:241
LT7170_VIN_OFF_MAX
#define LT7170_VIN_OFF_MAX
Definition: lt7170.h:189
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
lt7170_status::mfr_specific
uint8_t mfr_specific
Definition: lt7170.h:334
NULL
#define NULL
Definition: wrapper.h:64
LT7170_MFR_PWM_MODE
#define LT7170_MFR_PWM_MODE
Definition: lt7170.h:144
LT7170_PWM_OP_MODE_BIT
#define LT7170_PWM_OP_MODE_BIT
Definition: lt7170.h:204
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
LT7170_SYNC_CLK_OUTPUT_BIT
#define LT7170_SYNC_CLK_OUTPUT_BIT
Definition: lt7170.h:206
lt7170_set_channel_state
int lt7170_set_channel_state(struct lt7170_dev *dev, bool state)
Set channel state using the RUN pin.
Definition: lt7170.c:954
lt7170_set_timing
int lt7170_set_timing(struct lt7170_dev *dev, enum lt7170_timing_type timing_type, int time)
Set timing values.
Definition: lt7170.c:853
LT7170_STATUS_CML_TYPE
@ LT7170_STATUS_CML_TYPE
Definition: lt7170.h:267
LT7170_VOUT_MAX
#define LT7170_VOUT_MAX
Definition: lt7170.h:77
LT7170_STATUS_TEMP_TYPE_MSK
#define LT7170_STATUS_TEMP_TYPE_MSK
Definition: lt7170.h:197
LT7170_ITH
@ LT7170_ITH
Definition: lt7170.h:240
lt7170_read_byte
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
lt7170_status::cml
uint8_t cml
Definition: lt7170.h:333
LT7170_STATUS_VOUT
#define LT7170_STATUS_VOUT
Definition: lt7170.h:113
LT7170_VOUT_COMMAND
#define LT7170_VOUT_COMMAND
Definition: lt7170.h:76
LT7170_PHASE_FULL_MILLI
#define LT7170_PHASE_FULL_MILLI
Definition: lt7170.h:190
LT7170_STATUS_WORD
#define LT7170_STATUS_WORD
Definition: lt7170.h:112
LT7170_STATUS_MFR_SPECIFIC_TYPE_MSK
#define LT7170_STATUS_MFR_SPECIFIC_TYPE_MSK
Definition: lt7170.h:199
LT7170_OPERATION_MARGIN_LOW
@ LT7170_OPERATION_MARGIN_LOW
Definition: lt7170.h:230
lt7170_vout_value
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_RESTORE_USER
@ LT7170_RESTORE_USER
Definition: lt7170.h:285
LT7170_STATUS_VOUT_TYPE
@ LT7170_STATUS_VOUT_TYPE
Definition: lt7170.h:263
LT7170_TON_DELAY
#define LT7170_TON_DELAY
Definition: lt7170.h:103
LT7170_FREQUENCY
@ LT7170_FREQUENCY
Definition: lt7170.h:239
no_os_gpio.h
Header file of GPIO Interface.
lt7170_read_value
int lt7170_read_value(struct lt7170_dev *dev, enum lt7170_value_type value_type, int *value)
Read a value.
Definition: lt7170.c:680
LT7170_READ_TEMPERATURE_1
#define LT7170_READ_TEMPERATURE_1
Definition: lt7170.h:123
ID_LT7170_1
@ ID_LT7170_1
Definition: lt7170.h:216
lt7170_operation_type
lt7170_operation_type
Definition: lt7170.h:226
LT7170_OPERATION_OFF
@ LT7170_OPERATION_OFF
Definition: lt7170.h:227
LT7170_READ_VIN
#define LT7170_READ_VIN
Definition: lt7170.h:120
LT7170_MFR_SYNC_CONFIG
#define LT7170_MFR_SYNC_CONFIG
Definition: lt7170.h:165
LT7170_VOUT_UV_FAULT_LIMIT
#define LT7170_VOUT_UV_FAULT_LIMIT
Definition: lt7170.h:91
LT7170_VOUT_OV_FAULT_LIMIT_TYPE
@ LT7170_VOUT_OV_FAULT_LIMIT_TYPE
Definition: lt7170.h:249
lt7170_chip_id
lt7170_chip_id
Definition: lt7170.h:214
LT7170_READ_IOUT
#define LT7170_READ_IOUT
Definition: lt7170.h:122
no_os_util.h
Header file of utility functions.
lt7170_write_word_data
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
LT7170_MFR_READ_PWM_CFG
#define LT7170_MFR_READ_PWM_CFG
Definition: lt7170.h:152
LT7170_VIN_UV_WARN_LIMIT_TYPE
@ LT7170_VIN_UV_WARN_LIMIT_TYPE
Definition: lt7170.h:256
LT7170_MFR_READ_VOUT_CFG
#define LT7170_MFR_READ_VOUT_CFG
Definition: lt7170.h:153
lt7170_read_word
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
lt7170_chip_info::name
char * name
Definition: lt7170.h:322
no_os_gpio_direction_output
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
LT7170_STATUS_IOUT_TYPE
@ LT7170_STATUS_IOUT_TYPE
Definition: lt7170.h:264
lt7170_status_type
lt7170_status_type
Definition: lt7170.h:261
LT7170_MFR_CONFIG_ALL
#define LT7170_MFR_CONFIG_ALL
Definition: lt7170.h:141
LT7170_IEEE754_SIGN_BIT
#define LT7170_IEEE754_SIGN_BIT
Definition: lt7170.h:177
lt7170_init
int lt7170_init(struct lt7170_dev **dev, struct lt7170_init_param *init_param)
Initialize the device structure.
Definition: lt7170.c:304
lt7170_write_word
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
no_os_crc8.h
Header file of CRC-8 computation.
lt7170_remove
int lt7170_remove(struct lt7170_dev *dev)
Free or remove device instance.
Definition: lt7170.c:428
errno.h
Error macro definition for ARM Compiler.
LT7170_ADC_CTRL_LOW_FREQ_BIT
#define LT7170_ADC_CTRL_LOW_FREQ_BIT
Definition: lt7170.h:207
LT7170_TON_MAX_FAULT_LIMIT
#define LT7170_TON_MAX_FAULT_LIMIT
Definition: lt7170.h:105
LT7170_MFR_READ_EXTVCC
#define LT7170_MFR_READ_EXTVCC
Definition: lt7170.h:138
LT7170_MFR_VIN_PEAK
#define LT7170_MFR_VIN_PEAK
Definition: lt7170.h:150
ID_LT7170
@ ID_LT7170
Definition: lt7170.h:215
lt7170_dev::alert_desc
struct no_os_gpio_desc * alert_desc
Definition: lt7170.h:298
LT7170_TEMP
@ LT7170_TEMP
Definition: lt7170.h:238
no_os_gpio_get_optional
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