From 71e200ab2bfcd9d2c3ef027798e13f98d1fc4ca2 Mon Sep 17 00:00:00 2001 From: George Hung Date: Thu, 3 Jun 2021 17:31:26 +0800 Subject: meta-quanta: gbs: remove the patch for phosphor-pid-control remove patch: - Add the ability to dynamically set the failSafe percent Signed-off-by: George Hung Change-Id: I3fdb60d288fb2fcf83928ba712a546f823849652 --- .../0001-Advertise-failSafePercent-on-dbus.patch | 117 --------------------- .../fans/phosphor-pid-control_%.bbappend | 1 - 2 files changed, 118 deletions(-) delete mode 100644 meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/0001-Advertise-failSafePercent-on-dbus.patch diff --git a/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/0001-Advertise-failSafePercent-on-dbus.patch b/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/0001-Advertise-failSafePercent-on-dbus.patch deleted file mode 100644 index 050c8b43c..000000000 --- a/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/0001-Advertise-failSafePercent-on-dbus.patch +++ /dev/null @@ -1,117 +0,0 @@ -From c9b6d4589620275a625121b0ea9f4cc4c93b608a Mon Sep 17 00:00:00 2001 -From: Ian Goegebuer -Date: Tue, 10 Nov 2020 14:20:47 -0800 -Subject: [PATCH] pid/zone: Add the ability to dynamically set the failSafe - percent - -This change advertises the failSafe percent as a FanSpeed interface -added to the the FanCtrl object generated by the config.json file. - -The target method added in this case sets the failSafePerecent -out of 255 with 255 being 100% and 0 being 0%. - -Example: -`busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone1 xyz.openbmc_project.Control.FanSpeed Target t 178` -Sets the failSafePercent to 69.8% or ~70% -`busctl set-property xyz.openbmc_project.State.FanCtrl /xyz/openbmc_project/settings/fanctrl/zone1 xyz.openbmc_project.Control.FanSpeed Target t 250` -Sets the failSafePercent to 98% - -Signed-off-by: Ian Goegebuer -Change-Id: Ief538d865dc1c654427ed9792496ab368e8803e2 ---- - pid/zone.cpp | 11 +++++++++++ - pid/zone.hpp | 11 +++++++++-- - pid/zone_interface.hpp | 1 + - 3 files changed, 21 insertions(+), 2 deletions(-) - -diff --git a/pid/zone.cpp b/pid/zone.cpp -index 441031a..24f6e84 100644 ---- a/pid/zone.cpp -+++ b/pid/zone.cpp -@@ -120,6 +120,11 @@ double DbusPidZone::getFailSafePercent(void) const - return _failSafePercent; - } - -+void DbusPidZone::setFailSafePercent(double newFailSafe) -+{ -+ _failSafePercent = newFailSafe; -+} -+ - double DbusPidZone::getMinThermalSetpoint(void) const - { - return _minThermalOutputSetPt; -@@ -459,4 +464,10 @@ bool DbusPidZone::failSafe() const - return getFailSafeMode(); - } - -+uint64_t DbusPidZone::target(uint64_t value) -+{ -+ setFailSafePercent(((double)value / 255) * 100.0); -+ return ModeObject::target(value); -+} -+ - } // namespace pid_control -diff --git a/pid/zone.hpp b/pid/zone.hpp -index 3bea9c2..c0d1d22 100644 ---- a/pid/zone.hpp -+++ b/pid/zone.hpp -@@ -10,6 +10,7 @@ - - #include - #include -+#include - #include - - #include -@@ -22,7 +23,9 @@ - template - using ServerObject = typename sdbusplus::server::object::object; - using ModeInterface = sdbusplus::xyz::openbmc_project::Control::server::Mode; --using ModeObject = ServerObject; -+using FanSpeedInterface = -+ sdbusplus::xyz::openbmc_project::Control::server::FanSpeed; -+using ModeObject = ServerObject; - - namespace pid_control - { -@@ -63,6 +66,7 @@ class DbusPidZone : public ZoneInterface, public ModeObject - void clearSetPoints(void) override; - void clearRPMCeilings(void) override; - double getFailSafePercent(void) const override; -+ void setFailSafePercent(double) override; - double getMinThermalSetpoint(void) const; - - Sensor* getSensor(const std::string& name) override; -@@ -88,6 +92,9 @@ class DbusPidZone : public ZoneInterface, public ModeObject - /* Method for reading whether in fail-safe mode over dbus */ - bool failSafe() const override; - -+ /* Method for setting the failSafePercent over dbus */ -+ uint64_t target(uint64_t value) override; -+ - private: - std::ofstream _log; - -@@ -95,7 +102,7 @@ class DbusPidZone : public ZoneInterface, public ModeObject - double _maximumSetPoint = 0; - bool _manualMode = false; - const double _minThermalOutputSetPt; -- const double _failSafePercent; -+ double _failSafePercent; - - std::set _failSafeSensors; - -diff --git a/pid/zone_interface.hpp b/pid/zone_interface.hpp -index a024c0e..9ea89c1 100644 ---- a/pid/zone_interface.hpp -+++ b/pid/zone_interface.hpp -@@ -70,6 +70,7 @@ class ZoneInterface - * fail safe. - */ - virtual double getFailSafePercent() const = 0; -+ virtual void setFailSafePercent(double newFailSafe) = 0; - - /** Return if the zone is set to manual mode. false equates to automatic - * mode (the default). --- -2.29.2.222.g5d2a92d10f8-goog diff --git a/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control_%.bbappend index 7acd44c70..e617f8679 100644 --- a/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control_%.bbappend +++ b/meta-quanta/meta-gbs/recipes-phosphor/fans/phosphor-pid-control_%.bbappend @@ -2,7 +2,6 @@ FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:" SRC_URI_append_gbs = " file://config.json.in \ file://fan-table-init.sh \ file://phosphor-pid-control.service \ - file://0001-Advertise-failSafePercent-on-dbus.patch \ " FILES_${PN}_append_gbs = " ${datadir}/swampd/config.json.in" -- cgit v1.2.3