#define MILLI
Definition: no_os_units.h:48
#define END_ATTRIBUTES_ARRAY
Definition: iio_types.h:116
int ltp8800_read_byte(struct ltp8800_dev *dev, uint16_t cmd, uint8_t *data)
Perform a raw PMBus read byte operation.
Definition: ltp8800.c:466
int ltp8800_iio_init(struct ltp8800_iio_desc **, struct ltp8800_iio_desc_init_param *)
Initializes the LTP8800 IIO descriptor.
Definition: iio_ltp8800.c:765
#define LTP8800_VOUT_COMMAND
Definition: ltp8800.h:57
#define LTP8800_NM_DIGFILT_LF_GAIN
Definition: ltp8800.h:102
@ 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
@ LTP8800_IIO_VOUT_CHAN
Definition: iio_ltp8800.c:53
struct iio_device * iio_dev
Definition: iio_ltp8800.h:45
#define LTP8800_STATUS_MFR_SPECIFIC
Definition: ltp8800.h:79
int ltp8800_write_byte(struct ltp8800_dev *dev, uint16_t cmd, uint8_t value)
Perform a raw PMBus write byte operation.
Definition: ltp8800.c:507
Definition: ltp8800.h:197
#define LTP8800_IIN_OC_FAULT_LIMIT
Definition: ltp8800.h:68
#define LTP8800_STORE_USER_ALL
Definition: ltp8800.h:53
#define LTP8800_STATUS_VOUT
Definition: ltp8800.h:73
#define LTP8800_NM_DIGFILT_POLE
Definition: ltp8800.h:104
#define LTP8800_MFR_REVISION
Definition: ltp8800.h:94
@ LTP8800_IIO_IOUT_CHAN
Definition: iio_ltp8800.c:55
ltp8800_limit_type
Definition: ltp8800.h:173
Structure holding channel attributess.
Definition: iio_types.h:103
int ltp8800_sync_config(struct ltp8800_dev *dev, bool enable)
Enable or disable sync pin.
Definition: ltp8800.c:887
@ IIO_VAL_INT_PLUS_MICRO
Definition: iio_types.h:51
Structure holding the LTP8800 IIO initialization parameter.
Definition: iio_ltp8800.h:51
@ IIO_VAL_FRACTIONAL
Definition: iio_types.h:55
@ LTP8800_IIO_RESTORE_USER_ALL
Definition: iio_ltp8800.c:62
int ltp8800_store_user_settings(struct ltp8800_dev *dev)
Store user settings to EEPROM.
Definition: ltp8800.c:989
#define LTP8800_READ_VOUT
Definition: ltp8800.h:83
#define LTP8800_STATUS_OTHER
Definition: ltp8800.h:78
#define LTP8800_VIN_UV_FAULT_LIMIT
Definition: ltp8800.h:67
#define LTP8800_STATUS_WORD
Definition: ltp8800.h:72
int ltp8800_iio_init(struct ltp8800_iio_desc **iio_desc, struct ltp8800_iio_desc_init_param *init_param)
Initializes the LTP8800 IIO descriptor.
Definition: iio_ltp8800.c:765
#define LTP8800_VOUT_SCALE_MONITOR
Definition: ltp8800.h:59
#define LTP8800_READ_TEMPERATURE_2
Definition: ltp8800.h:85
int ltp8800_init(struct ltp8800_dev **device, struct ltp8800_init_param *init_param)
Initialize the device structure.
Definition: ltp8800.c:289
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
int ltp8800_iio_remove(struct ltp8800_iio_desc *iio_desc)
Free resources allocated by the init function.
Definition: iio_ltp8800.c:800
#define LTP8800_OPERATION
Definition: ltp8800.h:51
#define LTP8800_STATUS_CML
Definition: ltp8800.h:77
@ LTP8800_IIO_TEMP_CHAN
Definition: iio_ltp8800.c:57
#define MICRO
Definition: no_os_units.h:49
#define LTP8800_NM_DIGFILT_ZERO
Definition: ltp8800.h:103
@ IIO_SHARED_BY_ALL
Definition: iio_types.h:122
#define LTP8800_STATUS_INPUT
Definition: ltp8800.h:75
#define LTP8800_NM_DIGFILT_HF_GAIN
Definition: ltp8800.h:105
#define LTP8800_INTERLEAVE_ORDER_MSK
Definition: ltp8800.h:146
@ LTP8800_IIO_STORE_USER_ALL
Definition: iio_ltp8800.c:61
#define LTP8800_RESTORE_USER_ALL
Definition: ltp8800.h:54
int ltp8800_write_word_data(struct ltp8800_dev *dev, uint16_t cmd, int data)
Converts value to register data and do PMBus write word operation.
Definition: ltp8800.c:630
#define LTP8800_MFR_ID
Definition: ltp8800.h:92
#define LTP8800_IC_DEVICE_REV
Definition: ltp8800.h:97
@ LTP8800_IIO_IIN_CHAN
Definition: iio_ltp8800.c:56
const char * name
Definition: iio_types.h:131
#define LTP8800_INTERLEAVE
Definition: ltp8800.h:64
ltp8800_iio_chan_type
Definition: iio_ltp8800.c:52
#define LTP8800_STATUS_TEMPERATURE
Definition: ltp8800.h:76
int ltp8800_iio_remove(struct ltp8800_iio_desc *)
Free resources allocated by the init function.
Definition: iio_ltp8800.c:800
const char * name
Definition: iio_types.h:170
@ LTP8800_IOUT
Definition: ltp8800.h:165
#define LTP8800_REVISION
Definition: ltp8800.h:91
Structure holding pointers to show and store functions.
Definition: iio_types.h:129
int ltp8800_set_fault_limit(struct ltp8800_dev *dev, enum ltp8800_limit_type limit, int limit_val)
Set overvalue and undervalue limits.
Definition: ltp8800.c:873
int ltp8800_write_word(struct ltp8800_dev *dev, uint16_t cmd, uint16_t word)
Perform a raw PMBus write word operation.
Definition: ltp8800.c:580
#define LTP8800_READ_POUT
Definition: ltp8800.h:89
#define LTP8800_READ_IIN
Definition: ltp8800.h:82
#define LTP8800_READ_FREQUENCY
Definition: ltp8800.h:88
#define LTP8800_FREQUENCY_SWITCH
Definition: ltp8800.h:61
@ IIO_CURRENT
Definition: iio_types.h:66
int32_t iio_parse_value(char *buf, enum iio_val fmt, int32_t *val, int32_t *val2)
Definition: iio.c:630
#define LTP8800_EEPROM_PASSWORD
Definition: ltp8800.h:99
@ LTP8800_FORWARD_DIODE_TEMP
Definition: ltp8800.h:166
@ IIO_VOLTAGE
Definition: iio_types.h:65
#define LTP8800_IC_DEVICE_ID
Definition: ltp8800.h:96
ltp8800_iio_user_settings
Definition: iio_ltp8800.c:60
int ltp8800_send_byte(struct ltp8800_dev *dev, uint16_t cmd)
Send a PMBus command to the device.
Definition: ltp8800.c:439
#define LTP8800_VOUT_MODE
Definition: ltp8800.h:55
@ LTP8800_IIO_VIN_CHAN
Definition: iio_ltp8800.c:54
@ LTP8800_VIN
Definition: ltp8800.h:162
int iio_format_value(char *buf, uint32_t len, enum iio_val fmt, int32_t size, int32_t *vals)
Definition: iio.c:686
#define LTP8800_VIN_ON
Definition: ltp8800.h:62
#define LTP8800_STATUS_IOUT
Definition: ltp8800.h:74
uint32_t address
Definition: iio_types.h:113
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
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 LTP8800_READ_IOUT
Definition: ltp8800.h:84
@ IIO_TEMP
Definition: iio_types.h:69
#define LTP8800_MFR_MODEL
Definition: ltp8800.h:93
#define LTP8800_SYNC_ENABLE_BIT
Definition: ltp8800.h:141
#define LTP8800_READ_TEMPERATURE_3
Definition: ltp8800.h:86
Definition: ltp8800.h:209
#define NULL
Definition: wrapper.h:64
Header file for the LTP8800 IIO Driver.
#define LTP8800_READ_VIN
Definition: ltp8800.h:81
uint32_t no_os_get_unaligned_be32(uint8_t *buf)
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Structure holding the LTP8800 IIO device descriptor.
Definition: iio_ltp8800.h:43
Structure holding channels and attributes of a device.
Definition: iio_types.h:247
int ltp8800_read_word(struct ltp8800_dev *dev, uint16_t cmd, uint16_t *word)
Perform a raw PMBus read word operation.
Definition: ltp8800.c:536
struct ltp8800_dev * ltp8800_dev
Definition: iio_ltp8800.h:44
int ltp8800_remove(struct ltp8800_dev *dev)
Free or remove device instance.
Definition: ltp8800.c:404
#define LTP8800_VIN_OV_FAULT_LIMIT
Definition: ltp8800.h:66
#define LTP8800_STATUS_BYTE
Definition: ltp8800.h:71
#define LTP8800_GO_CMD
Definition: ltp8800.h:101
@ LTP8800_VOUT
Definition: ltp8800.h:164
#define LTP8800_VOUT_SCALE_LOOP
Definition: ltp8800.h:58
#define LTP8800_SYNC
Definition: ltp8800.h:106
#define LTP8800_POUT_OP_FAULT_LIMIT
Definition: ltp8800.h:69
#define LTP8800_VIN_OFF
Definition: ltp8800.h:63
Header file of utility functions.
#define LTP8800_PAGE
Definition: ltp8800.h:50
#define LTP8800_WRITE_PROTECT
Definition: ltp8800.h:52
int ltp8800_read_block_data(struct ltp8800_dev *dev, uint16_t cmd, uint8_t *data, size_t nbytes)
Perform a PMBus read block operation.
Definition: ltp8800.c:651
int ltp8800_interleave_order(struct ltp8800_dev *dev, uint8_t order)
Set phase order for polyphase application.
Definition: ltp8800.c:914
@ LTP8800_IIN
Definition: ltp8800.h:163
#define LTP8800_READ_DUTY_CYCLE
Definition: ltp8800.h:87
int ltp8800_read_word_data(struct ltp8800_dev *dev, uint16_t cmd, int *data)
Perform a PMBus read word operation and converts to actual value.
Definition: ltp8800.c:610
struct ltp8800_init_param * ltp8800_init_param
Definition: iio_ltp8800.h:52
#define LTP8800_MFR_SERIAL
Definition: ltp8800.h:95
int ltp8800_read_value(struct ltp8800_dev *dev, enum ltp8800_value_type value_type, int *value)
Read a value.
Definition: ltp8800.c:710
int ltp8800_restore_user_settings(struct ltp8800_dev *dev)
Restore user settings.
Definition: ltp8800.c:1015