Home
last modified time | relevance | path

Searched refs:devPath (Results 1 – 25 of 48) sorted by relevance

12

/openbmc/phosphor-buttons/src/
H A Dgpio.cpp155 std::string devPath{gpioDev}; in configGpio() local
161 devPath += "/gpio" + std::to_string(gpioNum) + "/value"; in configGpio()
163 fs::path fullPath(devPath); in configGpio()
167 lg2::info("GPIO exported: {PATH}", "PATH", devPath); in configGpio()
171 devPath = gpioDev + "/export"; in configGpio()
173 stream.open(devPath, std::fstream::out); in configGpio()
183 "PATH", devPath, "ERROR", e); in configGpio()
190 devPath = gpioDev + "/gpio" + std::to_string(gpioNum) + "/value"; in configGpio()
194 stream.open(devPath, std::fstream::in); in configGpio()
203 lg2::error("Error in reading {PATH}: {ERROR}", "PATH", devPath, in configGpio()
[all …]
H A Dcpld.cpp15 std::stringstream devPath; in getCpldDevPath() local
16 devPath << cpldDev << info.i2cBus << "-" << std::hex << std::setw(4) in getCpldDevPath()
18 return devPath.str(); in getCpldDevPath()
23 std::string devPath = getCpldDevPath(buttonIFConfig.cpld); in configCpld() local
25 auto fd = ::open(devPath.c_str(), O_RDONLY | O_NONBLOCK); in configCpld()
29 lg2::error("Open {PATH} error: {ERROR}", "PATH", devPath, "ERROR", in configCpld()
/openbmc/phosphor-logging/extensions/openpower-pels/
H A Ddevice_callouts.cpp97 std::tuple<size_t, uint8_t> getI2CSearchKeys(const std::string& devPath) in getI2CSearchKeys() argument
105 regex_search(devPath, match, regex); in getI2CSearchKeys()
109 std::string msg = "Could not get I2C bus and address from " + devPath; in getI2CSearchKeys()
126 std::string getFSISearchKeys(const std::string& devPath) in getFSISearchKeys() argument
130 auto search = devPath; in getFSISearchKeys()
149 std::string msg = "Could not get FSI links from " + devPath; in getFSISearchKeys()
160 const std::string& devPath) in getFSII2CSearchKeys() argument
164 auto links = getFSISearchKeys(devPath); in getFSII2CSearchKeys()
165 auto busAndAddr = getI2CSearchKeys(devPath); in getFSII2CSearchKeys()
170 size_t getSPISearchKeys(const std::string& devPath) in getSPISearchKeys() argument
[all …]
H A Ddevice_callouts.hpp103 const std::string& devPath, const std::vector<std::string>& compatibleList);
166 CalloutType getCalloutType(const std::string& devPath);
178 std::tuple<size_t, uint8_t> getI2CSearchKeys(const std::string& devPath);
191 std::string getFSISearchKeys(const std::string& devPath);
205 const std::string& devPath);
217 size_t getSPISearchKeys(const std::string& devPath);
230 std::tuple<std::string, size_t> getFSISPISearchKeys(const std::string& devPath);
/openbmc/estoraged/src/
H A Destoraged.cpp37 const std::string& devPath, const std::string& luksName, uint64_t size, in EStoraged() argument
44 devPath(devPath), containerName(luksName), in EStoraged()
52 std::string deviceName = std::filesystem::path(devPath).filename().string(); in EStoraged()
189 CryptErase myCryptErase(devPath); in erase()
195 VerifyDriveGeometry myVerifyGeometry(devPath); in erase()
201 Pattern myErasePattern(devPath); in erase()
207 Pattern myErasePattern(devPath); in erase()
213 Sanitize mySanitize(devPath); in erase()
219 Zero myZero(devPath); in erase()
225 Zero myZero(devPath); in erase()
[all …]
/openbmc/phosphor-hwmon/
H A Dsysfs.cpp89 fs::path devPath{instancePath}; in findCalloutPath() local
90 devPath /= "device"; in findCalloutPath()
94 devPath = fs::canonical(devPath); in findCalloutPath()
102 fs::path p{devPath}; in findCalloutPath()
110 return devPath; in findCalloutPath()
114 fs::path ofDevPath{devPath}; in findCalloutPath()
204 std::string findHwmonFromDevPath(const std::string& devPath) in findHwmonFromDevPath() argument
207 p /= fs::path(devPath).relative_path(); in findHwmonFromDevPath()
237 devPath.c_str()); in findHwmonFromDevPath()
H A Dtargets.hpp70 const std::string& devPath, ObjectInfo& info) in addTarget() argument
132 phosphor::logging::entry("DEVPATH=%s", devPath.c_str())); in addTarget()
155 metadata::CALLOUT_DEVICE_PATH(devPath.c_str())); in addTarget()
170 devPath, targetId, bus, objPath.c_str(), deferSignals, in addTarget()
/openbmc/phosphor-power/tools/power-utils/test/
H A Dtest_updater.cpp57 devPath = fs::path(tmpDir) / "i2c"; in setupDeviceSysfs()
60 fs::create_directories(devPath); in setupDeviceSysfs()
61 devPath /= "3-0068"; in setupDeviceSysfs()
62 fs::create_directory_symlink(realDevicePath, devPath); in setupDeviceSysfs()
73 fs::path devPath; member in TestUpdater
81 updater = std::make_unique<Updater>(psuInventoryPath, devPath, imageDir); in TEST_F()
86 updater = std::make_unique<Updater>(psuInventoryPath, devPath, imageDir); in TEST_F()
/openbmc/openpower-sbe-interface/
H A Dsbe_interfaces.cpp42 uint64_t read(const char* devPath, uint64_t address) in read() argument
47 if (devPath == nullptr) in read()
66 invokeSBEChipOperation(devPath, command, response); in read()
72 void write(const char* devPath, uint64_t address, uint64_t data) in write() argument
75 if (devPath == nullptr) in write()
98 invokeSBEChipOperation(devPath, command, response); in write()
H A Dsbe_chipOp_handler.cpp25 std::vector<sbe_word_t> writeToFifo(const char* devPath, in writeToFifo() argument
34 FileDescriptor fileFd(devPath, (O_RDWR | O_NONBLOCK)); in writeToFifo()
45 errMsg << "Waiting for FIFO device:" << devPath << "to write failed" in writeToFifo()
61 errMsg << "Failed to write to FIFO device:" << devPath in writeToFifo()
73 errMsg << "Waiting for FIFO device:" << devPath << "to read failed" in writeToFifo()
94 errMsg << "Failed to read the FIFO device:" << devPath in writeToFifo()
H A Dfile.hpp35 FileDescriptor(const char* devPath, int accessModes) in FileDescriptor() argument
37 fd = open(devPath, accessModes); in FileDescriptor()
42 errMsg << "Opening the device with device path:" << devPath in FileDescriptor()
H A Dsbe_chipOp_handler.hpp35 std::vector<sbe_word_t> writeToFifo(const char* devPath,
73 inline void invokeSBEChipOperation(const char* devPath, in invokeSBEChipOperation() argument
78 auto sbeFifoResp = internal::writeToFifo(devPath, request.data(), in invokeSBEChipOperation()
H A Dsbe_interfaces.hpp21 uint64_t read(const char* devPath, uint64_t address);
32 void write(const char* devPath, uint64_t address, uint64_t data);
/openbmc/phosphor-power/tools/power-utils/
H A Dupdater.cpp51 const std::string& devPath, const std::string& imageDir) in getClassInstance()
56 devPath, imageDir);
58 return std::make_unique<Updater>(psuInventoryPath, devPath, imageDir); in getFWFilenamePath()
187 auto devPath = utils::getDevicePath(bus, psuInventoryPath); in update()
189 if (devPath.empty()) in update()
197 fsPath.filename().string(), psuInventoryPath, devPath, imageDir); in update()
214 const std::string& devPath, const std::string& imageDir) : in Updater()
216 devPath(devPath), devName(utils::getDeviceName(devPath)), imageDi in Updater()
47 getClassInstance(const std::string & model,const std::string & psuInventoryPath,const std::string & devPath,const std::string & imageDir) getClassInstance() argument
183 auto devPath = utils::getDevicePath(bus, psuInventoryPath); update() local
210 Updater(const std::string & psuInventoryPath,const std::string & devPath,const std::string & imageDir) Updater() argument
[all...]
H A Dutils.cpp177 std::string getDeviceName(std::string devPath) in getDeviceName() argument
179 if (devPath.empty()) in getDeviceName()
181 return devPath; in getDeviceName()
183 if (devPath.back() == '/') in getDeviceName()
185 devPath.pop_back(); in getDeviceName()
187 return fs::path(devPath).stem().string(); in getDeviceName()
217 std::string devPath = DevicePath + busStr + "-" + addrStr; in getDevicePath() local
218 return devPath; in getDevicePath()
H A Dupdater.hpp70 * @param devPath - The PSU device path
73 Updater(const std::string& psuInventoryPath, const std::string& devPath,
120 return devPath; in getImageDir()
275 std::string devPath;
315 * @param[in] devPath - Device path
322 const std::string& devPath, const std::string& imageDir);
142 std::string devPath; global() member in updater::Updater
/openbmc/estoraged/include/
H A Dsanitize.hpp30 virtual int doIoctl(std::string_view devPath, unsigned long request,
40 virtual int doIoctlMulti(std::string_view devPath, unsigned long request,
56 int doIoctl(std::string_view devPath, unsigned long request,
58 int doIoctlMulti(std::string_view devPath, unsigned long request,
96 doSanitize(util::findSizeOfBlockDevice(devPath)); in doSanitize()
H A Dzero.hpp37 stdplus::fd::open(devPath, stdplus::fd::OpenAccess::WriteOnly); in writeZero()
38 writeZero(util::findSizeOfBlockDevice(devPath), fd); in writeZero()
54 stdplus::fd::open(devPath, stdplus::fd::OpenAccess::ReadOnly); in verifyZero()
55 verifyZero(util::findSizeOfBlockDevice(devPath), fd); in verifyZero()
H A Dpattern.hpp32 stdplus::fd::open(devPath, stdplus::fd::OpenAccess::WriteOnly); in writePattern()
33 writePattern(util::findSizeOfBlockDevice(devPath), fd); in writePattern()
50 stdplus::fd::open(devPath, stdplus::fd::OpenAccess::ReadOnly); in verifyPattern()
51 verifyPattern(util::findSizeOfBlockDevice(devPath), fd); in verifyPattern()
H A Derase.hpp15 Erase(std::string_view inDevPath) : devPath(inDevPath) {} in Erase()
19 std::string devPath; member in estoraged::Erase
/openbmc/phosphor-hwmon/test/
H A Dfanpwm_unittest.cpp58 std::string devPath = ""; in TEST() local
69 hwmon::FanPwm f(std::move(hwmonio_mock), devPath, id, bus_mock, in TEST()
83 std::string devPath = ""; in TEST() local
100 hwmon::FanPwm f(std::move(hwmonio_mock), devPath, id, bus_mock, in TEST()
112 std::string devPath = "devp"; in TEST() local
126 hwmon::FanPwm f(std::move(hwmonio_mock), devPath, id, bus_mock, in TEST()
156 std::string devPath = "devp"; in TEST() local
167 hwmon::FanPwm f(std::move(hwmonio_mock), devPath, id, bus_mock, in TEST()
/openbmc/estoraged/src/erase/
H A Dsanitize.cpp99 if (ioctlWrapper->doIoctlMulti(devPath, MMC_IOC_MULTI_CMD, eraseCmd) != 0) in emmcErase()
115 if (ioctlWrapper->doIoctl(devPath, MMC_IOC_CMD, idata) != 0) in emmcSanitize()
121 int IOCTLWrapperImpl::doIoctl(std::string_view devPath, unsigned long request, in doIoctl() argument
125 ManagedFd fd = stdplus::fd::open(std::string(devPath).c_str(), in doIoctl()
131 int IOCTLWrapperImpl::doIoctlMulti(std::string_view devPath, in doIoctlMulti() argument
135 ManagedFd fd = stdplus::fd::open(std::string(devPath).c_str(), in doIoctlMulti()
/openbmc/phosphor-bmc-code-mgmt/bmc/usb/
H A Dusb_manager.hpp30 explicit USBManager(sdbusplus::async::context& ctx, const fs::path& devPath, in USBManager() argument
32 ctx(ctx), devicePath(devPath), usbPath(usbPath) in USBManager()
52 const fs::path& devPath, const fs::path& usbPath) : in USBManager() argument
59 devicePath(devPath), usbPath(usbPath) in USBManager()
/openbmc/openpower-occ-control/
H A Docc_device.cpp19 auto activeFile = devPath / "occ_active"; in setActive()
26 lg2::error("Failed to set {DEVICE} active: {ERROR}", "DEVICE", devPath, in setActive()
66 auto filePath = devPath / fileName; in readBinary()
85 fs::path p = devPath; in errorCallback()
/openbmc/phosphor-led-sysfs/
H A Dadd_led_action.cpp9 static constexpr auto devPath = "/sys/class/leds/"; variable
13 if (!path.starts_with(devPath)) in rootPathVerify()
25 std::string led = path.substr(strlen(devPath)); in rootPathVerify()

12