summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--occ_pass_through.cpp3
-rw-r--r--occ_pass_through.hpp9
2 files changed, 10 insertions, 2 deletions
diff --git a/occ_pass_through.cpp b/occ_pass_through.cpp
index 25f3edf..05864c1 100644
--- a/occ_pass_through.cpp
+++ b/occ_pass_through.cpp
@@ -3,7 +3,6 @@
#include <phosphor-logging/log.hpp>
#include "occ_pass_through.hpp"
#include "occ_finder.hpp"
-
namespace open_power
{
namespace occ
@@ -41,7 +40,7 @@ PassThrough::PassThrough(
Iface(bus, path),
path(path)
{
- // Nothing
+ devicePath.append(std::to_string((this->path.back() - '0') + 1));
}
std::vector<int32_t> PassThrough::send(std::vector<int32_t> command)
diff --git a/occ_pass_through.hpp b/occ_pass_through.hpp
index 835241f..da8c617 100644
--- a/occ_pass_through.hpp
+++ b/occ_pass_through.hpp
@@ -62,6 +62,15 @@ class PassThrough : public Iface
private:
/** @brief Pass-through occ path on the bus */
std::string path;
+
+ /** @brief OCC device path
+ * For now, here is the hard-coded mapping until
+ * the udev rule is in
+ * occ0 --> /dev/occfifo1
+ * occ1 --> /dev/occfifo2
+ * ...
+ */
+ std::string devicePath = "/dev/occfifo";
};
} // namespace pass_through
OpenPOWER on IntegriCloud