Home
last modified time | relevance | path

Searched refs:i2cInterface (Results 1 – 25 of 42) sorted by relevance

12

/openbmc/phosphor-power/phosphor-regulators/test/actions/
H A Di2c_write_bit_action_tests.cpp94 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
96 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
97 EXPECT_CALL(*i2cInterface, read(0xA0, A<uint8_t&>())) in TEST()
100 EXPECT_CALL(*i2cInterface, in TEST()
108 std::move(i2cInterface)}; in TEST()
129 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
131 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
132 EXPECT_CALL(*i2cInterface, read(0x7C, A<uint8_t&>())) in TEST()
135 EXPECT_CALL(*i2cInterface, in TEST()
143 std::move(i2cInterface)}; in TEST()
[all …]
H A Di2c_compare_byte_action_tests.cpp66 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
68 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
69 EXPECT_CALL(*i2cInterface, read(0xA0, A<uint8_t&>())) in TEST()
77 std::move(i2cInterface)}; in TEST()
98 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
100 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
101 EXPECT_CALL(*i2cInterface, read(0xA0, A<uint8_t&>())) in TEST()
109 std::move(i2cInterface)}; in TEST()
127 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
129 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
[all …]
H A Di2c_write_byte_action_tests.cpp67 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
69 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
70 EXPECT_CALL(*i2cInterface, read(A<uint8_t>(), A<uint8_t&>())).Times(0); in TEST()
71 EXPECT_CALL(*i2cInterface, in TEST()
79 std::move(i2cInterface)}; in TEST()
97 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
99 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
100 EXPECT_CALL(*i2cInterface, read(0xA0, A<uint8_t&>())) in TEST()
103 EXPECT_CALL(*i2cInterface, in TEST()
111 std::move(i2cInterface)}; in TEST()
[all …]
H A Di2c_action_tests.cpp63 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
65 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(false)); in TEST()
66 EXPECT_CALL(*i2cInterface, open).Times(1); in TEST()
72 std::move(i2cInterface)}; in TEST()
91 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
93 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
94 EXPECT_CALL(*i2cInterface, open).Times(0); in TEST()
100 std::move(i2cInterface)}; in TEST()
142 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
144 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(false)); in TEST()
[all …]
H A Di2c_capture_bytes_action_tests.cpp78 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
81 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
82 EXPECT_CALL(*i2cInterface, read(0xA0, TypedEq<uint8_t&>(1), NotNull(), in TEST()
91 std::move(i2cInterface)}; in TEST()
112 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
115 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
116 EXPECT_CALL(*i2cInterface, read(0x7C, TypedEq<uint8_t&>(3), NotNull(), in TEST()
125 std::move(i2cInterface)}; in TEST()
147 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
152 EXPECT_CALL(*i2cInterface, isOpen) in TEST()
[all …]
H A Dpmbus_write_vout_command_action_tests.cpp116 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
118 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
119 EXPECT_CALL(*i2cInterface, read(A<uint8_t>(), A<uint8_t&>())).Times(0); in TEST()
120 EXPECT_CALL(*i2cInterface, in TEST()
123 EXPECT_CALL(*i2cInterface, read(TypedEq<uint8_t>(0x21), A<uint16_t&>())) in TEST()
131 std::move(i2cInterface)}; in TEST()
159 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
161 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
162 EXPECT_CALL(*i2cInterface, read(TypedEq<uint8_t>(0x20), A<uint8_t&>())) in TEST()
165 EXPECT_CALL(*i2cInterface, in TEST()
[all …]
H A Dpmbus_read_sensor_action_tests.cpp93 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
95 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
96 EXPECT_CALL(*i2cInterface, read(TypedEq<uint8_t>(0x8C), A<uint16_t&>())) in TEST()
99 EXPECT_CALL(*i2cInterface, read(A<uint8_t>(), A<uint8_t&>())).Times(0); in TEST()
110 std::move(i2cInterface)}; in TEST()
140 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
142 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
143 EXPECT_CALL(*i2cInterface, read(TypedEq<uint8_t>(0x8B), A<uint16_t&>())) in TEST()
146 EXPECT_CALL(*i2cInterface, read(A<uint8_t>(), A<uint8_t&>())).Times(0); in TEST()
157 std::move(i2cInterface)}; in TEST()
[all …]
H A Di2c_write_bytes_action_tests.cpp155 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
157 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
158 EXPECT_CALL(*i2cInterface, in TEST()
162 EXPECT_CALL(*i2cInterface, in TEST()
171 std::move(i2cInterface)}; in TEST()
190 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
193 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
194 EXPECT_CALL(*i2cInterface, read(0xA0, TypedEq<uint8_t&>(2), NotNull(), in TEST()
198 EXPECT_CALL(*i2cInterface, in TEST()
207 std::move(i2cInterface)}; in TEST()
[all …]
H A Di2c_compare_bytes_action_tests.cpp155 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
158 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
159 EXPECT_CALL(*i2cInterface, read(0xA0, TypedEq<uint8_t&>(2), NotNull(), in TEST()
168 std::move(i2cInterface)}; in TEST()
191 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
194 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
195 EXPECT_CALL(*i2cInterface, read(0x7C, TypedEq<uint8_t&>(3), NotNull(), in TEST()
204 std::move(i2cInterface)}; in TEST()
223 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
226 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
[all …]
H A Di2c_compare_bit_action_tests.cpp93 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
95 EXPECT_CALL(*i2cInterface, isOpen).WillRepeatedly(Return(true)); in TEST()
96 EXPECT_CALL(*i2cInterface, read(0x7C, A<uint8_t&>())) in TEST()
103 std::move(i2cInterface)}; in TEST()
175 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
177 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
178 EXPECT_CALL(*i2cInterface, read(0x7C, A<uint8_t&>())) in TEST()
187 std::move(i2cInterface)}; in TEST()
H A Dcompare_presence_action_tests.cpp55 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
63 std::move(i2cInterface)}; in TEST()
101 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
109 std::move(i2cInterface)}; in TEST()
147 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
155 std::move(i2cInterface)}; in TEST()
H A Dset_device_action_tests.cpp47 std::unique_ptr<i2c::I2CInterface> i2cInterface = in TEST() local
52 std::move(i2cInterface)}; in TEST()
56 i2cInterface = in TEST()
61 std::move(i2cInterface)}; in TEST()
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/mps/
H A Dmp297x.cpp108 if (!i2cInterface.sendReceive(tbuf, rbuf)) in checkId()
116 if (!i2cInterface.sendReceive(tbuf, rbuf)) in checkId()
145 if (!i2cInterface.sendReceive(tbuf, rbuf)) in isPasswordUnlock()
154 if (!i2cInterface.sendReceive(tbuf, rbuf)) in isPasswordUnlock()
179 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
186 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
197 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
204 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
240 if (!i2cInterface.sendReceive(tbuf, rbuf)) in programPageRegisters()
255 if (i2cInterface.sendReceive(tbuf, rbuf)) in programPageRegisters()
[all …]
H A Dmpx9xx.cpp149 if (!i2cInterface.sendReceive(tbuf, rbuf)) in checkId()
157 if (!i2cInterface.sendReceive(tbuf, rbuf)) in checkId()
183 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
190 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
211 if (!i2cInterface.sendReceive(tbuf, rbuf)) in disableStoreFaultTriggering()
219 if (!i2cInterface.sendReceive(tbuf, rbuf)) in disableStoreFaultTriggering()
228 if (!i2cInterface.sendReceive(tbuf, rbuf)) in disableStoreFaultTriggering()
236 if (!i2cInterface.sendReceive(tbuf, rbuf)) in disableStoreFaultTriggering()
245 if (!i2cInterface.sendReceive(tbuf, rbuf)) in disableStoreFaultTriggering()
278 if (!i2cInterface.sendReceive(tbuf, rbuf)) in setMultiConfigAddress()
[all …]
H A Dmp5998.cpp90 if (!i2cInterface.sendReceive(tbuf, rbuf)) in checkId()
116 if (!i2cInterface.sendReceive(tbuf, rbuf)) in checkId()
151 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockPasswordProtection()
158 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockPasswordProtection()
166 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockPasswordProtection()
183 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtection()
190 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtection()
211 if (!i2cInterface.sendReceive(tbuf, rbuf)) in programAllRegisters()
229 if (!i2cInterface.sendReceive(tbuf, rbuf)) in programAllRegisters()
247 if (!i2cInterface.sendReceive(tbuf, rbuf)) in storeMTP()
[all …]
H A Dmp2x6xx.cpp129 if (!i2cInterface.sendReceive(tbuf, rbuf)) in checkId()
138 if (!i2cInterface.sendReceive(tbuf, rbuf)) in checkId()
163 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
170 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
178 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
186 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
194 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
202 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockWriteProtect()
223 if (!i2cInterface.sendReceive(tbuf, rbuf)) in selectConfig()
235 if (!i2cInterface.sendReceive(tbuf, rbuf)) in selectConfig()
[all …]
/openbmc/phosphor-power/phosphor-regulators/test/
H A Ddevice_tests.cpp98 std::unique_ptr<i2c::I2CInterface> i2cInterface = createI2CInterface(); in TEST_F() local
99 i2c::I2CInterface* i2cInterfacePtr = i2cInterface.get(); in TEST_F()
100 Device device{"vdd_reg", true, deviceInvPath, std::move(i2cInterface)}; in TEST_F()
114 std::unique_ptr<i2c::I2CInterface> i2cInterface = createI2CInterface(); in TEST_F() local
115 i2c::I2CInterface* i2cInterfacePtr = i2cInterface.get(); in TEST_F()
148 std::move(i2cInterface), in TEST_F()
225 std::unique_ptr<i2c::I2CInterface> i2cInterface = createI2CInterface(); in TEST_F() local
226 Device device{"reg2", true, deviceInvPath, std::move(i2cInterface), in TEST_F()
272 auto i2cInterface = std::make_unique<i2c::MockedI2CInterface>(); in TEST_F() local
280 std::move(i2cInterface), in TEST_F()
[all …]
H A Dchassis_tests.cpp156 auto i2cInterface = std::make_unique<i2c::MockedI2CInterface>(); in TEST_F() local
160 std::move(i2cInterface), std::move(presenceDetection)); in TEST_F()
197 auto i2cInterface = std::make_unique<i2c::MockedI2CInterface>(); in TEST_F() local
206 std::move(i2cInterface), std::move(presenceDetection), in TEST_F()
291 auto i2cInterface = std::make_unique<i2c::MockedI2CInterface>(); in TEST_F() local
292 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST_F()
293 EXPECT_CALL(*i2cInterface, close).Times(1); in TEST_F()
300 std::move(i2cInterface)); in TEST_F()
307 auto i2cInterface = std::make_unique<i2c::MockedI2CInterface>(); in TEST_F() local
308 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST_F()
[all …]
H A Dconfiguration_tests.cpp101 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
103 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
104 EXPECT_CALL(*i2cInterface, in TEST()
121 std::move(i2cInterface), std::move(presenceDetection), in TEST()
162 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
164 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
165 EXPECT_CALL(*i2cInterface, in TEST()
181 std::move(i2cInterface), std::move(presenceDetection), in TEST()
226 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in TEST() local
228 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
[all …]
H A Dsensor_monitoring_tests.cpp84 std::unique_ptr<i2c::MockedI2CInterface> i2cInterface = in createParentObjects() local
86 i2c::MockedI2CInterface* i2cInterfacePtr = i2cInterface.get(); in createParentObjects()
97 std::move(i2cInterface), std::move(presenceDetection), in createParentObjects()
146 auto [system, chassis, device, i2cInterface, rail] = in TEST()
150 EXPECT_CALL(*i2cInterface, isOpen).WillRepeatedly(Return(true)); in TEST()
151 EXPECT_CALL(*i2cInterface, read(TypedEq<uint8_t>(0x8C), A<uint16_t&>())) in TEST()
222 auto [system, chassis, device, i2cInterface, rail] = in TEST()
226 EXPECT_CALL(*i2cInterface, isOpen).Times(1).WillOnce(Return(true)); in TEST()
227 EXPECT_CALL(*i2cInterface, read(TypedEq<uint8_t>(0x8C), A<uint16_t&>())) in TEST()
264 auto [system, chassis, device, i2cInterface, rail] = in TEST()
[all …]
H A Did_map_tests.cpp39 std::unique_ptr<i2c::I2CInterface> i2cInterface = in TEST() local
45 std::move(i2cInterface)}; in TEST()
71 i2cInterface = in TEST()
76 std::move(i2cInterface)}; in TEST()
178 std::unique_ptr<i2c::I2CInterface> i2cInterface = in TEST() local
184 std::move(i2cInterface)}; in TEST()
/openbmc/phosphor-power/phosphor-regulators/src/
H A Ddevice.hpp69 std::unique_ptr<i2c::I2CInterface> i2cInterface, in Device() argument
76 i2cInterface{std::move(i2cInterface)},
179 return *i2cInterface; in getI2CInterface()
287 std::unique_ptr<i2c::I2CInterface> i2cInterface{}; member in phosphor::power::regulators::Device
/openbmc/phosphor-bmc-code-mgmt/i2c-vr/tda38640a/
H A Dtda38640a.cpp57 VoltageRegulator(ctx), i2cInterface(phosphor::i2c::I2C(bus, address)) in TDA38640A()
74 if (!i2cInterface.sendReceive(tbuf, rbuf)) in getUserRemainingWrites()
92 if (!i2cInterface.sendReceive(tbuf, rbuf)) in setPage()
113 if (!i2cInterface.sendReceive(tbuf, rbuf)) in getDeviceRevision()
139 if (!i2cInterface.sendReceive(tbuf, rbuf)) in getCRC()
148 if (!i2cInterface.sendReceive(tbuf, rbuf)) in getCRC()
242 if (!i2cInterface.sendReceive(tbuf, rbuf)) in unlockDevice()
263 if (!i2cInterface.sendReceive(tbuf, rbuf)) in programmingCmd()
271 if (!i2cInterface.sendReceive(tbuf, rbuf)) in programmingCmd()
286 if (!i2cInterface.sendReceive(tbuf, rbuf)) in getProgStatus()
[all …]
/openbmc/phosphor-power/tools/power-utils/
H A Daei_updater.cpp75 i2cInterface = Updater::getI2C(); in doUpdate()
77 if (i2cInterface == nullptr) in doUpdate()
203 i2cInterface->write(KEY_REGISTER, unlockData.size(), in writeIspKey()
243 i2cInterface->write(STATUS_REGISTER, CMD_BOOT_ISP); in writeIspMode()
247 i2cInterface->read(STATUS_REGISTER, ispStatus); in writeIspMode()
316 i2cInterface->write(STATUS_REGISTER, in writeIspStatusReset()
360 i2cInterface->read(STATUS_REGISTER, ispStatus); in writeIspStatusReset()
367 i2cInterface->write(STATUS_REGISTER, in writeIspStatusReset()
625 i2cInterface->processCall(regAddr, cmdBlockWrite.size(), in performI2cWriteRead()
640 i2cInterface->read(STATUS_REGISTER, status); in verifyDownloadFWStatus()
[all …]
/openbmc/phosphor-bmc-code-mgmt/cpld/lattice/
H A Dlattice_xo3_cpld.cpp16 if (!i2cInterface.sendReceive(request, response)) in readDeviceId()
99 if (!i2cInterface.sendReceive(request, response)) in eraseFlash()
180 if (!i2cInterface.sendReceive(request, response)) in readUserCode()
202 if (!i2cInterface.sendReceive(request, response)) in programUserCode()
311 bool success = co_await i2cInterface.sendReceive( in programSinglePage()
324 success = co_await i2cInterface.sendReceive(writeCmd.data(), in programSinglePage()
353 if (!i2cInterface.sendReceive(setPageAddrCmd, emptyResp)) in verifySinglePage()
364 if (!i2cInterface.sendReceive(readCmd, readData)) in verifySinglePage()

12