45 #define TPS_SUCCESSFUL 0x00
46 #define TPS_ERR_PORT_IN_USE 0x80
47 #define TPS_ERR_PORT_NOT_IN_USE 0x81
48 #define TPS_ERR_NO_PORT_AVAILABLE 0x82
49 #define TPS_ERR_I2C_ERROR 0x83
50 #define TPS_ERR_I2C_ADDRESS_MISMATCH 0x40
52 #define TPS_GIVE_ME_NEXT_PORT_AVAILABLE 0xff
53 #define TPS_PORT_NOT_REGISTERED_VALUE 0xff
55 #define SWIZZLE_BYTES(x) {unsigned short y; y = x; x = (((y & 0xff) << 8) | (y >> 8)); }
57 #define TPS_MAX_SYSTEM_PORTS 32
74 #define PORT_1_VALUE 0x1
75 #define PORT_2_VALUE 0x2
76 #define PORT_3_VALUE 0x4
77 #define PORT_4_VALUE 0x8
81 #define TPS238X_ALL_PORTS ((TPS238x_Ports_t)0xf)
95 unsigned char PEC_Power_Enable_Change : 1;
96 unsigned char PGC_Power_Good_Change : 1;
97 unsigned char DISF_Disconnect_Event : 1;
98 unsigned char DETC_Detection_Cycle : 1;
99 unsigned char CLASC_Classification_Cycle : 1;
100 unsigned char IFAULT_ICUT_ILIM_Fault : 1;
101 unsigned char INRF_Inrush_Fault : 1;
102 unsigned char SUPF_Supply_Event_Fault : 1;
119 unsigned char PEMSK_Power_Enable_Unmask : 1;
120 unsigned char PGMSK_Power_Good_Unmask : 1;
121 unsigned char DIMSK_Disconnect_Unmask : 1;
122 unsigned char DEMSK_Detection_Cycle_Unmask : 1;
123 unsigned char CLMSK_Classificiation_Cycle_Unmask : 1;
124 unsigned char IFMSK_IFAULT_Unmask : 1;
125 unsigned char INMSK_Inrush_Fault_Unmask : 1;
126 unsigned char SUMSK_Supply_Event_Fault_Unmask : 1;
143 unsigned char PEC1_Power_Enable_Port_1_Event : 1;
144 unsigned char PEC2_Power_Enable_Port_2_Event : 1;
145 unsigned char PEC3_Power_Enable_Port_3_Event : 1;
146 unsigned char PEC4_Power_Enable_Port_4_Event : 1;
147 unsigned char PGC1_Power_Good_Port_1_Event : 1;
148 unsigned char PGC2_Power_Good_Port_2_Event : 1;
149 unsigned char PGC3_Power_Good_Port_3_Event : 1;
150 unsigned char PGC4_Power_Good_Port_4_Event : 1;
162 #define POWER_GOOD_EVENT_SHIFT 0
163 #define POWER_ENABLE_EVENT_SHIFT 4
170 unsigned char DETC1_Detection_Cycle_Port_1_Event : 1;
171 unsigned char DETC2_Detection_Cycle_Port_2_Event : 1;
172 unsigned char DETC3_Detection_Cycle_Port_3_Event : 1;
173 unsigned char DETC4_Detection_Cycle_Port_4_Event : 1;
174 unsigned char CLSC1_Classification_Cycle_Port_1_Event : 1;
175 unsigned char CLSC2_Classification_Cycle_Port_2_Event : 1;
176 unsigned char CLSC3_Classification_Cycle_Port_3_Event : 1;
177 unsigned char CLSC4_Classification_Cycle_Port_4_Event : 1;
189 #define DETECTION_EVENT_SHIFT 0
190 #define CLASSIFICATION_EVENT_SHIFT 4
197 unsigned char ICUT1_ICUT_Fault_Port_1_Event : 1;
198 unsigned char ICUT2_ICUT_Fault_Port_2_Event : 1;
199 unsigned char ICUT3_ICUT_Fault_Port_3_Event : 1;
200 unsigned char ICUT4_ICUT_Fault_Port_4_Event : 1;
201 unsigned char DISF1_Disconnect_Port_1_Event : 1;
202 unsigned char DISF2_Disconnect_Port_2_Event : 1;
203 unsigned char DISF3_Disconnect_Port_3_Event : 1;
204 unsigned char DISF4_Disconnect_Port_4_Event : 1;
216 #define ICUT_EVENT_SHIFT 0
217 #define DISCONNECT_EVENT_SHIFT 4
224 unsigned char INR1_Inrush_Fault_Port_1_Event : 1;
225 unsigned char INR2_Inrush_Fault_Port_2_Event : 1;
226 unsigned char INR3_Inrush_Fault_Port_3_Event : 1;
227 unsigned char INR4_Inrush_Fault_Port_4_Event : 1;
228 unsigned char ILIM1_Limit_Output_Current_Port_1_Event : 1;
229 unsigned char ILIM2_Limit_Output_Current_Port_2_Event : 1;
230 unsigned char ILIM3_Limit_Output_Current_Port_3_Event : 1;
231 unsigned char ILIM4_Limit_Output_Current_Port_4_Event : 1;
243 #define INRUSH_EVENT_SHIFT 0
244 #define ILIM_EVENT_SHIFT 4
252 unsigned char Reserved_1 : 4;
253 unsigned char VPUV_VPower_Undervoltage_Event : 1;
254 unsigned char VDUV_Vdd_UVLO_Event : 1;
255 unsigned char Reserved_2 : 1;
256 unsigned char TSD_Thermal_Shutdown_Event : 1;
270 unsigned char Detect : 4;
271 unsigned char Class : 4;
305 #define CLASS_SHIFT 4
306 #define DETECT_SHIFT 0
307 #define GET_DETECT(x) (x & DETECT)
308 #define GET_CLASS(x) (x >> CLASS_SHIFT)
316 unsigned char PE1_Power_Enable_Port_1_Status : 1;
317 unsigned char PE2_Power_Enable_Port_2_Status : 1;
318 unsigned char PE3_Power_Enable_Port_3_Status : 1;
319 unsigned char PE4_Power_Enable_Port_4_Status : 1;
320 unsigned char PG1_Power_Good_Port_1_Status : 1;
321 unsigned char PG2_Power_Good_Port_2_Status : 1;
322 unsigned char PG3_Power_Good_Port_3_Status : 1;
323 unsigned char PG4_Power_Good_Port_4_Status : 1;
326 #define PE1_STATUS 0x01
327 #define PE2_STATUS 0x02
328 #define PE3_STATUS 0x04
329 #define PE4_STATUS 0x08
330 #define PG1_STATUS 0x10
331 #define PG2_STATUS 0x20
332 #define PG3_STATUS 0x40
333 #define PG4_STATUS 0x80
334 #define POWER_ENABLE_STATUS (PE1_STATUS + PE2_STATUS + PE3_STATUS + PE4_STATUS)
335 #define POWER_GOOD_STATUS (PG1_STATUS + PG2_STATUS + PG3_STATUS + PG4_STATUS)
336 #define POWER_GOOD_SHIFT 4
337 #define GET_POWER_ENABLE_STATUS(x) (x & POWER_ENABLE_STATUS)
338 #define GET_POWER_GOOD_STATUS(x) (x >> POWER_GOOD_SHIFT)
345 unsigned char I2C_slave_address : 7;
346 unsigned char Auto : 1;
349 #define AUTO_BIT 0x80
350 #define I2C_ADDRESS_MASK 0x7F
352 #define TPS238X_ALERT_RESPONSE_ADDRESS 0x0C
353 #define TPS238X_BROADCAST_ADDRESS 0x30
354 #define TPS238X_UNLOCK_CODE 0xAA
360 unsigned char Port_1_Operating_Mode : 2;
361 unsigned char Port_2_Operating_Mode : 2;
362 unsigned char Port_3_Operating_Mode : 2;
363 unsigned char Port_4_Operating_Mode : 2;
374 #define OPERATING_MODE_MASK 0x3
376 #define OPERATING_PORT_1_MODE 0x03
377 #define OPERATING_PORT_2_MODE 0x0C
378 #define OPERATING_PORT_3_MODE 0x30
379 #define OPERATING_PORT_4_MODE 0xC0
385 unsigned char DCDE1_Disconnect_Enable_Port_1 : 1;
386 unsigned char DCDE2_Disconnect_Enable_Port_2 : 1;
387 unsigned char DCDE3_Disconnect_Enable_Port_3 : 1;
388 unsigned char DCDE4_Disconnect_Enable_Port_4 : 1;
389 unsigned char Reserved_3 : 4;
407 unsigned char DETE1_Detection_Enable_Port_1 : 1;
408 unsigned char DETE2_Detection_Enable_Port_2 : 1;
409 unsigned char DETE3_Detection_Enable_Port_3 : 1;
410 unsigned char DETE4_Detection_Enable_Port_4 : 1;
411 unsigned char CLE1_Classification_Enable_Port_1 : 1;
412 unsigned char CLE2_Classification_Enable_Port_2 : 1;
413 unsigned char CLE3_Classification_Enable_Port_3 : 1;
414 unsigned char CLE4_Classification_Enable_Port_4 : 1;
430 unsigned char Reserved_4 : 4;
431 unsigned char FSE1_Fast_Shutdown_Enable_Port_1 : 1;
432 unsigned char FSE2_Fast_Shutdown_Enable_Port_2 : 1;
433 unsigned char FSE3_Fast_Shutdown_Enable_Port_3 : 1;
434 unsigned char FSE4_Fast_Shutdown_Enable_Port_4 : 1;
448 unsigned char TDIS_Time_Disconnect_Delay : 2;
449 unsigned char TICUT_ICUT_Fault_Timing : 2;
450 unsigned char TSTART_Start_Time : 2;
451 unsigned char TLIM_ILIM_Fault_Timing : 2;
486 #define TDIS_MASK 0x3
487 #define TDIS_SHIFT 0x0
489 #define TICUT_MASK 0xC
490 #define TICUT_SHIFT 0x2
492 #define TSTART_MASK 0x30
493 #define TSTART_SHIFT 0x4
495 #define TLIM_MASK 0xC0
496 #define TLIM_SHIFT 0x6
502 unsigned char _250M_Current_Sense_250_mOhm : 1;
503 unsigned char Reserved_5 : 3;
504 unsigned char MAINS_Detection_Voltage_Measurement_Duration : 1;
505 unsigned char Reserved_6 : 2;
506 unsigned char INTEN_INT_Pin_Mask : 1;
509 #define _960_A_D_CONV_PER_SECOND 0x10
510 #define _800_A_D_CONV_PER_SECOND 0x00
524 unsigned char RDET1_Restart_Detection_Port_1 : 1;
525 unsigned char RDET2_Restart_Detection_Port_2 : 1;
526 unsigned char RDET3_Restart_Detection_Port_3 : 1;
527 unsigned char RDET4_Restart_Detection_Port_4 : 1;
528 unsigned char RCL1_Restart_Classification_Port_1 : 1;
529 unsigned char RCL2_Restart_Classification_Port_2 : 1;
530 unsigned char RCL3_Restart_Classification_Port_3 : 1;
531 unsigned char RCL4_Restart_Classification_Port_4 : 1;
543 #define RESTART_DETECTION_SHIFT 0
544 #define RESTART_DETECTION_MASK 0x0F
546 #define RESTART_CLASSIFCATION_SHIFT 4
547 #define RESTART_CLASSIFCATION_MASK 0xF0
555 unsigned char PWON1_Power_On_Port_1 : 1;
556 unsigned char PWON2_Power_On_Port_2 : 1;
557 unsigned char PWON3_Power_On_Port_3 : 1;
558 unsigned char PWON4_Power_On_Port_4 : 1;
559 unsigned char PWOFF1_Power_On_Port_1 : 1;
560 unsigned char PWOFF2_Power_On_Port_2 : 1;
561 unsigned char PWOFF3_Power_On_Port_3 : 1;
562 unsigned char PWOFF4_Power_On_Port_4 : 1;
574 #define POWER_OFF_SHIFT 4
575 #define POWER_OFF_MASK 0xF0
577 #define POWER_ON_SHIFT 0
578 #define POWER_ON_MASK 0x0F
584 unsigned char RESP1_Reset_Port_1 : 1;
585 unsigned char RESP1_Reset_Port_2 : 1;
586 unsigned char RESP1_Reset_Port_3 : 1;
587 unsigned char RESP1_Reset_Port_4 : 1;
588 unsigned char RESAL_Reset_Registers : 1;
589 unsigned char Reserved_7 : 1;
590 unsigned char CLINP_Clear_Interrupt_Pin : 1;
591 unsigned char CLRAIN_Clear_Interrupt_Bits : 1;
606 unsigned char ICV_IC_Version_Number : 3;
607 unsigned char MFR_ID_Manufacture_ID_Number : 5;
612 #define MFR_ID_SHIFT 3
613 #define MFR_ID_DEFAULT 0x0A // This is the the results in the MFR_ID section of the register
614 #define ICV_DEFAULT 0x00
615 #define ID_REGISTER_DEFAULT ((MFR_ID_DEFAULT<<MFR_ID_SHIFT) | ICV_DEFAULT)
621 unsigned char LEGMOD1_Legacy_Detect_Port_1 : 2;
622 unsigned char LEGMOD2_Legacy_Detect_Port_2 : 2;
623 unsigned char LEGMOD3_Legacy_Detect_Port_3 : 2;
624 unsigned char LEGMOD4_Legacy_Detect_Port_4 : 2;
640 #define LEGACY_MODE_MASK 3
642 #define LEGMOD1_SHIFT 0
643 #define LEGMOD2_SHIFT 2
644 #define LEGMOD3_SHIFT 4
645 #define LEGMOD4_SHIFT 6
651 unsigned char TECLEN1_Two_Event_Classification_Port_1 : 2;
652 unsigned char TECLEN2_Two_Event_Classification_Port_2 : 2;
653 unsigned char TECLEN3_Two_Event_Classification_Port_3 : 2;
654 unsigned char TECLEN4_Two_Event_Classification_Port_4 : 2;
670 #define TWO_EVENT_MASK 3
672 #define TECLEN1_SHIFT 0
673 #define TECLEN2_SHIFT 2
674 #define TECLEN3_SHIFT 4
675 #define TECLEN4_SHIFT 6
681 unsigned char _4P12DIS_Disconnect_Mode_Four_Port_1_2 : 3;
682 unsigned char _4P12EN_Enable_Four_Port_Mode_1_2 : 1;
683 unsigned char _4P34DIS_Disconnect_Mode_Four_Port_3_4 : 3;
684 unsigned char _4P34EN_Enable_Four_Port_Mode_3_4 : 1;
696 #define _4P12DIS 0x07
698 #define _4P34DIS 0x70
701 #define FOUR_PAIR_DISCONNECT_MASK 7
703 #define _4P12DIS_SHIFT 0
704 #define _4P12EN_SHIFT 3
706 #define _4P34DIS_SHIFT 4
707 #define _4P34EN_SHIFT 7
713 unsigned char TMR_Timer_Period_10_ms : 4;
714 unsigned char CL5EN1_Class_5_Enable_Port_1 : 1;
715 unsigned char CL5EN2_Class_5_Enable_Port_2 : 1;
716 unsigned char CL5EN3_Class_5_Enable_Port_3 : 1;
717 unsigned char CL5EN4_Class_5_Enable_Port_4 : 1;
720 #define TMR_MASK 0x0F
726 #define CLASS_5_ENABLE_SHIFT 4
732 unsigned char DCTH1_Disconnect_Current_Threshold_Port_1 : 2;
733 unsigned char DCTH2_Disconnect_Current_Threshold_Port_2 : 2;
734 unsigned char DCTH3_Disconnect_Current_Threshold_Port_3 : 2;
735 unsigned char DCTH4_Disconnect_Current_Threshold_Port_4 : 2;
751 #define DISCONNECT_THRESHOLD_MASK 3
753 #define DCTH1_SHIFT 0
754 #define DCTH2_SHIFT 2
755 #define DCTH3_SHIFT 4
756 #define DCTH4_SHIFT 6
763 unsigned char ICUT_Current_Threshold_Port_1 : 3;
764 unsigned char Reserved_8 : 1;
765 unsigned char ICUT_Current_Threshold_Port_2 : 3;
766 unsigned char Reserved_9 : 1;
781 #define ICUT_THRESHOLD_MASK 7
783 #define ICUT_PORT_1 0x07
784 #define ICUT_PORT_2 0x70
786 #define ICUT_PORT_1_SHIFT 0
787 #define ICUT_PORT_2_SHIFT 4
795 unsigned char ICUT_Current_Threshold_Port_3 : 3;
796 unsigned char Reserved_10 : 1;
797 unsigned char ICUT_Current_Threshold_Port_4 : 3;
798 unsigned char Reserved_11 : 1;
801 #define ICUT_PORT_3 0x07
802 #define ICUT_PORT_4 0x70
804 #define ICUT_PORT_3_SHIFT 0
805 #define ICUT_PORT_4_SHIFT 4
814 #define CONVERT_TEMP(x) (((x*652)-20000)/1000)
822 unsigned short Input_Voltage : 14;
823 unsigned short Reserved_12 : 2;
824 } Input_Voltage_Short;
827 unsigned char Input_Voltage_LSB : 8;
828 unsigned char Input_Voltage_MSB : 6;
829 unsigned char Reserved_13 : 2;
830 } Input_Voltage_Char;
835 #define TPS2368X_INPUT_VOLTAGE_MASK_SHORT 0x3FFF
849 unsigned short Port_Current : 14;
850 unsigned short Reserved_14 : 2;
851 } Port_Current_Short;
854 unsigned char Port_Current_LSB : 8;
855 unsigned char Port_Current_MSB : 6;
856 unsigned char Reserved_15 : 2;
862 #define TPS2368X_PORT_CURRENT_MASK_SHORT 0x3FFF
875 unsigned short Port_Voltage : 14;
876 unsigned short Reserved_16 : 2;
877 } Port_Voltage_Short;
880 unsigned char Port_Voltage_LSB : 8;
881 unsigned char Port_Voltage_MSB : 6;
882 unsigned char Reserved_17 : 2;
888 #define TPS2368X_PORT_VOLTAGE_MASK_SHORT 0x3FFF
895 unsigned char Reserved_18 : 4;
896 unsigned char POEP1_Foldback_Curve_Port_1 : 1;
897 unsigned char POEP1_Foldback_Curve_Port_2 : 1;
898 unsigned char POEP1_Foldback_Curve_Port_3 : 1;
899 unsigned char POEP1_Foldback_Curve_Port_4 : 1;
913 #define POE_PLUS_SHIFT 4
919 unsigned char WDS_Watchdog_Status : 1;
920 unsigned char IWD_I2C_Watchdog_Disable : 4;
921 unsigned char Reserved_19 : 3;
928 #define IWD_MASK_VALUE 0xB
934 unsigned char Reserved_20 : 5;
935 unsigned char IGATE_Gate_Pullup_Current : 1;
936 unsigned char CLDN_Fault_Cool_Down_Timer : 2;
947 #define CLDN_MASK 0xC0
951 #define GATE_PULLUP_CURRENT_50_MICROAMP 0
952 #define GATE_PULLUP_CURRENT_25_MICROAMP 1
967 unsigned short Port_Detect_Resistance : 14;
968 unsigned short Detect_Status : 2;
969 } Port_Detect_Resistance_Short;
972 unsigned char Port_Detect_Resistance_LSB : 8;
973 unsigned char Port_Detect_Resistance_MSB : 6;
974 unsigned char Detect_Status : 2;
975 } Port_Detect_Resistance_Char;
988 #define PORT_RESISTANCE_MASK_SHORT 0x3FFF
989 #define RS_MASK_SHORT 0xC000
990 #define RS_SHIFT_SHORT 14
1005 unsigned short Port_Voltage_Difference : 12;
1006 unsigned short Voltage_Difference_Status : 4;
1007 } Port_Voltage_Difference_Short;
1010 unsigned char Port_Voltage_Difference_LSB : 8;
1011 unsigned char Port_Voltage_Difference_MSB : 6;
1012 unsigned char Voltage_Difference_Status : 2;
1013 } Port_Voltage_Difference_Char;
1030 #define PORT_VOLTAGE_DIFFERENCE_MASK_SHORT 0x0FFF
1031 #define VDS_MASK_SHORT 0xF000
1032 #define VDS_SHIFT_SHORT 12
1035 #define CONVERT_PORT_NUM(x) (1 << ((uint8_t)x-1))
1043 #define TPS238X_INTERRUPT_COMMAND 0x00
1044 #define TPS238X_INTERRUPT_MASK_COMMAND 0x01
1045 #define TPS238X_POWER_EVENT_COMMAND 0x02
1046 #define TPS238X_POWER_EVENT_CLEAR_COMMAND 0x03
1047 #define TPS238X_DETECTION_EVENT_COMMAND 0x04
1048 #define TPS238X_DETECTION_EVENT_CLEAR_COMMAND 0x05
1049 #define TPS238X_FAULT_EVENT_COMMAND 0x06
1050 #define TPS238X_FAULT_EVENT_CLEAR_COMMAND 0x07
1051 #define TPS238X_INRUSH_LIMIT_EVENT_COMMAND 0x08
1052 #define TPS238X_INRUSH_LIMIT_EVENT_CLEAR_COMMAND 0x09
1053 #define TPS238X_SUPPLY_EVENT_COMMAND 0x0A
1054 #define TPS238X_SUPPLY_EVENT_CLEAR_COMMAND 0x0B
1055 #define TPS238X_PORT_1_STATUS_COMMAND 0x0C
1056 #define TPS238X_PORT_2_STATUS_COMMAND 0x0D
1057 #define TPS238X_PORT_3_STATUS_COMMAND 0x0E
1058 #define TPS238X_PORT_4_STATUS_COMMAND 0x0F
1059 #define TPS238X_POWER_STATUS_COMMAND 0x10
1060 #define TPS238X_I2C_SLAVE_ADDRESS_COMMAND 0x11
1061 #define TPS238X_OPERATING_MODE_COMMAND 0x12
1062 #define TPS238X_DISCONNECT_ENABLE_COMMAND 0x13
1063 #define TPS238X_DETECT_CLASS_ENABLE_COMMAND 0x14
1064 #define TPS238X_PORT_POWER_PRIORITY_COMMAND 0x15
1065 #define TPS238X_TIMING_CONFIGURATION_COMMAND 0x16
1066 #define TPS238X_GENERAL_MASK_1_COMMAND 0x17
1067 #define TPS238X_DETECT_CLASS_RESTART_COMMAND 0x18
1068 #define TPS238X_POWER_ENABLE_COMMAND 0x19
1069 #define TPS238X_RESET_COMMAND 0x1A
1070 #define TPS238X_ID_COMMAND 0x1B
1072 #define TPS238X_TEST_ENABLE_COMMAND 0x1D
1074 #define TPS238X_LEGACY_DETECT_MODE_COMMAND 0x20
1075 #define TPS238X_TWO_EVENT_CLASSIFICATION_COMMAND 0x21
1076 #define TPS238X_FOUR_PAIR_MODE_COMMAND 0x22
1078 #define TPS238X_CLASS_FIVE_TIMER_ENABLE_COMMAND 0x27
1080 #define TPS238X_DISCONNECT_THRESHOLD_COMMAND 0x29
1081 #define TPS238X_ICUT21_CONFIGURATION_COMMAND 0x2A
1082 #define TPS238X_ICUT43_CONFIGURATION_COMMAND 0x2B
1083 #define TPS238X_TEMPERATURE_COMMAND 0x2C
1085 #define TPS238X_INPUT_VOLTAGE_COMMAND 0x2E
1086 #define TPS238X_INPUT_VOLTAGE_LSB_COMMAND 0x2E
1087 #define TPS238X_INPUT_VOLTAGE_MSB_COMMAND 0x2F
1089 #define TPS238X_PORT_1_CURRENT_COMMAND 0x30
1090 #define TPS238X_PORT_1_CURRENT_LSB_COMMAND 0x30
1091 #define TPS238X_PORT_1_CURRENT_MSB_COMMAND 0x31
1093 #define TPS238X_PORT_1_VOLTAGE_COMMAND 0x32
1094 #define TPS238X_PORT_1_VOLTAGE_LSB_COMMAND 0x32
1095 #define TPS238X_PORT_1_VOLTAGE_MSB_COMMAND 0x33
1097 #define TPS238X_PORT_2_CURRENT_COMMAND 0x34
1098 #define TPS238X_PORT_2_CURRENT_LSB_COMMAND 0x34
1099 #define TPS238X_PORT_2_CURRENT_MSB_COMMAND 0x35
1101 #define TPS238X_PORT_2_VOLTAGE_COMMAND 0x36
1102 #define TPS238X_PORT_2_VOLTAGE_LSB_COMMAND 0x36
1103 #define TPS238X_PORT_2_VOLTAGE_MSB_COMMAND 0x37
1105 #define TPS238X_PORT_3_CURRENT_COMMAND 0x38
1106 #define TPS238X_PORT_3_CURRENT_LSB_COMMAND 0x38
1107 #define TPS238X_PORT_3_CURRENT_MSB_COMMAND 0x39
1109 #define TPS238X_PORT_3_VOLTAGE_COMMAND 0x3A
1110 #define TPS238X_PORT_3_VOLTAGE_LSB_COMMAND 0x3A
1111 #define TPS238X_PORT_3_VOLTAGE_MSB_COMMAND 0x3B
1113 #define TPS238X_PORT_4_CURRENT_COMMAND 0x3C
1114 #define TPS238X_PORT_4_CURRENT_LSB_COMMAND 0x3C
1115 #define TPS238X_PORT_4_CURRENT_MSB_COMMAND 0x3D
1117 #define TPS238X_PORT_4_VOLTAGE_COMMAND 0x3E
1118 #define TPS238X_PORT_4_VOLTAGE_LSB_COMMAND 0x3E
1119 #define TPS238X_PORT_4_VOLTAGE_MSB_COMMAND 0x3F
1121 #define TPS238X_POE_PLUS_COMMAND 0x40
1122 #define TPS238X_FIRMWARE_REVISION_COMMAND 0x41
1123 #define TPS238X_I2C_WATCHDOG_COMMAND 0x42
1124 #define TPS238X_DEVICE_ID_COMMAND 0x43
1126 #define TPS238X_COOL_DOWN_GATE_DRIVE_COMMAND 0x45
1128 #define TPS238X_PORT_1_DETECT_RESISTANCE_COMMAND 0x60
1129 #define TPS238X_PORT_1_DETECT_RESISTANCE_LSB_COMMAND 0x60
1130 #define TPS238X_PORT_1_DETECT_RESISTANCE_MSB_COMMAND 0x61
1132 #define TPS238X_PORT_2_DETECT_RESISTANCE_COMMAND 0x62
1133 #define TPS238X_PORT_2_DETECT_RESISTANCE_LSB_COMMAND 0x62
1134 #define TPS238X_PORT_2_DETECT_RESISTANCE_MSB_COMMAND 0x63
1136 #define TPS238X_PORT_3_DETECT_RESISTANCE_COMMAND 0x64
1137 #define TPS238X_PORT_3_DETECT_RESISTANCE_LSB_COMMAND 0x64
1138 #define TPS238X_PORT_3_DETECT_RESISTANCE_MSB_COMMAND 0x65
1140 #define TPS238X_PORT_4_DETECT_RESISTANCE_COMMAND 0x66
1141 #define TPS238X_PORT_4_DETECT_RESISTANCE_LSB_COMMAND 0x66
1142 #define TPS238X_PORT_4_DETECT_RESISTANCE_MSB_COMMAND 0x67
1144 #define TPS238X_PORT_1_DETECT_VOLTAGE_DIFF_COMMAND 0x68
1145 #define TPS238X_PORT_1_DETECT_VOLTAGE_DIFF_LSB_COMMAND 0x68
1146 #define TPS238X_PORT_1_DETECT_VOLTAGE_DIFF_MSB_COMMAND 0x69
1148 #define TPS238X_PORT_2_DETECT_VOLTAGE_DIFF_COMMAND 0x6A
1149 #define TPS238X_PORT_2_DETECT_VOLTAGE_DIFF_LSB_COMMAND 0x6A
1150 #define TPS238X_PORT_2_DETECT_VOLTAGE_DIFF_MSB_COMMAND 0x6B
1152 #define TPS238X_PORT_3_DETECT_VOLTAGE_DIFF_COMMAND 0x6C
1153 #define TPS238X_PORT_3_DETECT_VOLTAGE_DIFF_LSB_COMMAND 0x6C
1154 #define TPS238X_PORT_3_DETECT_VOLTAGE_DIFF_MSB_COMMAND 0x6D
1156 #define TPS238X_PORT_4_DETECT_VOLTAGE_DIFF_COMMAND 0x6E
1157 #define TPS238X_PORT_4_DETECT_VOLTAGE_DIFF_LSB_COMMAND 0x6E
1158 #define TPS238X_PORT_4_DETECT_VOLTAGE_DIFF_MSB_COMMAND 0x6F