Lines Matching +full:bus +full:- +full:powered
24 static auto PSUGPIOLineName = "presence-ps0";
129 * @param[in] invpath - String for inventory path to use in TEST_F()
130 * @param[in] i2cbus - The bus number this power supply is on in TEST_F()
131 * @param[in] i2caddr - The 16-bit I2C address of the power supply in TEST_F()
132 * @param[in] gpioLineName - The string for the gpio-line-name to read for in TEST_F()
134 * @param[in] bindDelay - Time in milliseconds to delay binding the device in TEST_F()
137 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
142 auto psu = std::make_unique<PowerSupply>(bus, "", 3, 0x68, "ibm-cffps", in TEST_F()
160 auto psu = std::make_unique<PowerSupply>(bus, PSUInventoryPath, 3, 0x68, in TEST_F()
161 "ibm-cffps", "", isPowerOn); in TEST_F()
175 // NOT using D-Bus inventory path for presence. in TEST_F()
179 bus, PSUInventoryPath, 3, 0x68, "ibm-cffps", PSUGPIOLineName, in TEST_F()
182 EXPECT_EQ(psu->isPresent(), false); in TEST_F()
183 EXPECT_EQ(psu->isFaulted(), false); in TEST_F()
184 EXPECT_EQ(psu->hasCommFault(), false); in TEST_F()
185 EXPECT_EQ(psu->hasInputFault(), false); in TEST_F()
186 EXPECT_EQ(psu->hasMFRFault(), false); in TEST_F()
187 EXPECT_EQ(psu->hasVINUVFault(), false); in TEST_F()
188 EXPECT_EQ(psu->hasVoutOVFault(), false); in TEST_F()
189 EXPECT_EQ(psu->hasIoutOCFault(), false); in TEST_F()
190 EXPECT_EQ(psu->hasVoutUVFault(), false); in TEST_F()
191 EXPECT_EQ(psu->hasFanFault(), false); in TEST_F()
192 EXPECT_EQ(psu->hasTempFault(), false); in TEST_F()
193 EXPECT_EQ(psu->hasPgoodFault(), false); in TEST_F()
194 EXPECT_EQ(psu->hasPSKillFault(), false); in TEST_F()
195 EXPECT_EQ(psu->hasPS12VcsFault(), false); in TEST_F()
196 EXPECT_EQ(psu->hasPSCS12VFault(), false); in TEST_F()
204 // TODO: Using D-Bus inventory path for presence. in TEST_F()
222 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
228 PowerSupply psu{bus, PSUInventoryPath, 4, 0x69, in TEST_F()
229 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
253 PowerSupply psu2{bus, PSUInventoryPath, 5, 0x6a, in TEST_F()
254 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
274 // Start with STATUS_WORD 0x0000. Powered on, no faults. in TEST_F()
684 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
692 PowerSupply psu{bus, PSUInventoryPath, 4, 0x69, in TEST_F()
693 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
712 PowerSupply psu{bus, PSUInventoryPath, 5, 0x6a, in TEST_F()
713 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
727 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
746 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
747 PowerSupply psu{bus, PSUInventoryPath, 13, 0x68, in TEST_F()
748 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
761 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
857 // Faults clear on READ_VIN 0 -> !0 in TEST_F()
970 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
974 PowerSupply psu{bus, PSUInventoryPath, 3, 0x68, in TEST_F()
975 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
988 PowerSupply psu{bus, PSUInventoryPath, 13, 0x69, in TEST_F()
989 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1001 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1023 // TODO: D-Bus mocking to verify values stored on D-Bus (???) in TEST_F()
1033 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1035 PowerSupply psu{bus, PSUInventoryPath, 3, 0x68, in TEST_F()
1036 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1056 // Give it an input voltage in the 100-volt range. in TEST_F()
1067 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1069 PowerSupply psu{bus, PSUInventoryPath, 11, 0x6f, in TEST_F()
1070 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1086 // Give it an input voltage in the 100-volt range. in TEST_F()
1111 // Also get another read of READ_VIN, faulted, so not in 100-volt range in TEST_F()
1126 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1128 PowerSupply psu{bus, PSUInventoryPath, 3, 0x68, in TEST_F()
1129 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1141 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1182 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1184 PowerSupply psu{bus, PSUInventoryPath, 3, 0x68, in TEST_F()
1185 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1198 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1232 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1234 PowerSupply psu{bus, PSUInventoryPath, 3, 0x68, in TEST_F()
1235 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1250 // Zero to non-zero voltage, for missing/present change, triggers clear in TEST_F()
1255 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1302 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1304 PowerSupply psu{bus, PSUInventoryPath, 3, 0x69, in TEST_F()
1305 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1317 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1321 // Initial value would be 0, so this read updates it to non-zero. in TEST_F()
1352 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1354 PowerSupply psu{bus, PSUInventoryPath, 3, 0x6d, in TEST_F()
1355 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1367 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1371 // Initial value would be 0, so this read updates it to non-zero. in TEST_F()
1407 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1409 PowerSupply psu{bus, PSUInventoryPath, 3, 0x6a, in TEST_F()
1410 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1422 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1426 // Initial value would be 0, so this read updates it to non-zero. in TEST_F()
1457 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1462 PowerSupply psu{bus, PSUInventoryPath, 3, 0x6d, in TEST_F()
1463 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1475 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1479 // Initial value would be 0, so this read updates it to non-zero. in TEST_F()
1512 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1517 PowerSupply psu{bus, PSUInventoryPath, 3, 0x6a, in TEST_F()
1518 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1530 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1534 // Initial value would be 0, so this read updates it to non-zero. in TEST_F()
1567 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1569 PowerSupply psu{bus, PSUInventoryPath, 3, 0x6b, in TEST_F()
1570 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1582 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1586 // Initial value would be 0, so this read updates it to non-zero. in TEST_F()
1702 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1703 PowerSupply psu{bus, PSUInventoryPath, 4, 0x6d, in TEST_F()
1704 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1716 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1720 // Initial value would be 0, so this read updates it to non-zero. in TEST_F()
1791 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1792 PowerSupply psu{bus, PSUInventoryPath, 5, 0x6e, in TEST_F()
1793 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1805 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1864 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1865 PowerSupply psu{bus, PSUInventoryPath, 6, 0x6f, in TEST_F()
1866 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1878 // STATUS_WORD 0x0000 is powered on, no faults. in TEST_F()
1936 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
1938 PowerSupply psu{bus, PSUInventoryPath, 6, 0x6f, in TEST_F()
1939 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1963 PowerSupply psu{bus, PSUInventoryPath, 3, 0x68, in TEST_F()
1964 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
1988 PowerSupply psu{bus, PSUInventoryPath, 11, in TEST_F()
1989 0x58, "inspur-ipsps", PSUGPIOLineName, in TEST_F()
2014 PowerSupply psu{bus, PSUInventoryPath, 6, 0x6f, in TEST_F()
2015 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
2045 auto bus = sdbusplus::bus::new_default(); in TEST_F() local
2046 PowerSupply psu{bus, PSUInventoryPath, 8, 0x6f, in TEST_F()
2047 "ibm-cffps", PSUGPIOLineName, isPowerOn}; in TEST_F()
2067 // Missing -> Present requires history sync in TEST_F()
2082 EXPECT_EQ(-1, PowerSupply::linearToInteger(0x7FF)); in TEST_F()
2083 EXPECT_EQ(-20, PowerSupply::linearToInteger(0x7EC)); in TEST_F()
2084 EXPECT_EQ(-769, PowerSupply::linearToInteger(0x4FF)); in TEST_F()
2085 EXPECT_EQ(-989, PowerSupply::linearToInteger(0x423)); in TEST_F()
2086 EXPECT_EQ(-1024, PowerSupply::linearToInteger(0x400)); in TEST_F()
2099 // M = 0, E = -1 in TEST_F()
2102 // M = 100, E = -2 in TEST_F()
2106 // M = -100, E = -1 in TEST_F()
2107 EXPECT_EQ(-50, PowerSupply::linearToInteger(0xFF9C)); in TEST_F()
2109 // M = -1024, E = -7 in TEST_F()
2110 EXPECT_EQ(-8, PowerSupply::linearToInteger(0xCC00)); in TEST_F()