Lines Matching +full:0 +full:xd4
19 #define TEST_ADDR (0x4e)
21 #define MAX34451_MFR_MODE 0xD1
22 #define MAX34451_MFR_VOUT_PEAK 0xD4
23 #define MAX34451_MFR_IOUT_PEAK 0xD5
24 #define MAX34451_MFR_TEMPERATURE_PEAK 0xD6
25 #define MAX34451_MFR_VOUT_MIN 0xD7
27 #define DEFAULT_VOUT 0
28 #define DEFAULT_UV_LIMIT 0
30 #define DEFAULT_SCALE 0x7FFF
31 #define DEFAULT_OV_LIMIT 0x7FFF
32 #define DEFAULT_OC_LIMIT 0x7FFF
33 #define DEFAULT_OT_LIMIT 0x7FFF
34 #define DEFAULT_VMIN 0x7FFF
35 #define DEFAULT_TON_FAULT_LIMIT 0xFFFF
36 #define DEFAULT_CHANNEL_CONFIG 0x20
37 #define DEFAULT_TEXT 0x20
73 return (resp[1] << 8) | resp[0]; in max34451_i2c_get16()
81 data[0] = value & 255; in max34451_i2c_set16()
94 for (int i = 0; i < MAX34451_NUM_TEMP_DEVICES; i++) { in test_defaults()
113 for (int i = 0; i < MAX34451_NUM_PWR_DEVICES; i++) { in test_defaults()
140 g_assert_cmphex(i2c_value, ==, 0x40); /* DIRECT mode */ in test_defaults()
143 g_assert_cmphex(i2c_value, ==, 0x11); /* Rev 1.1 */ in test_defaults()
153 for (int i = 0; i < MAX34451_NUM_TEMP_DEVICES; i++) { in test_temperature()
155 qmp_max34451_set(TEST_ID, path, 0xBE00 + i); in test_temperature()
157 g_assert_cmphex(value, ==, 0xBE00 + i); in test_temperature()
162 for (int i = 0; i < MAX34451_NUM_TEMP_DEVICES; i++) { in test_temperature()
163 /* temperature[0] is on page 16 */ in test_temperature()
166 g_assert_cmphex(i2c_value, ==, 0xBE00 + i); in test_temperature()
169 g_assert_cmphex(i2c_value, ==, 0xBE00 + i); in test_temperature()
180 for (int i = 0; i < MAX34451_NUM_PWR_DEVICES; i++) { in test_voltage()
189 for (int i = 0; i < MAX34451_NUM_PWR_DEVICES; i++) { in test_voltage()
257 i2c_set8(i2cdev, PMBUS_CAPABILITY, 0xF9); in test_ro_regs()
262 max34451_i2c_set16(i2cdev, PMBUS_READ_VOUT, 0xDEAD); in test_ro_regs()
265 g_assert_cmphex(i2c_value, !=, 0xDEAD); in test_ro_regs()
269 max34451_i2c_set16(i2cdev, PMBUS_READ_TEMPERATURE_1, 0xABBA); in test_ro_regs()
272 g_assert_cmphex(i2c_value, !=, 0xABBA); in test_ro_regs()
283 for (int i = 0; i < MAX34451_NUM_PWR_DEVICES; i++) { in test_ov_faults()
292 g_assert_true((i2c_value & PB_STATUS_VOUT) != 0); in test_ov_faults()
293 g_assert_true((i2c_byte & PB_STATUS_VOUT_OV_FAULT) != 0); in test_ov_faults()
305 for (int i = 0; i < MAX34451_NUM_TEMP_DEVICES; i++) { in test_ot_faults()
314 g_assert_true((i2c_value & PB_STATUS_TEMPERATURE) != 0); in test_ot_faults()
315 g_assert_true((i2c_byte & PB_STATUS_OT_FAULT) != 0); in test_ot_faults()
319 #define RAND_ON_OFF_CONFIG 0x12
320 #define RAND_MFR_MODE 0x3456
332 for (int i = 0; i < MAX34451_NUM_TEMP_DEVICES + MAX34451_NUM_PWR_DEVICES; in test_all_pages()
344 .extra_device_opts = "id=" TEST_ID ",address=0x4e" in max34451_register_nodes()