Go to the documentation of this file.
48 #define LTC4296_REG_GFLTEV 0x02
49 #define LTC4296_REG_GFLTMSK 0x03
50 #define LTC4296_REG_GCAP 0x06
51 #define LTC4296_REG_GIOST 0x07
52 #define LTC4296_REG_GCMD 0x08
53 #define LTC4296_REG_GCFG 0x09
54 #define LTC4296_REG_GADCCFG 0x0A
55 #define LTC4296_REG_GADCDAT 0x0B
56 #define LTC4296_REG_P0EV 0x10
57 #define LTC4296_REG_P0ST 0x12
58 #define LTC4296_REG_P0CFG0 0x13
59 #define LTC4296_REG_P0CFG1 0x14
60 #define LTC4296_REG_P0ADCCFG 0x15
61 #define LTC4296_REG_P0ADCDAT 0x16
62 #define LTC4296_REG_P0SELFTEST 0x17
63 #define LTC4296_REG_P1EV 0x20
64 #define LTC4296_REG_P1ST 0x22
65 #define LTC4296_REG_P1CFG0 0x23
66 #define LTC4296_REG_P1CFG1 0x24
67 #define LTC4296_REG_P1ADCCFG 0x25
68 #define LTC4296_REG_P1ADCDAT 0x26
69 #define LTC4296_REG_P1SELFTEST 0x27
70 #define LTC4296_REG_P2EV 0x30
71 #define LTC4296_REG_P2ST 0x32
72 #define LTC4296_REG_P2CFG0 0x33
73 #define LTC4296_REG_P2CFG1 0x34
74 #define LTC4296_REG_P2ADCCFG 0x35
75 #define LTC4296_REG_P2ADCDAT 0x36
76 #define LTC4296_REG_P2SELFTEST 0x37
77 #define LTC4296_REG_P3EV 0x40
78 #define LTC4296_REG_P3ST 0x42
79 #define LTC4296_REG_P3CFG0 0x43
80 #define LTC4296_REG_P3CFG1 0x44
81 #define LTC4296_REG_P3ADCCFG 0x45
82 #define LTC4296_REG_P3ADCDAT 0x46
83 #define LTC4296_REG_P3SELFTEST 0x47
84 #define LTC4296_REG_P4EV 0x50
85 #define LTC4296_REG_P4ST 0x52
86 #define LTC4296_REG_P4CFG0 0x53
87 #define LTC4296_REG_P4CFG1 0x54
88 #define LTC4296_REG_P4ADCCFG 0x55
89 #define LTC4296_REG_P4ADCDAT 0x56
90 #define LTC4296_REG_P4SELFTEST 0x57
93 #define LTC4296_UVLO_DIGITAL_MSK NO_OS_BIT(4)
94 #define LTC4296_COMMAND_FAULT_MSK NO_OS_BIT(3)
95 #define LTC4296_PEC_FAULT_MSK NO_OS_BIT(2)
96 #define LTC4296_MEMORY_FAULT_MSK NO_OS_BIT(1)
97 #define LTC4296_LOW_CKT_BRK_FAULT_MSK NO_OS_BIT(0)
100 #define LTC4296_SCCP_SUPPORT_MSK NO_OS_BIT(6)
101 #define LTC4296_WAKE_FWD_SUPPORT_MSK NO_OS_BIT(5)
102 #define LTC4296_NUMPORTS_MSK NO_OS_GENMASK(4, 0)
105 #define LTC4296_PG_OUT4_MSK NO_OS_BIT(8)
106 #define LTC4296_PG_OUT3_MSK NO_OS_BIT(7)
107 #define LTC4296_PG_OUT2_MSK NO_OS_BIT(6)
108 #define LTC4296_PG_OUT1_MSK NO_OS_BIT(5)
109 #define LTC4296_PG_OUT0_MSK NO_OS_BIT(4)
110 #define LTC4296_PAD_AUTO_MSK NO_OS_BIT(3)
111 #define LTC4296_PAD_WAKEUP_MSK NO_OS_BIT(2)
112 #define LTC4296_PAD_WAKEUP_DRIVE_MSK NO_OS_BIT(1)
115 #define LTC4296_SW_RESET_MSK NO_OS_GENMASK(15, 8)
116 #define LTC4296_WRITE_PROTECT_MSK NO_OS_GENMASK(7, 0)
119 #define LTC4296_MASK_LOWFAULT_MSK NO_OS_BIT(5)
120 #define LTC4296_TLIM_DISABLE_MSK NO_OS_BIT(4)
121 #define LTC4296_TLIM_TIMER_SLEEP_MSK NO_OS_GENMASK(3, 2)
122 #define LTC4296_REFRESH_MSK NO_OS_BIT(1)
123 #define LTC4296_SW_VIN_PGOOD_MSK NO_OS_BIT(0)
126 #define LTC4296_GADC_SAMPLE_MODE_MSK NO_OS_GENMASK(6, 5)
127 #define LTC4296_GADC_SEL_MSK NO_OS_GENMASK(4, 0)
130 #define LTC4296_GADC_MISSED_MSK NO_OS_BIT(13)
131 #define LTC4296_GADC_NEW_MSK NO_OS_BIT(12)
132 #define LTC4296_GADC_MSK NO_OS_GENMASK(11, 0)
135 #define LTC4296_VALID_SIGNATURE_MSK NO_OS_BIT(9)
136 #define LTC4296_INVALID_SIGNATURE_MSK NO_OS_BIT(8)
137 #define LTC4296_TOFF_TIMER_DONE_MSK NO_OS_BIT(7)
138 #define LTC4296_OVERLOAD_DETECTED_ISLEEP_MSK NO_OS_BIT(6)
139 #define LTC4296_OVERLOAD_DETECTED_IPOWERED_MSK NO_OS_BIT(5)
140 #define LTC4296_MFVS_TIMEOUT_MSK NO_OS_BIT(4)
141 #define LTC4296_TINRUSH_TIMER_DONE_MSK NO_OS_BIT(3)
142 #define LTC4296_PD_WAKEUP_MSK NO_OS_BIT(2)
143 #define LTC4296_LSNS_FORWARD_FAULT_MSK NO_OS_BIT(1)
144 #define LTC4296_LSNS_REVERSE_FAULT_MSK NO_OS_BIT(0)
147 #define LTC4296_DET_VHIGH_MSK NO_OS_BIT(13)
148 #define LTC4296_DET_VLOW_MSK NO_OS_BIT(12)
149 #define LTC4296_POWER_STABLE_HI_MSK NO_OS_BIT(11)
150 #define LTC4296_POWER_STABLE_LO_MSK NO_OS_BIT(10)
151 #define LTC4296_POWER_STABLE_MSK NO_OS_BIT(9)
152 #define LTC4296_OVERLOAD_HELD_MSK NO_OS_BIT(8)
153 #define LTC4296_PI_SLEEPING_MSK NO_OS_BIT(7)
154 #define LTC4296_PI_PREBIASED_MSK NO_OS_BIT(6)
155 #define LTC4296_PI_DETECTING_MSK NO_OS_BIT(5)
156 #define LTC4296_PI_POWERED_MSK NO_OS_BIT(4)
157 #define LTC4296_PI_DISCHARGE_EN_MSK NO_OS_BIT(3)
158 #define LTC4296_PSE_STATUS_MSK NO_OS_GENMASK(2, 0)
161 #define LTC4296_SW_INRUSH_MSK NO_OS_BIT(15)
162 #define LTC4296_END_CLASSIFICATION_MSK NO_OS_BIT(14)
163 #define LTC4296_SET_CLASSIFICATION_MODE_MSK NO_OS_BIT(13)
164 #define LTC4296_DISABLE_DETECTION_PULLUP_MSK NO_OS_BIT(12)
165 #define LTC4296_TDET_DISABLE_MSK NO_OS_BIT(11)
166 #define LTC4296_FOLDBACK_DISABLE_MSK NO_OS_BIT(10)
167 #define LTC4296_SOFT_START_DISABLE_MSK NO_OS_BIT(9)
168 #define LTC4296_TOFF_TIMER_DISABLE_MSK NO_OS_BIT(8)
169 #define LTC4296_TMFVDO_TIMER_DISABLE_MSK NO_OS_BIT(7)
170 #define LTC4296_SW_PSE_READY_MSK NO_OS_BIT(6)
171 #define LTC4296_SW_POWER_AVAILABLE_MSK NO_OS_BIT(5)
172 #define LTC4296_UPSTREAM_WAKEUP_DISABLE_MSK NO_OS_BIT(4)
173 #define LTC4296_DOWNSTREAM_WAKEUP_DISABLE_MSK NO_OS_BIT(3)
174 #define LTC4296_SW_PSE_WAKEUP_MSK NO_OS_BIT(2)
175 #define LTC4296_HW_EN_MASK_MSK NO_OS_BIT(1)
176 #define LTC4296_SW_EN_MSK NO_OS_BIT(0)
179 #define LTC4296_PREBIAS_OVERRIDE_GOOD_MSK NO_OS_BIT(8)
180 #define LTC4296_TLIM_TIMER_TOP_MSK NO_OS_GENMASK(7, 6)
181 #define LTC4296_TOD_TRESTART_TIMER_MSK NO_OS_GENMASK(5, 4)
182 #define LTC4296_TINRUSH_TIMER_MSK NO_OS_GENMASK(3, 2)
183 #define LTC4296_SIG_OVERRIDE_BAD_MSK NO_OS_BIT(1)
184 #define LTC4296_SIG_OVERRIDE_GOOD_MSK NO_OS_BIT(0)
187 #define LTC4296_MFVS_THRESHOLD_MSK NO_OS_GENMASK(7, 0)
190 #define LTC4296_MISSED_MSK NO_OS_BIT(13)
191 #define LTC4296_NEW_MSK NO_OS_BIT(12)
192 #define LTC4296_SOURCE_CURRENT_MSK NO_OS_GENMASK(11, 0)
195 #define LTC4296_SPI_READ 0x01
196 #define LTC4296_SPI_WRITE 0x00
198 #define LTC4296_RESET_CODE 0x73
199 #define LTC4296_UNLOCK_KEY 0x05
200 #define LTC4296_LOCK_KEY 0xA0
202 #define LTC4296_ADC_OFFSET 2049
204 #define LTC4296_VGAIN 35230 / 1000
205 #define LTC4296_IGAIN 1 / 10
207 #define LTC4296_VMAX 1
208 #define LTC4296_VMIN 0
210 #define LTC4296_MAX_PORTS 5
212 #define RTESTLOAD 200
397 uint16_t *port_events);
405 uint16_t *port_status);
int ltc4296_remove(struct ltc4296_dev *dev)
Free allocated resources.
Definition: ltc4296.c:1080
#define LTC4296_OVERLOAD_DETECTED_IPOWERED_MSK
Definition: ltc4296.h:139
ltc4296_port
Device Port Numbers.
Definition: ltc4296.h:243
@ LTC_PSE_STATUS_SEARCHING
Definition: ltc4296.h:267
int ltc4296_print_port_events(enum ltc4296_port port_no, uint16_t port_events)
Print port events.
Definition: ltc4296.c:877
void no_os_put_unaligned_be16(uint16_t val, uint8_t *buf)
@ LTC_UNLOCKED
Definition: ltc4296.h:236
#define LTC4296_POWER_STABLE_MSK
Definition: ltc4296.h:151
#define LTC4296_REG_GFLTEV
Definition: ltc4296.h:48
#define LTC4296_REG_GCMD
Definition: ltc4296.h:52
struct no_os_spi_init_param * spi_init
Definition: ltc4296.h:229
@ LTC_PSE_STATUS_UNKNOWN
Definition: ltc4296.h:271
int ltc4296_clear_ckt_breaker(struct ltc4296_dev *dev)
Clear circuit break faults.
Definition: ltc4296.c:227
int ltc4296_disable_gadc(struct ltc4296_dev *dev)
Disable the global ADC.
Definition: ltc4296.c:406
@ ADI_LTC_SCCP_PD_PRESENT
Definition: ltc4296.h:328
@ PRODUCTION_POWER_TEST
Definition: ltc4296.h:288
char * ltc4296_class_str[12][25]
Definition: ltc4296.c:71
#define LTC4296_REG_GADCDAT
Definition: ltc4296.h:55
#define LTC4296_MEMORY_FAULT_MSK
Definition: ltc4296.h:96
#define LTC4296_RESET_CODE
Definition: ltc4296.h:198
int ltc4296_force_port_pwr(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Force port to power mode.
Definition: ltc4296.c:785
int ltc4296_is_port_disabled(struct ltc4296_dev *dev, enum ltc4296_port port_no, enum ltc4296_port_status *port_chk)
Check if port is enabled/disabled.
Definition: ltc4296.c:497
int ltc4296_reg_read(struct ltc4296_dev *dev, uint8_t reg, uint16_t *data)
Register Read.
Definition: ltc4296.c:122
int32_t no_os_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: no_os_spi.c:159
#define LTC4296_SW_RESET_MSK
Definition: ltc4296.h:115
@ PRODUCTION_DATA_TEST
Definition: ltc4296.h:291
@ ADI_LTC_SCCP_PD_CRC_FAILED
Definition: ltc4296.h:334
Header file of SPI Interface.
int ltc4296_read_port_events(struct ltc4296_dev *dev, enum ltc4296_port port_no, uint16_t *port_events)
Read Port Events.
Definition: ltc4296.c:429
int ltc4296_get_port_addr(enum ltc4296_port port_no, enum ltc4296_port_reg_offset_e port_offset, uint8_t *port_addr)
Get port address.
Definition: ltc4296.c:194
int ltc4296_chk_port_events(struct ltc4296_dev *dev, enum ltc4296_port ltc4296_port)
ltc4296_state
Device State.
Definition: ltc4296.h:235
int ltc4296_is_locked(struct ltc4296_dev *dev, enum ltc4296_state *state)
Check device state.
Definition: ltc4296.c:282
#define LTC4296_MFVS_TIMEOUT_MSK
Definition: ltc4296.h:140
@ LTC_PSE_STATUS_DISABLED
Definition: ltc4296.h:264
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
int ltc4296_read_port_status(struct ltc4296_dev *dev, enum ltc4296_port port_no, uint16_t *port_status)
Read Port Status.
Definition: ltc4296.c:474
@ ADI_LTC_SCCP_PD_LINE_NOT_HIGH
Definition: ltc4296.h:332
int ltc4296_is_vin_valid(struct ltc4296_dev *dev, int port_vin_mv, enum ltc4296_board_class ltcboard_class, bool *vin_valid)
Check if input voltage is valid.
Definition: ltc4296.c:360
int ltc4296_clear_ckt_breaker(struct ltc4296_dev *dev)
Clear circuit break faults.
Definition: ltc4296.c:227
int ltc4296_disable_gadc(struct ltc4296_dev *dev)
Disable the global ADC.
Definition: ltc4296.c:406
Header file of Delay functions.
struct no_os_spi_desc * spi_desc
Definition: ltc4296.h:222
int ltc4296_set_port_mfvs(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Set port to maintain full voltage signature.
Definition: ltc4296.c:732
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
@ RESERVED
Definition: ltc4296.h:292
int ltc4296_clear_global_faults(struct ltc4296_dev *dev)
Clear global faults.
Definition: ltc4296.c:211
@ ADI_LTC_SUCCESS
Definition: ltc4296.h:322
int ltc4296_is_port_pwr_stable(struct ltc4296_dev *dev, enum ltc4296_port port_no, bool *pwr_status)
Check if port has stable power.
Definition: ltc4296.c:587
enum no_os_spi_mode mode
Definition: no_os_spi.h:148
@ APL_CLASS3
Definition: ltc4296.h:287
int ltc4296_set_gadc_vout(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Configure Global ADC to read output voltage.
Definition: ltc4296.c:833
int ltc4296_reset(struct ltc4296_dev *dev)
Software reset.
Definition: ltc4296.c:169
Definition: ad9361_util.h:69
int ltc4296_chk_global_events(struct ltc4296_dev *dev)
Check global events.
Definition: ltc4296.c:922
@ LTC_PORT_ADCDAT
Definition: ltc4296.h:314
int ltc4296_unlock(struct ltc4296_dev *dev)
Device unlock.
Definition: ltc4296.c:267
int ltc4296_port_disable(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Check if port is disabled.
Definition: ltc4296.c:530
@ ADI_LTC_TEST_FAILED
Definition: ltc4296.h:341
int ltc4296_print_global_faults(uint16_t g_events)
Print global faults.
Definition: ltc4296.c:855
@ LTC_CFG_RESET
Definition: ltc4296.h:302
ltc4296_config
Device Configuration Modes.
Definition: ltc4296.h:299
@ LTC_PORT_ENABLED
Definition: ltc4296.h:257
@ APL_CLASSC
Definition: ltc4296.h:286
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
@ ADI_LTC_INVALID_ADC_PORT_CURRENT
Definition: ltc4296.h:338
@ ADI_LTC_SCCP_COMPLETE
Definition: ltc4296.h:324
Initialization Structure.
Definition: ltc4296.h:228
#define LTC4296_OVERLOAD_DETECTED_ISLEEP_MSK
Definition: ltc4296.h:138
@ SPOE_CLASS10
Definition: ltc4296.h:278
#define LTC4296_VGAIN
Definition: ltc4296.h:204
@ LTC_PORT0
Definition: ltc4296.h:244
@ LTC_PORT_DISABLED
Definition: ltc4296.h:256
int ltc4296_port_en(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Enable specific port.
Definition: ltc4296.c:684
int ltc4296_port_pwr_available(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Set port is able to source power.
Definition: ltc4296.c:808
int ltc4296_is_vin_valid(struct ltc4296_dev *dev, int port_vin_mv, enum ltc4296_board_class ltcboard_class, bool *vin_valid)
Check if input voltage is valid.
Definition: ltc4296.c:360
int ltc4296_read_port_status(struct ltc4296_dev *dev, enum ltc4296_port port_no, uint16_t *port_status)
Read Port Status.
Definition: ltc4296.c:474
#define LTC4296_UVLO_DIGITAL_MSK
Definition: ltc4296.h:93
int ltc4296_is_port_deliver_pwr(struct ltc4296_dev *dev, enum ltc4296_port port_no, enum ltc4296_pse_status *pwr_status)
Check if port delivers power.
Definition: ltc4296.c:552
int ltc4296_port_en(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Enable specific port.
Definition: ltc4296.c:684
int ltc4296_read_port_adc(struct ltc4296_dev *dev, enum ltc4296_port port_no, int *port_i_out_ma)
Read port ADC.
Definition: ltc4296.c:621
@ LTC_PORT_ADCCFG
Definition: ltc4296.h:313
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
@ LTC_PSE_STATUS_DELIVERING
Definition: ltc4296.h:266
#define LTC4296_LOW_CKT_BRK_FAULT_MSK
Definition: ltc4296.h:97
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
int ltc4296_chk_port_events(struct ltc4296_dev *dev, enum ltc4296_port ltc4296_port)
Check port events.
Definition: ltc4296.c:999
int ltc4296_spoe_vol_range_mv[12][2]
Definition: ltc4296.c:56
@ LTC_PORT_SELFTEST
Definition: ltc4296.h:315
@ ADI_LTC_DISCONTINUE_TEST
Definition: ltc4296.h:340
#define LTC4296_END_CLASSIFICATION_MSK
Definition: ltc4296.h:162
int ltc4296_port_prebias(struct ltc4296_dev *dev, enum ltc4296_port port_no, enum ltc4296_config mode)
Stimulate valid wake-up signature for a port.
Definition: ltc4296.c:657
#define LTC4296_VMAX
Definition: ltc4296.h:207
int ltc4296_unlock(struct ltc4296_dev *dev)
Device unlock.
Definition: ltc4296.c:267
int ltc4296_remove(struct ltc4296_dev *dev)
Free allocated resources.
Definition: ltc4296.c:1080
#define LTC4296_SW_PSE_READY_MSK
Definition: ltc4296.h:170
@ LTC_PORT1
Definition: ltc4296.h:245
@ LTC_PORT_STATUS
Definition: ltc4296.h:310
#define LTC4296_PD_WAKEUP_MSK
Definition: ltc4296.h:142
int ltc4296_reg_read(struct ltc4296_dev *dev, uint8_t reg, uint16_t *data)
Register Read.
Definition: ltc4296.c:122
int ltc4296_is_port_pwr_stable(struct ltc4296_dev *dev, enum ltc4296_port port_no, bool *pwr_status)
Check if port has stable power.
Definition: ltc4296.c:587
#define LTC4296_PEC_FAULT_MSK
Definition: ltc4296.h:95
#define LTC4296_TOFF_TIMER_DONE_MSK
Definition: ltc4296.h:137
int ltc4296_set_port_pwr(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Set port to power mode.
Definition: ltc4296.c:761
#define LTC4296_TMFVDO_TIMER_DISABLE_MSK
Definition: ltc4296.h:169
@ APL_CLASSA_NOAUTONEG
Definition: ltc4296.h:285
@ DEBUGMODE
Definition: ltc4296.h:293
int ltc4296_is_vout_valid(struct ltc4296_dev *dev, int port_vout_mv, enum ltc4296_board_class ltcboard_class, bool *vout_valid)
Check if output voltage is valid.
Definition: ltc4296.c:384
int ltc4296_reset(struct ltc4296_dev *dev)
Software reset.
Definition: ltc4296.c:169
int ltc4296_read_global_faults(struct ltc4296_dev *dev, uint16_t *g_events)
Read global faults.
Definition: ltc4296.c:251
@ ADI_LTC_APL_COMPLETE
Definition: ltc4296.h:335
int ltc4296_force_port_pwr(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Force port to power mode.
Definition: ltc4296.c:785
@ SPOE_CLASS13
Definition: ltc4296.h:281
#define LTC4296_SPI_READ
Definition: ltc4296.h:195
@ LTC_PORT4
Definition: ltc4296.h:248
int ltc4296_init(struct ltc4296_dev **device, struct ltc4296_init_param *init_param)
Device initialization.
Definition: ltc4296.c:1027
ltc4296_port_reg_offset_e
Device Port Register offsets.
Definition: ltc4296.h:308
@ ADI_LTC_SCCP_PD_CLASS_NOT_SUPPORTED
Definition: ltc4296.h:330
int ltc4296_read_global_faults(struct ltc4296_dev *dev, uint16_t *g_events)
Read global faults.
Definition: ltc4296.c:251
@ ADI_LTC_INVALID_ADC_VOLTAGE
Definition: ltc4296.h:337
#define LTC4296_SW_EN_MSK
Definition: ltc4296.h:176
#define LTC4296_REG_GADCCFG
Definition: ltc4296.h:54
#define LTC4296_TINRUSH_TIMER_DONE_MSK
Definition: ltc4296.h:141
@ ADI_LTC_DISCONTINUE_APL
Definition: ltc4296.h:336
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
int ltc4296_is_locked(struct ltc4296_dev *dev, enum ltc4296_state *state)
Check device state.
Definition: ltc4296.c:282
adi_ltc_result
Device Result Codes.
Definition: ltc4296.h:321
int ltc4296_is_port_disabled(struct ltc4296_dev *dev, enum ltc4296_port port_no, enum ltc4296_port_status *port_chk)
Check if port is enabled/disabled.
Definition: ltc4296.c:497
int ltc4296_clear_port_events(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Clear Port Events.
Definition: ltc4296.c:451
int ltc4296_print_global_faults(uint16_t g_events)
Print global faults.
Definition: ltc4296.c:855
@ SPOE_CLASS12
Definition: ltc4296.h:280
int ltc4296_port_prebias(struct ltc4296_dev *dev, enum ltc4296_port port_no, enum ltc4296_config mode)
Stimulate valid wake-up signature for a port.
Definition: ltc4296.c:657
int ltc4296_is_vout_valid(struct ltc4296_dev *dev, int port_vout_mv, enum ltc4296_board_class ltcboard_class, bool *vout_valid)
Check if output voltage is valid.
Definition: ltc4296.c:384
int ltc4296_read_port_events(struct ltc4296_dev *dev, enum ltc4296_port port_no, uint16_t *port_events)
Read Port Events.
Definition: ltc4296.c:429
int ltc4296_clear_global_faults(struct ltc4296_dev *dev)
Clear global faults.
Definition: ltc4296.c:211
@ ADI_LTC_SCCP_PD_DETECTION_FAILED
Definition: ltc4296.h:325
int ltc4296_clear_port_events(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Clear Port Events.
Definition: ltc4296.c:451
#define LTC4296_COMMAND_FAULT_MSK
Definition: ltc4296.h:94
#define LTC4296_ADC_OFFSET
Definition: ltc4296.h:202
#define LTC4296_GADC_MSK
Definition: ltc4296.h:132
@ ADI_LTC_DISCONTINUE_SCCP
Definition: ltc4296.h:323
int ltc4296_read_gadc(struct ltc4296_dev *dev, int *port_voltage_mv)
Read global ADC.
Definition: ltc4296.c:308
Device Structure.
Definition: ltc4296.h:221
@ SPOE_CLASS14
Definition: ltc4296.h:282
@ ADI_LTC_INVALID_VIN
Definition: ltc4296.h:342
#define LTC4296_UNLOCK_KEY
Definition: ltc4296.h:199
@ ADI_LTC_SCCP_PD_NOT_PRESENT
Definition: ltc4296.h:326
@ SPOE_CLASS11
Definition: ltc4296.h:279
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
@ SPOE_OFF
Definition: ltc4296.h:290
#define LTC4296_PSE_STATUS_MSK
Definition: ltc4296.h:158
#define LTC4296_LSNS_FORWARD_FAULT_MSK
Definition: ltc4296.h:143
#define LTC4296_SW_POWER_AVAILABLE_MSK
Definition: ltc4296.h:171
#define LTC4296_VMIN
Definition: ltc4296.h:208
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
@ ADI_LTC_SCCP_PD_CLASS_NOT_COMPATIBLE
Definition: ltc4296.h:331
#define LTC4296_NEW_MSK
Definition: ltc4296.h:191
@ LTC_PORT_CFG0
Definition: ltc4296.h:311
@ APL_CLASSA_OLD_DEMO
Definition: ltc4296.h:289
@ LTC_CFG_SCCP_MODE
Definition: ltc4296.h:300
ltc4296_board_class
Board Classes.
Definition: ltc4296.h:277
@ ADI_LTC_TEST_COMPLETE
Definition: ltc4296.h:339
ltc4296_port_status
Device Port Status.
Definition: ltc4296.h:255
int ltc4296_read_gadc(struct ltc4296_dev *dev, int *port_voltage_mv)
Read global ADC.
Definition: ltc4296.c:308
int32_t no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
#define LTC4296_SET_CLASSIFICATION_MODE_MSK
Definition: ltc4296.h:163
@ LTC_CFG_APL_MODE
Definition: ltc4296.h:301
int ltc4296_is_port_deliver_pwr(struct ltc4296_dev *dev, enum ltc4296_port port_no, enum ltc4296_pse_status *pwr_status)
Check if port delivers power.
Definition: ltc4296.c:552
int ltc4296_set_gadc_vout(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Configure Global ADC to read output voltage.
Definition: ltc4296.c:833
Header file of GPIO Interface.
@ LTC_PORT2
Definition: ltc4296.h:246
@ LTC_PSE_STATUS_IDLE
Definition: ltc4296.h:269
int ltc4296_reg_write(struct ltc4296_dev *dev, uint8_t reg, uint16_t data)
Register Write.
Definition: ltc4296.c:149
@ LTC_LOCKED
Definition: ltc4296.h:237
@ ADI_LTC_SCCP_PD_LINE_NOT_LOW
Definition: ltc4296.h:333
int ltc4296_port_disable(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Check if port is disabled.
Definition: ltc4296.c:530
#define LTC4296_SPI_WRITE
Definition: ltc4296.h:196
int ltc4296_port_en_and_classification(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Enable specific port and classify.
Definition: ltc4296.c:708
#define LTC4296_MAX_PORTS
Definition: ltc4296.h:210
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
int ltc4296_print_port_events(enum ltc4296_port port_no, uint16_t port_events)
Print port events.
Definition: ltc4296.c:877
uint16_t no_os_get_unaligned_be16(uint8_t *buf)
@ LTC_PSE_STATUS_SLEEPING
Definition: ltc4296.h:265
@ ADI_LTC_SCCP_PD_CLASS_COMPATIBLE
Definition: ltc4296.h:329
ltc4296_pse_status
Device PSE Status.
Definition: ltc4296.h:263
int ltc4296_set_port_mfvs(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Set port to maintain full voltage signature.
Definition: ltc4296.c:732
@ LTC_PSE_STATUS_PREPDET
Definition: ltc4296.h:270
Header file of utility functions.
int ltc4296_reg_write(struct ltc4296_dev *dev, uint8_t reg, uint16_t data)
Register Write.
Definition: ltc4296.c:149
int ltc4296_get_port_addr(enum ltc4296_port port_no, enum ltc4296_port_reg_offset_e port_offset, uint8_t *port_addr)
Get port address.
Definition: ltc4296.c:194
int ltc4296_port_pwr_available(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Set port is able to source power.
Definition: ltc4296.c:808
int ltc4296_chk_global_events(struct ltc4296_dev *dev)
Check global events.
Definition: ltc4296.c:922
@ LTC_PORT3
Definition: ltc4296.h:247
@ SPOE_CLASS15
Definition: ltc4296.h:283
int ltc4296_port_en_and_classification(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Enable specific port and classify.
Definition: ltc4296.c:708
int ltc4296_set_gadc_vin(struct ltc4296_dev *dev)
Set the global ADC to measure voltage.
Definition: ltc4296.c:334
Header file for the LTC4296 Driver.
int ltc4296_init(struct ltc4296_dev **device, struct ltc4296_init_param *init_param)
Device initialization.
Definition: ltc4296.c:1027
@ LTC_PSE_STATUS_ERROR
Definition: ltc4296.h:268
int ltc4296_read_port_adc(struct ltc4296_dev *dev, enum ltc4296_port port_no, int *port_i_out_ma)
Read port ADC.
Definition: ltc4296.c:621
int ltc4296_set_port_pwr(struct ltc4296_dev *dev, enum ltc4296_port port_no)
Set port to power mode.
Definition: ltc4296.c:761
#define LTC4296_LSNS_REVERSE_FAULT_MSK
Definition: ltc4296.h:144
@ LTC_PORT_EVENTS
Definition: ltc4296.h:309
#define LTC4296_GADC_NEW_MSK
Definition: ltc4296.h:131
@ ADI_LTC_SCCP_PD_RES_INVALID
Definition: ltc4296.h:327
int ltc4296_set_gadc_vin(struct ltc4296_dev *dev)
Set the global ADC to measure voltage.
Definition: ltc4296.c:334
@ LTC_NO_PORT
Definition: ltc4296.h:249
Error macro definition for ARM Compiler.
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
@ LTC_PORT_CFG1
Definition: ltc4296.h:312
@ APL_CLASSA
Definition: ltc4296.h:284
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140