#
90b0a66d |
| 13-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
dbusutil: use sdbusplus match rules
Rather than hand-rolling the match string, use the utilities supplied by sdbupslus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic4f0de7c9dbd3
dbusutil: use sdbusplus match rules
Rather than hand-rolling the match string, use the utilities supplied by sdbupslus.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic4f0de7c9dbd36d3f854dd1027f2826860814615
show more ...
|
#
23e22b90 |
| 13-Nov-2022 |
Josh Lehan <krellan@google.com> |
Add new PID Class types "power" and "powersum"
Implements this feature: https://github.com/openbmc/phosphor-pid-control/issues/24
In addition to the existing "temp" and "margin" classes, adding new
Add new PID Class types "power" and "powersum"
Implements this feature: https://github.com/openbmc/phosphor-pid-control/issues/24
In addition to the existing "temp" and "margin" classes, adding new "power" and "powersum" Class types.
The "power" class is the same as "temp", but expects D-Bus power sensors, instead of D-Bus temperature sensors.
The "powersum" class is the same as "power", but sums together all of the given inputs, instead of finding the maximum.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I11d8ad8385632658ed061671134be87a560cd02a
show more ...
|
#
22579ca4 |
| 07-Nov-2022 |
Harvey Wu <Harvey.Wu@quantatw.com> |
fix cppcheck warning
- Fix warnings: [noExplicitConstructor] ipmi/manualcmds.hpp:20:5: style: Class 'ZoneControlIpmiHandler' has a constructor with 1 argument that is not explicit.
[red
fix cppcheck warning
- Fix warnings: [noExplicitConstructor] ipmi/manualcmds.hpp:20:5: style: Class 'ZoneControlIpmiHandler' has a constructor with 1 argument that is not explicit.
[redundantInitialization] dbus/dbusutil.cpp:96:15: style: Redundant initialization for 'layer'. The initialized value is overwritten before it is read.
[uninitMemberVar] pid/pidcontroller.hpp:23:5: warning: Member variable 'PIDController::_pid_info' is not initialized in the constructor.
[memsetClassFloat] pid/util.cpp:29:10: portability: Using memset() on struct which contains a floating point number.
[constParameter] ipmi/manualcmds.cpp:108:72: style: Parameter 'dataLen' can be declared as pointer to const
Signed-off-by: Harvey Wu <Harvey.Wu@quantatw.com> Change-Id: Ib368c6e3a609e446529573cd0b9fa03858232db1
show more ...
|
#
f2efcbbd |
| 08-Feb-2022 |
Harvey.Wu <Harvey.Wu@quantatw.com> |
Using readPath dbuspath in getMatch function
- If the "name" setting is not same as dbus sensor name, it has problem when getMatch function.
For example: if json setting like below, { "name":
Using readPath dbuspath in getMatch function
- If the "name" setting is not same as dbus sensor name, it has problem when getMatch function.
For example: if json setting like below, { "name": "fan00", "type": "fan", "readPath": "/xyz/openbmc_project/sensors/fan_tach/fan0_tach", "writePath": "/xyz/openbmc_project/sensors/fan_tach/fan0_pwm", "min": 0, "max": 255 }
the swampd will start failed, log like below, swampd[17273]: Sensor: fan00 fan /xyz/openbmc_project/sensors/fan_tach/fan0_tach /xyz/openbmc_project/sensors/fan_tach/fan0_pwm swampd[17273]: ObjectMapper call failure
Signed-off-by: Harvey.Wu <Harvey.Wu@quantatw.com> Change-Id: I08cd374ea7447148e4aeff7b06b288957260cbd2
show more ...
|
#
7a8d5a17 |
| 21-Oct-2020 |
Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> |
Fix regex in findSensors
swampd crashs while reading configuration. Root caused that it is introduced by incorrect finding sensors. For an example, when it searches 'Fan_1' for inputs, it finds thes
Fix regex in findSensors
swampd crashs while reading configuration. Root caused that it is introduced by incorrect finding sensors. For an example, when it searches 'Fan_1' for inputs, it finds these two sensors:
Fan_1 Pwm_PSU1_Fan_1
where 'Pwm_PSU1_Fan_1' is an unexpected search result, so it causes crash after printing out this message:
"sensor at dbus path [/xyz/openbmc_project/control/fanpwm/Pwm_PSU1_Fan_1] has an interface [xyz.openbmc_project.Control.FanPwm] that does not match the expected interface of xyz.openbmc_project.Sensor.Value"
To fix this issue, this commit modifies regex string in findSensors function. Unit test is updated to reflect the new behavior.
Tested: The crash was not observed. Updated unit test passed.
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com> Change-Id: I4e45fac3a3242a6f3655d6873fd63ef22fd0c4dd
show more ...
|
#
b8cfc642 |
| 07-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: move zone indexing to util
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia6560a0e0f976dcf9f05004de68f74f5e313950b
|
#
1a7c49f9 |
| 06-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: Move findSensors to dbus util
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2ba4d3c430200eb58cb4364dcce694a080531846
|
#
8b4478cc |
| 06-Oct-2020 |
Patrick Venture <venture@google.com> |
dbus: add unit-tests for dbusutil: getSensorPath
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iabb2df7a725da1b70cb6a907d19c451e7bba609d
|
#
3e2f7581 |
| 21-Sep-2020 |
Josh Lehan <krellan@google.com> |
dbuspassive: Input processing cleanup and allow "margin"
The sensor input processing steps have been cleaned up, consolidating code duplicated in two places into one. The new "updateValue" function
dbuspassive: Input processing cleanup and allow "margin"
The sensor input processing steps have been cleaned up, consolidating code duplicated in two places into one. The new "updateValue" function does the processing, then calls "setValue" to set it, if it was acceptable.
Initialization of sensor value now uses the same processing path as regular sensor updates, solving a strange discontinuity seen at initialization, where the values had wrong scaling, until the first asynchronous D-Bus sensor update was received.
Also cleaned up handling of floating-point NAN received, which has same meaning as old -1 sentinel value, as used back when the D-Bus schema was integer millidegrees.
Sensors of type "margin" are now accepted, as they are now processed correctly.
Adding new member "_typeMargin" flag to remember margin type, avoiding repeated string computation. Adding new member "_badReading" flag to track the case in which sensor reading is working but gave us bad reading, such as NAN, as this situation differs from already-existing "_failed" flag. Adding new member "_marginHot" flag to request failsafe mode, even though sensor is functional and reading is good, because if we have ran out of margin, PID is not doing the job, and thus we need failsafe mode, to make sure fans spin fast.
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: Ia6e2f58967f58ae2999489e3e9342388f7b5fb1a
show more ...
|
#
91fe17f6 |
| 21-Sep-2020 |
Josh Lehan <krellan@google.com> |
dbusutil: Fix critical bug in scaleSensorReading
If minimum value is not 0, as is common with temperature sensors of (-128,127) range, the computed scaled value was wildly incorrect, because there w
dbusutil: Fix critical bug in scaleSensorReading
If minimum value is not 0, as is common with temperature sensors of (-128,127) range, the computed scaled value was wildly incorrect, because there was a missing step in the math.
Tested: Scaled values now appear correct to me
Signed-off-by: Josh Lehan <krellan@google.com> Change-Id: I71290538168e17ac9ebb78489d359f012fbf8517
show more ...
|
#
aadb30dd |
| 10-Aug-2020 |
Patrick Venture <venture@google.com> |
move dbus helper interface into its own file
This is step 1 to improving the interface to be more generic and drop requirements on dbus.
Signed-off-by: Patrick Venture <venture@google.com> Change-I
move dbus helper interface into its own file
This is step 1 to improving the interface to be more generic and drop requirements on dbus.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I7835ea8242bfb7189cabc1a4084e5f84143d40f6
show more ...
|