Refactor: rename namespace witherspoon to phosphor
This repo now becomes phosphor-power, rename namespace witherspoon to
phosphor to make it generic.
Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Icb9f8a7c33065add99f2bf42ed55745a28fa0424
diff --git a/power-supply/argument.cpp b/power-supply/argument.cpp
index 342515c..7b671d8 100644
--- a/power-supply/argument.cpp
+++ b/power-supply/argument.cpp
@@ -20,7 +20,7 @@
#include <iostream>
#include <iterator>
-namespace witherspoon
+namespace phosphor
{
namespace power
{
@@ -99,4 +99,4 @@
const std::string ArgumentParser::emptyString = "";
} // namespace power
-} // namespace witherspoon
+} // namespace phosphor
diff --git a/power-supply/average.hpp b/power-supply/average.hpp
index a61a436..5fdf0b8 100644
--- a/power-supply/average.hpp
+++ b/power-supply/average.hpp
@@ -2,7 +2,7 @@
#include <functional>
#include <org/open_power/Sensor/Aggregation/History/Average/server.hpp>
-namespace witherspoon
+namespace phosphor
{
namespace power
{
@@ -51,4 +51,4 @@
} // namespace history
} // namespace power
-} // namespace witherspoon
+} // namespace phosphor
diff --git a/power-supply/main.cpp b/power-supply/main.cpp
index 93b4b77..ccb56e7 100644
--- a/power-supply/main.cpp
+++ b/power-supply/main.cpp
@@ -23,7 +23,7 @@
#include <phosphor-logging/log.hpp>
#include <sdeventplus/event.hpp>
-using namespace witherspoon::power;
+using namespace phosphor::power;
using namespace phosphor::logging;
int main(int argc, char* argv[])
diff --git a/power-supply/maximum.hpp b/power-supply/maximum.hpp
index d952d2b..68d3d03 100644
--- a/power-supply/maximum.hpp
+++ b/power-supply/maximum.hpp
@@ -2,7 +2,7 @@
#include <functional>
#include <org/open_power/Sensor/Aggregation/History/Maximum/server.hpp>
-namespace witherspoon
+namespace phosphor
{
namespace power
{
@@ -51,4 +51,4 @@
} // namespace history
} // namespace power
-} // namespace witherspoon
+} // namespace phosphor
diff --git a/power-supply/power_supply.cpp b/power-supply/power_supply.cpp
index 0758d2a..0a5c9cc 100644
--- a/power-supply/power_supply.cpp
+++ b/power-supply/power_supply.cpp
@@ -29,7 +29,7 @@
#include <xyz/openbmc_project/Common/Device/error.hpp>
#include <xyz/openbmc_project/Software/Version/server.hpp>
-namespace witherspoon
+namespace phosphor
{
namespace power
{
@@ -84,7 +84,7 @@
getAccessType();
using namespace sdbusplus::bus;
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
std::uint16_t statusWord = 0;
try
{
@@ -121,8 +121,8 @@
void PowerSupply::getAccessType()
{
- using namespace witherspoon::pmbus;
- using namespace witherspoon::power::util;
+ using namespace phosphor::pmbus;
+ using namespace phosphor::power::util;
fruJson = loadJSONFromFile(PSU_JSON_PATH);
if (fruJson == nullptr)
{
@@ -155,7 +155,7 @@
}
void PowerSupply::captureCmd(util::NamesValues& nv, const std::string& cmd,
- witherspoon::pmbus::Type type)
+ phosphor::pmbus::Type type)
{
if (pmbusIntf.exists(cmd, type))
{
@@ -174,7 +174,7 @@
void PowerSupply::analyze()
{
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
try
{
@@ -313,7 +313,7 @@
void PowerSupply::checkInputFault(const uint16_t statusWord)
{
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
if ((inputFault < FAULT_COUNT) &&
((statusWord & status_word::INPUT_FAULT_WARN) ||
@@ -382,7 +382,7 @@
void PowerSupply::checkPGOrUnitOffFault(const uint16_t statusWord)
{
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
if (powerOnFault < FAULT_COUNT)
{
@@ -428,7 +428,7 @@
void PowerSupply::checkCurrentOutOverCurrentFault(const uint16_t statusWord)
{
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
if (outputOCFault < FAULT_COUNT)
{
@@ -469,7 +469,7 @@
void PowerSupply::checkOutputOvervoltageFault(const uint16_t statusWord)
{
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
if (outputOVFault < FAULT_COUNT)
{
@@ -510,7 +510,7 @@
void PowerSupply::checkFanFault(const uint16_t statusWord)
{
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
if (fanFault < FAULT_COUNT)
{
@@ -549,7 +549,7 @@
void PowerSupply::checkTemperatureFault(const uint16_t statusWord)
{
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
// Due to how the PMBus core device driver sends a clear faults command
// the bit in STATUS_WORD will likely be cleared when we attempt to examine
@@ -674,7 +674,7 @@
void PowerSupply::updateInventory()
{
- using namespace witherspoon::pmbus;
+ using namespace phosphor::pmbus;
using namespace sdbusplus::message;
// Build the object map and send it to the inventory
@@ -769,7 +769,7 @@
void PowerSupply::syncHistory()
{
- using namespace witherspoon::gpio;
+ using namespace phosphor::gpio;
if (syncGPIODevPath.empty())
{
@@ -839,4 +839,4 @@
} // namespace psu
} // namespace power
-} // namespace witherspoon
+} // namespace phosphor
diff --git a/power-supply/power_supply.hpp b/power-supply/power_supply.hpp
index 0968a78..e292ca2 100644
--- a/power-supply/power_supply.hpp
+++ b/power-supply/power_supply.hpp
@@ -12,7 +12,7 @@
#include <sdeventplus/event.hpp>
#include <sdeventplus/utility/timer.hpp>
-namespace witherspoon
+namespace phosphor
{
namespace power
{
@@ -107,7 +107,7 @@
* that a device driver monitors the PMBus interface to the power
* supplies.
*/
- witherspoon::pmbus::PMBus pmbusIntf;
+ phosphor::pmbus::PMBus pmbusIntf;
/**
* @brief D-Bus path to use for this power supply's inventory status.
@@ -265,7 +265,7 @@
/**
* @brief The type of the power supply inventory pmbus access.
*/
- witherspoon::pmbus::Type inventoryPMBusAccessType;
+ phosphor::pmbus::Type inventoryPMBusAccessType;
/**
* @brief The JSON from the parsed power supply FRU JSON File.
@@ -322,7 +322,7 @@
* @param[in] type - The type of file to read the command from.
*/
void captureCmd(util::NamesValues& nv, const std::string& cmd,
- witherspoon::pmbus::Type type);
+ phosphor::pmbus::Type type);
/**
* @brief Checks for input voltage faults and logs error if needed.
@@ -430,4 +430,4 @@
} // namespace psu
} // namespace power
-} // namespace witherspoon
+} // namespace phosphor
diff --git a/power-supply/record_manager.cpp b/power-supply/record_manager.cpp
index b585ba0..3ff655b 100644
--- a/power-supply/record_manager.cpp
+++ b/power-supply/record_manager.cpp
@@ -20,7 +20,7 @@
#include <chrono>
#include <phosphor-logging/log.hpp>
-namespace witherspoon
+namespace phosphor
{
namespace power
{
@@ -183,4 +183,4 @@
} // namespace history
} // namespace power
-} // namespace witherspoon
+} // namespace phosphor
diff --git a/power-supply/record_manager.hpp b/power-supply/record_manager.hpp
index 7ebcc3f..244ab3e 100644
--- a/power-supply/record_manager.hpp
+++ b/power-supply/record_manager.hpp
@@ -4,7 +4,7 @@
#include <tuple>
#include <vector>
-namespace witherspoon
+namespace phosphor
{
namespace power
{
@@ -196,4 +196,4 @@
} // namespace history
} // namespace power
-} // namespace witherspoon
+} // namespace phosphor
diff --git a/power-supply/test/test_records.cpp b/power-supply/test/test_records.cpp
index e500322..dbf5b06 100644
--- a/power-supply/test/test_records.cpp
+++ b/power-supply/test/test_records.cpp
@@ -20,7 +20,7 @@
#include <gtest/gtest.h>
-using namespace witherspoon::power::history;
+using namespace phosphor::power::history;
/**
* Test the linearToInteger function with different