Lines Matching +full:0 +full:x4e

64 	PD692X0_KEY_REPORT = 0x52
109 .sub = {0x07, 0x55, 0x00},
110 .data = {0x55, 0x00, 0x55, 0x4e,
111 0x4e, 0x4e, 0x4e, 0x4e},
115 .sub = {0x07, 0xd0, 0x4e},
116 .data = {0x4e, 0x4e, 0x4e, 0x4e,
117 0x4e, 0x4e, 0x4e, 0x4e},
121 .sub = {0x07, 0x1e, 0x21},
122 .data = {0x4e, 0x4e, 0x4e, 0x4e,
123 0x4e, 0x4e, 0x4e, 0x4e},
127 .sub = {0x05, 0x43},
128 .data = { 0, 0x4e, 0x4e, 0x4e,
129 0x4e, 0x4e, 0x4e, 0x4e},
133 .sub = {0x07, 0x43, 0x4e},
134 .data = {0x4e, 0x4e, 0x4e, 0x4e,
135 0x4e, 0x4e, 0x4e, 0x4e},
139 .sub = {0x05, 0xc0},
140 .data = { 0xf, 0xff, 0xff, 0xff,
141 0x4e, 0x4e, 0x4e, 0x4e},
145 .sub = {0x05, 0xc1},
146 .data = {0x4e, 0x4e, 0x4e, 0x4e,
147 0x4e, 0x4e, 0x4e, 0x4e},
151 .sub = {0xff, 0x99, 0x15},
152 .data = {0x16, 0x16, 0x99, 0x4e,
153 0x4e, 0x4e, 0x4e, 0x4e},
157 .sub = {0x05, 0xc4},
158 .data = {0x4e, 0x4e, 0x4e, 0x4e,
159 0x4e, 0x4e, 0x4e, 0x4e},
163 .sub = {0x05, 0xc5},
164 .data = {0x4e, 0x4e, 0x4e, 0x4e,
165 0x4e, 0x4e, 0x4e, 0x4e},
169 .sub = {0x05, 0xc0},
170 .data = {0x4e, 0x4e, 0x4e, 0x4e,
171 0x4e, 0x4e, 0x4e, 0x4e},
178 u16 chksum = 0; in pd692x0_build_msg()
182 if (echo == 0xff) in pd692x0_build_msg()
183 echo = 0; in pd692x0_build_msg()
185 for (i = 0; i < sizeof(*msg) - sizeof(msg->chksum); i++) in pd692x0_build_msg()
202 if (cmd_msleep > 0) in pd692x0_send_msg()
213 return 0; in pd692x0_send_msg()
219 struct pd692x0_msg msg, buf = {0}; in pd692x0_reset()
234 return ret < 0 ? ret : -EIO; in pd692x0_reset()
237 if (buf.key != PD692X0_KEY_REPORT || buf.sub[0] || buf.sub[1]) in pd692x0_reset()
244 return ret < 0 ? ret : -EIO; in pd692x0_reset()
247 if (buf.key != 0x03 || buf.echo != 0xff || buf.sub[0] & 0x1) { in pd692x0_reset()
252 return 0; in pd692x0_reset()
262 memset(buf, 0, sizeof(*buf)); in pd692x0_try_recv_msg()
265 return 0; in pd692x0_try_recv_msg()
269 memset(buf, 0, sizeof(*buf)); in pd692x0_try_recv_msg()
272 return 0; in pd692x0_try_recv_msg()
326 return 0; in pd692x0_recv_msg()
353 (buf->sub[0] || buf->sub[1])) { in pd692x0_sendrecv_msg()
357 return 0; in pd692x0_sendrecv_msg()
369 return 0; in pd692x0_fw_unavailable()
387 struct pd692x0_msg msg, buf = {0}; in pd692x0_pi_enable()
395 return 0; in pd692x0_pi_enable()
398 msg.data[0] = 0x1; in pd692x0_pi_enable()
401 if (ret < 0) in pd692x0_pi_enable()
406 return 0; in pd692x0_pi_enable()
412 struct pd692x0_msg msg, buf = {0}; in pd692x0_pi_disable()
420 return 0; in pd692x0_pi_disable()
423 msg.data[0] = 0x0; in pd692x0_pi_disable()
426 if (ret < 0) in pd692x0_pi_disable()
431 return 0; in pd692x0_pi_disable()
437 struct pd692x0_msg msg, buf = {0}; in pd692x0_pi_is_enabled()
447 if (ret < 0) in pd692x0_pi_is_enabled()
455 return 0; in pd692x0_pi_is_enabled()
467 {0x06, ETHTOOL_C33_PSE_EXT_STATE_OPTION_VPORT_LIM,
469 {0x07, ETHTOOL_C33_PSE_EXT_STATE_OPTION_VPORT_LIM,
471 {0x08, ETHTOOL_C33_PSE_EXT_STATE_MR_PSE_ENABLE,
473 {0x0C, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
475 {0x11, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
477 {0x12, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
479 {0x1B, ETHTOOL_C33_PSE_EXT_STATE_OPTION_DETECT_TED,
481 {0x1C, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
483 {0x1E, ETHTOOL_C33_PSE_EXT_STATE_MR_MPS_VALID,
485 {0x1F, ETHTOOL_C33_PSE_EXT_STATE_OVLD_DETECTED,
487 {0x20, ETHTOOL_C33_PSE_EXT_STATE_POWER_NOT_AVAILABLE,
489 {0x21, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
491 {0x22, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
493 {0x24, ETHTOOL_C33_PSE_EXT_STATE_OPTION_VPORT_LIM,
495 {0x25, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
497 {0x34, ETHTOOL_C33_PSE_EXT_STATE_SHORT_DETECTED,
499 {0x35, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
501 {0x36, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
503 {0x37, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
505 {0x3C, ETHTOOL_C33_PSE_EXT_STATE_POWER_NOT_AVAILABLE,
507 {0x3D, ETHTOOL_C33_PSE_EXT_STATE_POWER_NOT_AVAILABLE,
509 {0x41, ETHTOOL_C33_PSE_EXT_STATE_POWER_NOT_AVAILABLE,
511 {0x43, ETHTOOL_C33_PSE_EXT_STATE_ERROR_CONDITION,
513 {0xA7, ETHTOOL_C33_PSE_EXT_STATE_OPTION_DETECT_TED,
515 {0xA8, ETHTOOL_C33_PSE_EXT_STATE_MR_MPS_VALID,
550 {.class = 3, .class_cfg_value = 0x3, .class_pw = 15000, .max_added_class_pw = 3100},
551 {.class = 4, .class_cfg_value = 0x2, .class_pw = 30000, .max_added_class_pw = 8000},
552 {.class = 6, .class_cfg_value = 0x1, .class_pw = 60000, .max_added_class_pw = 5000},
553 {.class = 8, .class_cfg_value = 0x0, .class_pw = 90000, .max_added_class_pw = 7500},
562 for (i = 0; i < PD692X0_CLASS_PW_TABLE_SIZE; i++, pw_table++) { in pd692x0_pi_get_pw_from_table()
586 for (i = 0; i < PD692X0_CLASS_PW_TABLE_SIZE; i++, pw_table++) { in pd692x0_pi_set_pw_from_table()
603 return 0; in pd692x0_pi_set_pw_from_table()
612 return 0; in pd692x0_pi_set_pw_from_table()
628 for (i = 0; i < PD692X0_CLASS_PW_TABLE_SIZE; i++, pw_table++) { in pd692x0_pi_get_pw_ranges()
634 return 0; in pd692x0_pi_get_pw_ranges()
643 struct pd692x0_msg msg, buf = {0}; in pd692x0_ethtool_get_status()
654 if (ret < 0) in pd692x0_ethtool_get_status()
658 if ((buf.sub[0] & 0xf0) == 0x80 || (buf.sub[0] & 0xf0) == 0x90) in pd692x0_ethtool_get_status()
660 else if (buf.sub[0] == 0x1b || buf.sub[0] == 0x22) in pd692x0_ethtool_get_status()
662 else if (buf.sub[0] == 0x12) in pd692x0_ethtool_get_status()
674 pd692x0_get_ext_state(&status->c33_ext_state_info, buf.sub[0]); in pd692x0_ethtool_get_status()
675 status->c33_actual_pw = (buf.data[0] << 4 | buf.data[1]) * 100; in pd692x0_ethtool_get_status()
679 memset(&buf, 0, sizeof(buf)); in pd692x0_ethtool_get_status()
681 if (ret < 0) in pd692x0_ethtool_get_status()
684 ret = pd692x0_pi_get_pw_from_table(buf.data[0], buf.data[1]); in pd692x0_ethtool_get_status()
685 if (ret < 0) in pd692x0_ethtool_get_status()
689 memset(&buf, 0, sizeof(buf)); in pd692x0_ethtool_get_status()
693 if (ret < 0) in pd692x0_ethtool_get_status()
701 if (ret < 0) in pd692x0_ethtool_get_status()
704 return 0; in pd692x0_ethtool_get_status()
710 struct pd692x0_msg msg, buf = {0}; in pd692x0_get_sw_version()
711 struct pd692x0_msg_ver ver = {0}; in pd692x0_get_sw_version()
716 if (ret < 0) { in pd692x0_get_sw_version()
723 ver.maj_sw_ver = (buf.data[0] << 8 | buf.data[1]) / 100; in pd692x0_get_sw_version()
724 ver.min_sw_ver = ((buf.data[0] << 8 | buf.data[1]) / 10) % 10; in pd692x0_get_sw_version()
725 ver.pa_sw_ver = (buf.data[0] << 8 | buf.data[1]) % 10; in pd692x0_get_sw_version()
750 nports = 0; in pd692x0_of_get_ports_manager()
775 return 0; in pd692x0_of_get_ports_manager()
778 for (i = 0; i < nports; i++) { in pd692x0_of_get_ports_manager()
796 nmanagers = 0; in pd692x0_of_get_managers()
832 for (i = 0; i < nmanagers; i++) { in pd692x0_of_get_managers()
833 for (j = 0; j < manager[i].nports; j++) { in pd692x0_of_get_managers()
853 return 0; in pd692x0_set_port_matrix()
856 port_cnt = 0; in pd692x0_set_port_matrix()
857 for (i = 0; i < nmanagers; i++) { in pd692x0_set_port_matrix()
859 for (j = 0; j < manager[i].nports; j++) { in pd692x0_set_port_matrix()
879 return 0; in pd692x0_set_port_matrix()
892 for (i = 0; i < PD692X0_MAX_PIS; i++) { in pd692x0_set_ports_matrix()
893 port_matrix[i].hw_port_a = 0xff; in pd692x0_set_ports_matrix()
894 port_matrix[i].hw_port_b = 0xff; in pd692x0_set_ports_matrix()
898 for (i = 0; i < pcdev->nr_lines; i++) { in pd692x0_set_ports_matrix()
899 ret = pd692x0_set_port_matrix(&pcdev->pi[i].pairset[0], in pd692x0_set_ports_matrix()
904 "unable to configure pi %d pairset 0", i); in pd692x0_set_ports_matrix()
918 return 0; in pd692x0_set_ports_matrix()
930 for (i = 0; i < PD692X0_MAX_PIS; i++) { in pd692x0_write_ports_matrix()
932 msg.data[0] = port_matrix[i].hw_port_b; in pd692x0_write_ports_matrix()
936 if (ret < 0) in pd692x0_write_ports_matrix()
943 if (ret < 0) in pd692x0_write_ports_matrix()
946 return 0; in pd692x0_write_ports_matrix()
951 struct pd692x0_manager manager[PD692X0_MAX_MANAGERS] = {0}; in pd692x0_setup_pi_matrix()
959 return 0; in pd692x0_setup_pi_matrix()
962 if (ret < 0) in pd692x0_setup_pi_matrix()
975 for (i = 0; i < nmanagers; i++) { in pd692x0_setup_pi_matrix()
976 for (j = 0; j < manager[i].nports; j++) in pd692x0_setup_pi_matrix()
985 struct pd692x0_msg msg, buf = {0}; in pd692x0_pi_get_voltage()
995 if (ret < 0) in pd692x0_pi_get_voltage()
999 return (buf.sub[0] << 8 | buf.sub[1]) * 100000; in pd692x0_pi_get_voltage()
1006 struct pd692x0_msg msg, buf = {0}; in pd692x0_pi_get_current_limit()
1013 if (ret < 0) in pd692x0_pi_get_current_limit()
1017 if (ret < 0) in pd692x0_pi_get_current_limit()
1022 if (ret < 0) in pd692x0_pi_get_current_limit()
1038 struct pd692x0_msg msg, buf = {0}; in pd692x0_pi_set_current_limit()
1047 if (ret < 0) in pd692x0_pi_set_current_limit()
1075 #define PD692X0_FW_LINE_MAX_SZ 0xff
1084 memset(line, 0, PD692X0_FW_LINE_MAX_SZ); in pd692x0_fw_get_next_line()
1085 for (i = 0; i < line_size - 1; i++) { in pd692x0_fw_get_next_line()
1103 char fw_msg_buf[5] = {0}; in pd692x0_fw_recv_resp()
1117 if (ret < 0 || *fw_msg_buf == 0) { in pd692x0_fw_recv_resp()
1143 while (*line != 0) { in pd692x0_fw_write_line()
1145 if (ret < 0) in pd692x0_fw_write_line()
1167 const struct pd692x0_msg zero = {0}; in pd692x0_fw_reset()
1168 struct pd692x0_msg buf = {0}; in pd692x0_fw_reset()
1174 if (ret < 0) { in pd692x0_fw_reset()
1187 if (ret < 0 || in pd692x0_fw_reset()
1195 if (buf.key != PD692X0_KEY_TLM || buf.echo != 0xff || in pd692x0_fw_reset()
1196 buf.sub[0] & 0x01) { in pd692x0_fw_reset()
1202 if (buf.sub[0] & 0x02) { in pd692x0_fw_reset()
1232 if (ret < 0) in pd692x0_fw_prepare()
1242 if (ret < 0) { in pd692x0_fw_prepare()
1283 if (ret < 0) { in pd692x0_fw_write()
1310 if (ret < 0) { in pd692x0_fw_write()
1321 i = 0; in pd692x0_fw_write()
1324 if (ret < 0) { in pd692x0_fw_write()
1331 if (line[0] == 'S' && line[1] == '0') { in pd692x0_fw_write()
1333 } else if (line[0] == 'S' && line[1] == '7') { in pd692x0_fw_write()
1382 if (ret < 0) { in pd692x0_fw_poll_complete()
1426 struct pd692x0_msg msg, buf = {0}, zero = {0}; in pd692x0_i2c_probe()
1456 if (ret < 0) { in pd692x0_i2c_probe()
1462 if (buf.key != 0x03 || buf.sub[0] & 0x01) { in pd692x0_i2c_probe()
1466 if (buf.sub[0] & 0x02) { in pd692x0_i2c_probe()
1501 return 0; in pd692x0_i2c_probe()