History log of /openbmc/phosphor-hwmon/fan_speed.cpp (Results 1 – 16 of 16)
Revision Date Author Comments
# 2d56d931 20-Nov-2024 Matt Spinler <spinler@us.ibm.com>

fan_speed: Always write target prop to sysfs

Leave it up to the fan control application on when to write the fan
target value to the hardware and just always do it instead of throwing
away the write

fan_speed: Always write target prop to sysfs

Leave it up to the fan control application on when to write the fan
target value to the hardware and just always do it instead of throwing
away the write if the previous property value was the same.

This protects against the case when the fan control device resets
itself, such as due to an internal watchdog failure, and sets its
registers to a default that doesn't match sysfs or D-Bus. Now if fan
control writes the target property again, even if it is the same, it
will restore the actual value to what is desired.

Tested:

1. Write directly to sysfs fan*_target to change the value from what is
on D-Bus.
2. Use busctl set-property to set the Target property to the same value
it already is.
3. Ensure the fan*_target file changes back to the value.

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

show more ...


# 64129937 13-Feb-2024 Patrick Williams <patrick@stwcx.xyz>

prefer std::format over fmt

Since C++20, std::format has existed so prefer that. For the single
fmt::print call we can use stdplus::print until GCC supports the std
one.

Signed-off-by: Patrick Wil

prefer std::format over fmt

Since C++20, std::format has existed so prefer that. For the single
fmt::print call we can use stdplus::print until GCC supports the std
one.

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

show more ...


# 6a391de4 08-Jul-2020 Matt Spinler <spinler@us.ibm.com>

Print the errno from a fail in the journal

When a file access fails, print the errno of the failure in the same
journal entry the filename is already printed.

Signed-off-by: Matt Spinler <spinler@u

Print the errno from a fail in the journal

When a file access fails, print the errno of the failure in the same
journal entry the filename is already printed.

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

show more ...


# 5e034afc 24-Jun-2020 Matt Spinler <spinler@us.ibm.com>

Print the failing filename in the journal msg

Instead of hiding the name of the file that had the failed access in the
journal metadata, put it in the journal message so debug is easier.

Uses the f

Print the failing filename in the journal msg

Instead of hiding the name of the file that had the failed access in the
journal metadata, put it in the journal message so debug is easier.

Uses the fmt library.

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

show more ...


# abf29700 19-Dec-2018 Patrick Venture <venture@google.com>

fan_speed: add underscore prefix to members

Add underscore prefix to members for fan_speed object.

Change-Id: I9a3c444fe31ffc4f15e15eefc15dc652d3b209f1
Signed-off-by: Patrick Venture <venture@googl

fan_speed: add underscore prefix to members

Add underscore prefix to members for fan_speed object.

Change-Id: I9a3c444fe31ffc4f15e15eefc15dc652d3b209f1
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 043d3230 31-Aug-2018 Patrick Venture <venture@google.com>

add .clang-format

Change-Id: I94ce26d595367e08d6fb3734535bcd855f1b1473
Signed-off-by: Patrick Venture <venture@google.com>


# 50552377 07-Jun-2018 Patrick Venture <venture@google.com>

hwmonio:: Add Interface base class and tests

Enable injecting hwmonio::HwmonIO mocks for testing.

Tested: Ran on quanta-q71l and saw all sensors exported to dbus as
expected with the expected value

hwmonio:: Add Interface base class and tests

Enable injecting hwmonio::HwmonIO mocks for testing.

Tested: Ran on quanta-q71l and saw all sensors exported to dbus as
expected with the expected values.

Change-Id: I35912bf2a733932d9e1e774ff53b0114ae16560b
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 75e56c67 20-Apr-2018 Patrick Venture <venture@google.com>

hwmonio: split IoAccess object out

Split out the hwmon io access object from the sysfs namespace
into its own.

Change-Id: I8d1a45630117d1d503d0d5fa6061163911b695e8
Signed-off-by: Patrick Venture <v

hwmonio: split IoAccess object out

Split out the hwmon io access object from the sysfs namespace
into its own.

Change-Id: I8d1a45630117d1d503d0d5fa6061163911b695e8
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 7a5285de 17-Apr-2018 Patrick Venture <venture@google.com>

move getEnv methods into env namespace

Move the getEnv(...) methods into the env namespace,
for consistency.

Change-Id: I4055d9456c17f8b20071cdee1b8e531c10fb0c7e
Signed-off-by: Patrick Venture <ven

move getEnv methods into env namespace

Move the getEnv(...) methods into the env namespace,
for consistency.

Change-Id: I4055d9456c17f8b20071cdee1b8e531c10fb0c7e
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# b778df0e 16-Oct-2017 Matt Spinler <spinler@us.ibm.com>

Only write pwm_enable if it has an env var

Some device drivers don't need pwmX_enable written, so
only do it if an environment variable is present that
contains the value to write.

The environment

Only write pwm_enable if it has an env var

Some device drivers don't need pwmX_enable written, so
only do it if an environment variable is present that
contains the value to write.

The environment variable is specified in the conf file
along with the other enviroment variables and would look like:
ENABLE_fan1 = "2"

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

show more ...


# 9b65f76d 05-Oct-2017 Matt Spinler <spinler@us.ibm.com>

Log the failing sysfs filename

Add the name of the sysfs path an access failed
on to the journal when an error log is created.

This is useful for debug.

An example of the path in the journal metad

Log the failing sysfs filename

Add the name of the sysfs path an access failed
on to the journal when an error log is created.

This is useful for debug.

An example of the path in the journal metadata is:
FILE=/sys/class/hwmon/hwmon7/temp1_input

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

show more ...


# 754d38cf 07-Sep-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

sysfs IO enhancements

Add retries for some sysfs IO errors:
EIO: Tolerate intermittant device or bus failures.
ETIMEDOUT: Tolerate intermittant timeouts.
EAGAIN: Tolerate drivers that do not bloc

sysfs IO enhancements

Add retries for some sysfs IO errors:
EIO: Tolerate intermittant device or bus failures.
ETIMEDOUT: Tolerate intermittant timeouts.
EAGAIN: Tolerate drivers that do not block.
ENXIO: Tolerate momentarily unplugged devices on busses that don't
support hotplug.
EBADMSG: Tolerate CRC errors.

Flush stdio buffers after writes.
Remove redundant retry and delay constants.

Resolves: openbmc/openbmc#2262

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

show more ...


# 751043e9 29-Aug-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Use hwmonio for attribute IO

Moves disparate error handling scenarios from the method doing the
IO to the call point.

Resolves openbmc/openbmc#2166

Change-Id: I3b6d2e175433dd8b2946ae60381901f2d7ca

Use hwmonio for attribute IO

Moves disparate error handling scenarios from the method doing the
IO to the call point.

Resolves openbmc/openbmc#2166

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

show more ...


# 1e6324fa 01-Jun-2017 Patrick Venture <venture@google.com>

Don't exit program on sysfs read failures.

We have an unreliable fan in one of the test systems and at present if
the sysfs entry is unavailable or returns failure, then the program will
exit. The

Don't exit program on sysfs read failures.

We have an unreliable fan in one of the test systems and at present if
the sysfs entry is unavailable or returns failure, then the program will
exit. The program could be serving many sensors, and any one failure
will cause it to exit. This is true not only when initially creating
the sensors, but also if any sensor read fails at run-time.

Testing: I verified the program logged the failures, which may not
be ideal if there is a buggy sensor, but, I also ran it and managed
to catch it where the sensor wasn't there initially and it cleanly
reported only the sensors that were responsive and didn't just exit.

There is certainly a case to be made for re-scanning periodically if the
sensor returns or there was a timing issue, and there is a separate bug
for that. This commit means only to make the program more robust on
failure.

Change-Id: I310a3e3c0e0ea86e439341a296b741ded18f46f2
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 0a8de645 11-May-2017 Matt Spinler <spinler@us.ibm.com>

Write pwmX_enable for fans that have a fanX_target

For fans that have a fanX_target hwmon sysfs attribute,
write the pwmX_enable on startup to put that fan into
RPM mode, which is safe to do because

Write pwmX_enable for fans that have a fanX_target

For fans that have a fanX_target hwmon sysfs attribute,
write the pwmX_enable on startup to put that fan into
RPM mode, which is safe to do because this application
requires that the target is written in RPMs. The write
will only occur if the pwm_enable file exists.

In the future, if fans with a target need to run in pwm
mode, this code will need to be updated to convert between
RPM and pwm anyway and the pwm_enable value can then
be different based on that.

Resolves openbmc/openbmc#1584

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

show more ...


# 048ac87f 09-Mar-2017 Matthew Barth <msbarth@us.ibm.com>

Update hwmon fan target sysfs entries

Override the default FanSpeed.Target set implementation so when a target
value is written to the FanSpeed interface it is also updated in the
related fan target

Update hwmon fan target sysfs entries

Override the default FanSpeed.Target set implementation so when a target
value is written to the FanSpeed interface it is also updated in the
related fan target sysfs file. This sets a particular fan to the given
target speed.

Resolves openbmc/openbmc#962
Resolves openbmc/phosphor-hwmon#1

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

show more ...