Structure holding the LT7170 IIO initialization parameter.
Definition: iio_lt7170.h:57
#define LT7170_VIN_OV_FAULT_RESPONSE
Definition: lt7170.h:100
#define MILLI
Definition: no_os_units.h:48
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
#define LT7170_IOUT_CAL_OFFSET
Definition: lt7170.h:86
lt7170_iio_pwm_params
Definition: iio_lt7170.c:60
@ LT7170_IIO_VOUT_CHAN
Definition: iio_lt7170.c:66
@ IIO_VAL_INT
Definition: iio_types.h:50
Struct describing the scan type.
Definition: iio_types.h:168
#define dev_err(dev, format,...)
Definition: ad9361_util.h:63
#define LT7170_CLEAR_FAULTS
Definition: lt7170.h:60
#define LT7170_VOUT_MARGIN_LOW
Definition: lt7170.h:79
#define LT7170_VOUT_UV_WARN_LIMIT
Definition: lt7170.h:90
#define LT7170_MFR_FAULT_RESPONSE
Definition: lt7170.h:145
#define LT7170_ZONE_CONFIG
Definition: lt7170.h:63
#define LT7170_PAGE_PLUS_READ
Definition: lt7170.h:62
#define LT7170_VOUT_OV_FAULT_RESPONSE
Definition: lt7170.h:88
Structure holding channel attributess.
Definition: iio_types.h:103
#define LT7170_VOUT_MARGIN_HIGH
Definition: lt7170.h:78
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:51
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:55
@ LT7170_IIO_PWM_FREQUENCY
Definition: iio_lt7170.c:61
#define LT7170_TON_RISE
Definition: lt7170.h:104
#define LT7170_STORE_USER_ALL
Definition: lt7170.h:68
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_MFR_DISCHARGE_THRESHOLD
Definition: lt7170.h:155
#define LT7170_MFR_PGOOD_DELAY
Definition: lt7170.h:162
#define LT7170_READ_FREQUENCY
Definition: lt7170.h:124
Structure holding the LT7170 IIO device descriptor.
Definition: iio_lt7170.h:49
#define LT7170_IC_DEVICE_REV
Definition: lt7170.h:131
#define LT7170_MFR_USER_DATA_01
Definition: lt7170.h:137
#define LT7170_MFR_CHANNEL_STATE
Definition: lt7170.h:161
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 NO_OS_ARRAY_SIZE(x)
Definition: no_os_util.h:49
#define LT7170_VOUT_OV_WARN_LIMIT
Definition: lt7170.h:89
#define LT7170_MFR_NOT_PGOOD_DELAY
Definition: lt7170.h:163
#define LT7170_TOFF_DELAY
Definition: lt7170.h:107
struct lt7170_dev * lt7170_dev
Definition: iio_lt7170.h:50
int lt7170_sync_config(struct lt7170_dev *dev, bool input_clk, bool output_clk)
Configure SYNC pin for clock synchronization.
Definition: lt7170.c:966
int lt7170_iio_remove(struct lt7170_iio_desc *iio_desc)
Free resources allocated by the init function.
Definition: iio_lt7170.c:798
#define LT7170_VIN_OFF
Definition: lt7170.h:84
#define MICRO
Definition: no_os_units.h:49
#define LT7170_IC_DEVICE_ID
Definition: lt7170.h:130
#define LT7170_OPERATION
Definition: lt7170.h:58
int lt7170_read_value(struct lt7170_dev *dev, enum lt7170_value_type value_type, int *value)
Read a value.
Definition: lt7170.c:680
#define LT7170_VOUT_TRANSITION_RATE
Definition: lt7170.h:80
#define LT7170_VIN_UV_WARN_LIMIT
Definition: lt7170.h:101
#define LT7170_MFR_RESET
Definition: lt7170.h:170
#define LT7170_MFR_COMPARE_USER_ALL
Definition: lt7170.h:160
@ LT7170_IIO_VIN_CHAN
Definition: iio_lt7170.c:67
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
@ IIO_SHARED_BY_ALL
Definition: iio_types.h:122
@ LT7170_IIO_TEMP_CHAN
Definition: iio_lt7170.c:69
#define LT7170_MFR_VOUT_PEAK
Definition: lt7170.h:149
int lt7170_pwm_phase(struct lt7170_dev *dev, int phase)
Set output PWM phase.
Definition: lt7170.c:904
#define LT7170_OT_FAULT_RESPONSE
Definition: lt7170.h:97
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_PADS_RUN_BIT
Definition: lt7170.h:210
#define LT7170_OT_WARN_LIMIT
Definition: lt7170.h:98
#define LT7170_STATUS_INPUT
Definition: lt7170.h:115
const char * name
Definition: iio_types.h:131
#define LT7170_OT_FAULT_LIMIT
Definition: lt7170.h:96
#define LT7170_MFR_PADS
Definition: lt7170.h:156
#define LT7170_WRITE_PROTECT
Definition: lt7170.h:66
lt7170_pwm_mode
Definition: lt7170.h:289
#define LT7170_STATUS_TEMPERATURE
Definition: lt7170.h:116
const char * name
Definition: iio_types.h:170
#define LT7170_MFR_IOUT_PEAK
Definition: lt7170.h:146
int lt7170_remove(struct lt7170_dev *dev)
Free or remove device instance.
Definition: lt7170.c:428
#define LT7170_STATUS_IOUT
Definition: lt7170.h:114
#define LT7170_FREQUENCY_SWITCH
Definition: lt7170.h:82
#define LT7170_READ_VOUT
Definition: lt7170.h:121
int lt7170_switch_freq(struct lt7170_dev *dev, int freq)
Set switching frequency.
Definition: lt7170.c:866
struct iio_device * iio_dev
Definition: iio_lt7170.h:51
#define LT7170_MFR_READ_ITH
Definition: lt7170.h:139
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
#define LT7170_MFR_COMMON
Definition: lt7170.h:159
#define LT7170_VIN_ON
Definition: lt7170.h:83
#define LT7170_MFR_FAULT_PROPAGATE
Definition: lt7170.h:142
#define LT7170_REVISION
Definition: lt7170.h:126
#define LT7170_VOUT_UV_FAULT_RESPONSE
Definition: lt7170.h:92
#define LT7170_MFR_DISABLE_OUTPUT
Definition: lt7170.h:168
#define LT7170_MFR_CLEAR_PEAKS
Definition: lt7170.h:154
#define LT7170_STATUS_MFR_SPECIFIC
Definition: lt7170.h:118
#define LT7170_MFR_ADC_CONTROL
Definition: lt7170.h:147
int lt7170_iio_remove(struct lt7170_iio_desc *)
Free resources allocated by the init function.
Definition: iio_lt7170.c:798
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:69
#define LT7170_IOUT_OC_WARN_LIMIT
Definition: lt7170.h:94
@ IIO_CURRENT
Definition: iio_types.h:66
#define LT7170_TOFF_MAX_WARN_LIMIT
Definition: lt7170.h:109
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
#define LT7170_MFR_PWM_PHASE
Definition: lt7170.h:164
#define LT7170_SMBALERT_MASK
Definition: lt7170.h:73
@ IIO_VOLTAGE
Definition: iio_types.h:65
#define LT7170_RESTORE_USER_ALL
Definition: lt7170.h:69
#define LT7170_ON_OFF_CONFIG
Definition: lt7170.h:59
#define LT7170_MFR_READ_ASEL
Definition: lt7170.h:143
int lt7170_send_byte(struct lt7170_dev *dev, uint8_t cmd)
Send a PMBus command to the device.
Definition: lt7170.c:469
#define LT7170_ZONE_ACTIVE
Definition: lt7170.h:64
int lt7170_iio_init(struct lt7170_iio_desc **, struct lt7170_iio_desc_init_param *)
Initializes the LT7170 IIO descriptor.
Definition: iio_lt7170.c:763
#define LT7170_MFR_TEMPERATURE_1_PEAK
Definition: lt7170.h:151
#define LT7170_VOUT_OV_FAULT_LIMIT
Definition: lt7170.h:87
#define LT7170_MFR_ID
Definition: lt7170.h:127
#define LT7170_TOFF_FALL
Definition: lt7170.h:108
Header file for the LT7170 IIO Driver.
@ LT7170_IIO_SYNC_ENABLE
Definition: iio_lt7170.c:57
lt7170_iio_chan_type
Definition: iio_lt7170.c:65
lt7170_limit_type
Definition: lt7170.h:248
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
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
uint32_t address
Definition: iio_types.h:113
#define LT7170_STATUS_BYTE
Definition: lt7170.h:111
@ LT7170_IIO_PULSE_ENABLE
Definition: iio_lt7170.c:56
#define LT7170_MFR_SERIAL
Definition: lt7170.h:128
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
#define LT7170_VOUT_MODE
Definition: lt7170.h:75
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
struct iio_attribute * attributes
Definition: iio_types.h:186
uint16_t num_ch
Definition: iio_types.h:252
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
#define LT7170_STATUS_CML
Definition: lt7170.h:117
#define LT7170_CAPABILITY
Definition: lt7170.h:71
@ IIO_TEMP
Definition: iio_types.h:69
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_iio_enable_type
Definition: iio_lt7170.c:54
#define LT7170_MFR_RETRY_DELAY
Definition: lt7170.h:148
#define LT7170_PAGE
Definition: lt7170.h:57
int lt7170_init(struct lt7170_dev **device, struct lt7170_init_param *init_param)
Initialize the device structure.
Definition: lt7170.c:304
@ LT7170_IIO_PWM_PHASE
Definition: iio_lt7170.c:62
struct lt7170_init_param * lt7170_init_param
Definition: iio_lt7170.h:58
#define LT7170_MFR_PWM_MODE
Definition: lt7170.h:144
#define LT7170_PWM_OP_MODE_BIT
Definition: lt7170.h:204
uint32_t no_os_get_unaligned_be32(uint8_t *buf)
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
#define LT7170_SYNC_CLK_OUTPUT_BIT
Definition: lt7170.h:206
int lt7170_set_channel_state(struct lt7170_dev *dev, bool state)
Set channel state using the RUN pin.
Definition: lt7170.c:954
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
#define LT7170_IOUT_OC_FAULT_RESPONSE
Definition: lt7170.h:93
#define LT7170_VOUT_MAX
Definition: lt7170.h:77
@ LT7170_IIO_OUTPUT_ENABLE
Definition: iio_lt7170.c:55
#define LT7170_STATUS_VOUT
Definition: lt7170.h:113
#define LT7170_VOUT_COMMAND
Definition: lt7170.h:76
int lt7170_iio_init(struct lt7170_iio_desc **iio_desc, struct lt7170_iio_desc_init_param *init_param)
Initializes the LT7170 IIO descriptor.
Definition: iio_lt7170.c:763
#define LT7170_STATUS_WORD
Definition: lt7170.h:112
#define LT7170_TON_MAX_FAULT_RESPONSE
Definition: lt7170.h:106
#define LT7170_MFR_CHAN_CONFIG
Definition: lt7170.h:140
#define LT7170_TON_DELAY
Definition: lt7170.h:103
@ LT7170_FREQUENCY
Definition: lt7170.h:239
#define LT7170_READ_TEMPERATURE_1
Definition: lt7170.h:123
#define LT7170_READ_VIN
Definition: lt7170.h:120
#define LT7170_MFR_SYNC_CONFIG
Definition: lt7170.h:165
#define LT7170_VOUT_UV_FAULT_LIMIT
Definition: lt7170.h:91
@ LT7170_IIO_VCC_CHAN
Definition: iio_lt7170.c:70
#define LT7170_MFR_SPECIAL_ID
Definition: lt7170.h:158
#define LT7170_QUERY
Definition: lt7170.h:72
#define LT7170_READ_IOUT
Definition: lt7170.h:122
#define LT7170_MFR_USER_DATA_00
Definition: lt7170.h:136
Header file of utility functions.
@ LT7170_IIO_IOUT_CHAN
Definition: iio_lt7170.c:68
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_RAIL_ADDRESS
Definition: lt7170.h:167
#define LT7170_MFR_CONFIG_ALL
Definition: lt7170.h:141
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_TON_MAX_FAULT_LIMIT
Definition: lt7170.h:105
#define LT7170_MFR_READ_EXTVCC
Definition: lt7170.h:138
#define LT7170_MFR_VIN_PEAK
Definition: lt7170.h:150