History log of /openbmc/phosphor-fan-presence/presence/tach.cpp (Results 1 – 13 of 13)
Revision Date Author Comments
# fbf4703f 17-Jul-2023 Patrick Williams <patrick@stwcx.xyz>

use std::format instead of fmt::format

The std::format is sufficient for the uses in this repository except
for in one file (override_fan_target.cpp, since P2286 isn't supported
by GCC yet). Switch

use std::format instead of fmt::format

The std::format is sufficient for the uses in this repository except
for in one file (override_fan_target.cpp, since P2286 isn't supported
by GCC yet). Switch to std::format whenever possible.

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

show more ...


# cb356d48 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

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

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


# c65d91d6 21-Apr-2021 Matt Spinler <spinler@us.ibm.com>

presence: Sensor conflict checking for AnyOf

There can be more than one way to detect the presence of a fan, such as
by a GPIO and by a nonzero tach reading. The AnyOf redundancy policy
only requir

presence: Sensor conflict checking for AnyOf

There can be more than one way to detect the presence of a fan, such as
by a GPIO and by a nonzero tach reading. The AnyOf redundancy policy
only requires one of these to indicate present when determining the
overall fan presence state.

This commit adds the functionality to check for the case when one of the
method reports not present while another reports present. In this case,
the one reporting not present will be considered the wrong one, and
depending on the detection type either an information event log or just
a journal trace will be created.

Only one log per method per power cycle will occur. Since one of the
methods probably looks for nonzero tach readings, there is a 5 second
delay after a power on is detected before a conflict check is done.

If the GPIO method is where the problem is detected, an event log is
created. If it's instead the tach sensor method, then a trace will just
be put in the journal because there is already code watching for and
creating event logs for stopped tachs - the fan monitor code.

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

show more ...


# ae226194 15-Oct-2020 Jay Meyer <jaymeyer@us.ibm.com>

Enhance fan tracing support - add device access info

Move file names for file errors to the journal message. Enhance
usablility.

Logging messages for file errors contain the file names and other
in

Enhance fan tracing support - add device access info

Move file names for file errors to the journal message. Enhance
usablility.

Logging messages for file errors contain the file names and other
information inside structured entries rather than directly in the log
message. This makes viewing errors more difficult than need be. Before
this change, the journal report needed to be run with '-o verbose' to
see the file names.

Tested:
- For cooling-type/cooling_type.cpp
Approx line 39:
A dry-dock test of this message was performed by commenting out the
return for the successful case just above and adding a successful
return just below the journal message.
Then the next test can output this log message:
Failed to get libevdev from file descriptor 4, return code 0

Approx line 71:
Do this to get error below:
"phosphor-cooling-type --air
--dev=/dev/input/by-path/platform-gpio-keys-polled-event
--path=/system/chassis/motherboard/ --event=21"
Message:
"Device does not support event type keycode 21"

- For cooling-type/main.cpp
Approx line 73:
Do this to provoke error below:
"phosphor-cooling-type --air
--dev=/dev/input/by-path/platform-gpio-keys-polled-event
--path=/system/chassis/motherboard/ --event=6"
Message:
"Uncaught DBus method failure exception Busname:
xyz.openbmc_project.Inventory.Manager Path:
/xyz/openbmc_project/inventory Interface
xyz.openbmc_project.Inventory.Manager Method: Notify"

- For presence/fallback.cpp
Approx line 56:
Run fan presence application using a 'fallback' rpolicy
for a fan and set that fan's gpio presence line to false within
simulation.

Journal Message:
Using backup presence sensor for fan /system/chassis/motherboard/fan0

For presence/fallback.cpp
Approx line 82:
Set a fan's gpio presence line to false within simulation and then run
the fan presence application using a 'fallback' rpolicy for that fan.

Journal Message:
Using backup presence sensor for fan /system/chassis/motherboard/fan0

- For presence/tach.cpp
Approx line 76:
Remove a fan sensor from the fan controller hwmon config that is
configured within the fan presence application. Then unbind and
rebind the fan controller device driver and start the fan presence
application.

Journal Message:
Unable to read fan tach sensor /xyz/openbmc_project/sensors/fan_tach/fan3_0

- For utility.hpp:
Approx line 65:
Do this to get error below:
"phosphor-cooling-type --air
--dev=/dev/input/by-path/platform-gpio-keys-polled-
--path=/system/chassis/motherboard/ --event=21"
Message:
"Failed to open file device path
/dev/input/by-path/platform-gpio-keys-polled-"

Signed-off-by: Jay Meyer <jaymeyer@us.ibm.com>
Change-Id: I592481d92b18b85e5ea5b7040389467530b581e1

show more ...


# ad2cd247 13-Aug-2020 Matthew Barth <msbarth@us.ibm.com>

presence: Tach input to double

It was found that after the Value property on the Sensor.Value interface
was changed to be of double type, the tach input failed to get converted
correctly from double

presence: Tach input to double

It was found that after the Value property on the Sensor.Value interface
was changed to be of double type, the tach input failed to get converted
correctly from double to int64 type when the property changed. Need to
set the tach input to be of double type explicitly.

Tested:
Tach input values correctly read from dbus signal

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

show more ...


# 9f93bd35 28-May-2020 Matthew Barth <msbarth@us.ibm.com>

Fix some gcc warnings and style suggestions

Building against gcc-10 produced warnings and style suggestions.
Fixed all the warnings, but only select style suggestions due to
readability and others a

Fix some gcc warnings and style suggestions

Building against gcc-10 produced warnings and style suggestions.
Fixed all the warnings, but only select style suggestions due to
readability and others appeared to be compiler confusion.

Tested: Compiled
No functional impacts appear to have been made with these changes

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

show more ...


# 2d2caa34 26-May-2020 Matthew Barth <msbarth@us.ibm.com>

presence: Clang format updates

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

Tested: Compiled

Change-Id: I2fc795938e85a752ee56b54212d389c2ff296828
Signed-off-by: M

presence: Clang format updates

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

Tested: Compiled

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

show more ...


# 1f514fa8 13-May-2020 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: remove deprecated variant_ns

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


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

Presence: Fix a log metadata entry

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


# d37c0f85 28-Jul-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

presence: Allow missing tach sensors

Do not allow missing tach sensors to abort the program.
Instead, assume the fan is not spinning.

Change-Id: Idc923b9c57b4d180aa16f0aa4933c65e7e4a2d42
Signed-off

presence: Allow missing tach sensors

Do not allow missing tach sensors to abort the program.
Instead, assume the fan is not spinning.

Change-Id: Idc923b9c57b4d180aa16f0aa4933c65e7e4a2d42
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 11083eca 25-Jul-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

presence: Add sensor to redundancy policy api

Include a reference to the sensor changing state when sensor
implementations ping the policy object.

This allows policy logic based on multiple sensors

presence: Add sensor to redundancy policy api

Include a reference to the sensor changing state when sensor
implementations ping the policy object.

This allows policy logic based on multiple sensors, simultaneously.

Change-Id: I44cf00c7ecd220d0cc99e51ca6093bac6da7343c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# dd62e36e 14-Jun-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

presence: Add new tach sensor implementation

Add a new fan speed (tach) presence implementation for the new
PresenceSensor interface.

This fan tach sensor behaves mostly like the existing one, with

presence: Add new tach sensor implementation

Add a new fan speed (tach) presence implementation for the new
PresenceSensor interface.

This fan tach sensor behaves mostly like the existing one, with
the addition of support for multiple tach sensors for the
single PresenceSensor instance, and implementation of the
PresenceSensor start and stop interfaces.

Change-Id: I535a3e2c78ef0f06f10b6f4cda9a7e2d0e9c11db
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...