History log of /openbmc/phosphor-fan-presence/control/main.cpp (Results 1 – 25 of 28)
Revision Date Author Comments
# dfddd648 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: Ica590f8613f1fb89ab1ca676ac51c1cc7e38d67f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 854abad4 15-Aug-2023 George Liu <liuxiwei@inspur.com>

control: Replace Argument class with CLI11

Phosphor-fan already depends on cli11, delete Argument class and use
cli11 instead.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I4f4283f2d1

control: Replace Argument class with CLI11

Phosphor-fan already depends on cli11, delete Argument class and use
cli11 instead.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I4f4283f2d1c9a096a921814156ba81fea72eab34

show more ...


# 27f5f4e9 01-Sep-2022 Matt Spinler <spinler@us.ibm.com>

control: Remove the sdevent defer redirect on USR1

The signal handler provided by sdeventplus already calls the provided
callback function from the event loop, there is no need to use a 'defer'
even

control: Remove the sdevent defer redirect on USR1

The signal handler provided by sdeventplus already calls the provided
callback function from the event loop, there is no need to use a 'defer'
event source that also just calls a function from the event loop.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ie51c6abc9260a8fc43b13844356c62080835ea38

show more ...


# bf8e56f6 29-Jun-2022 Mike Capps <mikepcapps@gmail.com>

meson support: configuration option removal

D-Bus names and paths that were previously configurable at build-time
are now hard-coded and moved to dbus_paths.hpp to reduce the number of
configure-tim

meson support: configuration option removal

D-Bus names and paths that were previously configurable at build-time
are now hard-coded and moved to dbus_paths.hpp to reduce the number of
configure-time options and simplify maintenance.

Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Change-Id: I16d88daad90e747cc40d87c853874b1a5fedf5fa

show more ...


# a081956f 13-Jun-2022 Mike Capps <mikepcapps@gmail.com>

meson support: create meson.build files

This commit contains the meson.build files necessary to build the
project and unit tests. The normal procedure is to run the command
'meson build' followed by

meson support: create meson.build files

This commit contains the meson.build files necessary to build the
project and unit tests. The normal procedure is to run the command
'meson build' followed by ninja -C build. Additionally, service files
are copied to remove autoconf-style naming convention (they cannot be
removed before autoconf files are removed).

Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6cf8f5c1c923a198ad2fb4638843645479fd0498

show more ...


# b2e9a4fc 13-Jun-2022 Mike Capps <mikepcapps@gmail.com>

meson support: remove code warnings 2

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.
to keep the review

meson support: remove code warnings 2

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.
to keep the review size manageable, this commit contains only control
changes (plus one in sensor-monitor).

Change-Id: Ie20f1d9028add4b605e4cc9fb230940710365706
Signed-off-by: Mike Capps <mikepcapps@gmail.com>

show more ...


# 7787def0 14-Oct-2021 Matt Spinler <spinler@us.ibm.com>

control: Dump flight recorder to a JSON file

A future commit will dump more debug data as opposed to just the flight
recorder. To better support the data all being in the same file, it
will be a JS

control: Dump flight recorder to a JSON file

A future commit will dump more debug data as opposed to just the flight
recorder. To better support the data all being in the same file, it
will be a JSON file. The first step of that is to write the flight
recorder output to a JSON file.

This also reorganizes the Manager code that does it to prepare for
different data also being in the same file.

An example is:
{
"flight_recorder": [
"Oct 06 05:59:01.183998: main: Startup"
]
}

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iaeb55ffde3a30c2345968e1b3fad313b50aff331

show more ...


# 3ac99025 04-Oct-2021 Matt Spinler <spinler@us.ibm.com>

control: Dump flight recorder on abnormal exit

Fan control throws exceptions when something goes wrong in order to
crash and possibly kill the watchdog. In this case, dump the flight
recorder. The

control: Dump flight recorder on abnormal exit

Fan control throws exceptions when something goes wrong in order to
crash and possibly kill the watchdog. In this case, dump the flight
recorder. There are two paths because some exceptions just exit the app
so that a core dump isn't taken, since these are due to D-Bus problems
where core dumps aren't necessary.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I118517e186f8af434f95a528c2c7f1ecdbe7d337

show more ...


# 2fc0a35d 04-Oct-2021 Matt Spinler <spinler@us.ibm.com>

control: Dump flight recorder on signal SIGUSR1

Add a SIGUSR1 handler to dump the flight recorder.

It uses the sdventplus sd_event_add_defer wrapper to do the dump when
the code gets back to the ev

control: Dump flight recorder on signal SIGUSR1

Add a SIGUSR1 handler to dump the flight recorder.

It uses the sdventplus sd_event_add_defer wrapper to do the dump when
the code gets back to the event loop so it doesn't spend the time doing
it inside the signal handler itself.

The flight recorder can now be dumped with:
kill -USR1 $(pidof phosphor-fan-control)
or
systemctl kill -s USR1 phosphor-fan-control@0

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I46e45cb7a5e42ea4d217f63a8e14b6ef02ed8c22

show more ...


# ddb773b2 06-Oct-2021 Patrick Williams <patrick@stwcx.xyz>

catch exceptions as const

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Id1b5054d3147c39d98309bc11ed7016d6909e2a6


# b2cd93f5 16-Jun-2021 Matthew Barth <msbarth@us.ibm.com>

control: Stop forcing power state changed

With the service files updated to start at BMC
standby(multi-user.target), JSON driven fan control no longer needs to
force a power state changed to set the

control: Stop forcing power state changed

With the service files updated to start at BMC
standby(multi-user.target), JSON driven fan control no longer needs to
force a power state changed to set the fans to the poweron target. This
was originally done due to JSON driven fan control's service getting
started at poweron.

Essentially reverts 27958bf89252ed8c5c6497ec2b7296917b566b74

Dependent on https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/44294

Change-Id: I33b38cf15815cfefbcc813a143fcd63c9f720b1d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 2feab087 29-Jun-2021 Matthew Barth <msbarth@us.ibm.com>

control: Use sdeventplus access delegate for getting event

Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Change-Id: Ib945a061167946e7bf64edcb96587f236cdbcdce


# 27958bf8 15-Jun-2021 Matthew Barth <msbarth@us.ibm.com>

control: Temporarily handle starting at poweron

For JSON based fan control the fan control init service is used to start
fan control at poweron. The associated recipe needs to be updated where
JSON

control: Temporarily handle starting at poweron

For JSON based fan control the fan control init service is used to start
fan control at poweron. The associated recipe needs to be updated where
JSON based fan control only uses the non-init service and have it start
at BMC standby. Once that is merged, this commit can be reverted.

Change-Id: I893b8b8f2f73ef5ef842a3b7733c24c426df00e6
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 3770a1da 10-Jun-2021 Matthew Barth <msbarth@us.ibm.com>

control: Load config file(s) when available

Fan control's config file(s) are loaded when the fan control service
starts if found either in the override location, default location, or
the compatible

control: Load config file(s) when available

Fan control's config file(s) are loaded when the fan control service
starts if found either in the override location, default location, or
the compatible interface is available. When the required config file(s)
are not found at startup, it waits to receive the interfacesAdded signal
that the compatible interface is available and then loads its config
file(s).

If at any point another interfacesAdded signal for the compatible
interface is received after successfully loading its config file(s),
this signal is ignored. So the only method to reload the config file(s)
is by providing the SIGHUP signal.

Change-Id: I14f93a684bb00a6a32f8cb228cbfb9ce3f022c92
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# e91ac864 25-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Support reloading configurations with SIGHUP

Support the use of SIGHUP to reload the JSON configuration files where
all configuration files must succeed in being parsed to enable the use
of

control: Support reloading configurations with SIGHUP

Support the use of SIGHUP to reload the JSON configuration files where
all configuration files must succeed in being parsed to enable the use
of the config files found. This is particularly useful in placing one or
more override fan control configuration files and having fan control
immediately begin to use them on a system.

To minimize complexity, the creation of the Manager object when fan
control starts or receiving a SIGHUP use the same configuration file
loading method. This way if any future changes in this area only needs
to be done in one place.

Change-Id: Iaf906c3b4611ba88f45b5684935cf477045eeb2b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 9403a217 17-May-2021 Matthew Barth <msbarth@us.ibm.com>

control: Switch to using static instance of bus

Update main to use the static reference of the bus from
util::SDBusPlus.getBus() and have each object that needs the bus call
that same util::SDBusPlu

control: Switch to using static instance of bus

Update main to use the static reference of the bus from
util::SDBusPlus.getBus() and have each object that needs the bus call
that same util::SDBusPlus.getBus() function to retrieve the same static
reference.

Change-Id: Icd5a0e61819bf1bec8b46daae05443fdcc542b05
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# f8ae7a5e 05-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Split JSON and YAML based binaries

Effectively split the binary built for JSON based configurations from
YAML based configurations. Since each will have objects of the same
name, this split

control: Split JSON and YAML based binaries

Effectively split the binary built for JSON based configurations from
YAML based configurations. Since each will have objects of the same
name, this split is necessary in order to keep the functional
differences apart while keeping the same object names since the JSON
based objects that are created will eventually replace the others.

Change-Id: I937606781fbfa5d23607f81c0fd445289f2bd036
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 06764946 04-Mar-2021 Matthew Barth <msbarth@us.ibm.com>

control: Create manager object for JSON configs

Begin to transition to separate JSON vs YAMl source objects by creating
a manager object that will contain all the cached data to be used across
all e

control: Create manager object for JSON configs

Begin to transition to separate JSON vs YAMl source objects by creating
a manager object that will contain all the cached data to be used across
all events & zones of a system. This will remove the issue in the YAML
based source where the zone objects contained the cache and essentially
restricted a system to having a single zone object.

Also, include parsing of any configured profiles of the system on the
manager object. These profiles will be used to determine which
configurations are to be used on a system given the active state of any
profiles configured.

Change-Id: I817210f8bb763f03b922651192231529bc48a306
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 3e1bb274 26-May-2020 Matthew Barth <msbarth@us.ibm.com>

control: Clang format updates

Used `format-code.sh` build script to make changes to conform to clang
format.

Tested: Compiled

Change-Id: Ic9d621d7c5647bde0a92c5f17938c99deeca0512
Signed-off-by: Ma

control: Clang format updates

Used `format-code.sh` build script to make changes to conform to clang
format.

Tested: Compiled

Change-Id: Ic9d621d7c5647bde0a92c5f17938c99deeca0512
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 1cfc2f11 19-Oct-2018 William A. Kennington III <wak@google.com>

Switch sd_event loops to sdeventplus

This change is mostly focused around plumbing the sdeventplus::Event
object everywhere and using the member functions provided for the event.
No migration to the

Switch sd_event loops to sdeventplus

This change is mostly focused around plumbing the sdeventplus::Event
object everywhere and using the member functions provided for the event.
No migration to the timer utility is performed yet.

Change-Id: I912ab82bc081239d3b7c3cf7c5caca6742ef9c87
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 3e781064 19-Oct-2018 William A. Kennington III <wak@google.com>

Fix exit status codes

Using an exit status of -1 everywhere leads to the status being
converted to 255 when output to a calling application. While this does
signify an error it has a reserved meanin

Fix exit status codes

Using an exit status of -1 everywhere leads to the status being
converted to 255 when output to a calling application. While this does
signify an error it has a reserved meaning for exit status out of range.
Lets use a valid general exit status of 1 instead.

Change-Id: I326701c78985e34c430c258fe31d9e910da10405
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 88923a06 11-May-2018 Matthew Barth <msbarth@us.ibm.com>

Throw DBusPropertyError for all property accesses

On all get/set property functions, when an error occurs performing the
access of a property, throw a DBusPropertyError exception containing the
iden

Throw DBusPropertyError for all property accesses

On all get/set property functions, when an error occurs performing the
access of a property, throw a DBusPropertyError exception containing the
identifying parameters of the property.

Tested:
DBusPropertyError exception occurs on failing to set a property
DBusPropertyError exception occurs on failing to get a property

Change-Id: I9882d62d75153b4320a8d4a21ba7a52efbdd0af2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# ba7b5fea 25-Apr-2018 Matt Spinler <spinler@us.ibm.com>

Throw custom exceptions on D-Bus method failures

All 3 fan applications - control, monitor, and presence
have cases where it is expected that a getProperty call
may fail because a sensor is missing.

Throw custom exceptions on D-Bus method failures

All 3 fan applications - control, monitor, and presence
have cases where it is expected that a getProperty call
may fail because a sensor is missing. While the applications
already handle this, the InternalFailure exception that was
being thrown by the underlying call generates log entries
that make it look like something bad happened.

The custom exceptions now being thrown do not log anything on
creation, but store all of the failing information so that
any callers could still log the info if they wanted to.

Tested: Boot a water cooled Witherspoon and see the fan presence
and monitor applications not look like they are
failing. Boot a system without the fan hwmon running,
and see fan-control-init still show the fails.

Change-Id: Ifd8ad6e3deb492bbaf33f12c7258125dce1e5ea8
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 8600d9a0 23-Jun-2017 Matthew Barth <msbarth@us.ibm.com>

Timer to decrease fan speeds

Create a repeating timer for decreasing fan speeds where the fan speeds
in the zone are decreased when the timer expires and a decrease speed
request exists with no incr

Timer to decrease fan speeds

Create a repeating timer for decreasing fan speeds where the fan speeds
in the zone are decreased when the timer expires and a decrease speed
request exists with no increase request present or active.

Change-Id: I419592f6f50c0ed524f8bf3ebf183854ab5ef2ea
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 14184131 19-May-2017 Matthew Barth <msbarth@us.ibm.com>

Only setup set speed events when not init mode

Change-Id: Ia6987295a3eb4e23b9d6ae13a383e440386572de
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>


12