History log of /openbmc/phosphor-hwmon/sysfs.hpp (Results 1 – 25 of 29)
Revision Date Author Comments
# 02e598ab 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: Iabfeec3ff53427c317ef9c0b5bf06326ab9a1e17
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# f9aff805 05-May-2021 William A. Kennington III <wak@google.com>

meson: Cleanup library linking

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


# 5c014d2b 16-Apr-2019 Matt Spinler <spinler@us.ibm.com>

Use std::filesystem::path::relative_path()

Use that function instead of making a relative path manually.

Change-Id: I64908353295a10af09baa91bab5d1c3a0152e994
Signed-off-by: Matt

Use std::filesystem::path::relative_path()

Use that function instead of making a relative path manually.

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

show more ...


# 85ba64a6 15-Mar-2019 Matt Spinler <spinler@us.ibm.com>

Don't std::filesystem::path::/= an absolute path

Unlike std::experimental::filesystem::path, with
std::filesystem::path, the /= operator will turn an append
of an absolute path (star

Don't std::filesystem::path::/= an absolute path

Unlike std::experimental::filesystem::path, with
std::filesystem::path, the /= operator will turn an append
of an absolute path (starts with a '/') into a '='.

So, ensure the paths aren't absolute.

Change-Id: Ie8fb9d056042e277415e8ea0eb29d094a2665611
Signed-off-by: Matt Spinler <spinler@us.ibm.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>


# 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-of

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 ...


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

sysfs: cleanup: add missing namespace comment

Namespace was missing terminator comment.

Change-Id: I9a35742fbdf5c0cdf162dfead0e86864b635a9ab
Signed-off-by: Patrick Venture <vent

sysfs: cleanup: add missing namespace comment

Namespace was missing terminator comment.

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

show more ...


# a23babd6 16-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Handle OCC EAGAIN & EREMOTEIO in 4.13

This is a temporary fix until the following issues are completed:
openbmc/openbmc#2327
openbmc/openbmc#2329

When an EAGAIN or a

Handle OCC EAGAIN & EREMOTEIO in 4.13

This is a temporary fix until the following issues are completed:
openbmc/openbmc#2327
openbmc/openbmc#2329

When an EAGAIN or an EREMOTEIO return code is received by hwmon
from the OCC driver in the 4.13 kernel, they should be translated to
an unavailable sensor(0x00) and failed sensor(0xFF) scaled values
respectively. This will keep the OCC hwmon instance running and allow
applications to continue using these sensors as they were reported under
the mainline openbmc/linux 4.10 kernel.

Tested:
Verified return codes are caught and sensor value modified

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

show more ...


# 626df17a 05-Mar-2018 Matt Spinler <spinler@us.ibm.com>

Add findHwmonFromDevPath()

This function can find the hwmon path from a /devices
path. This path is similar to what udev lists as the
device path, but with the /hwmon/hwmonN directo

Add findHwmonFromDevPath()

This function can find the hwmon path from a /devices
path. This path is similar to what udev lists as the
device path, but with the /hwmon/hwmonN directories
removed from the end. In addition, any ':' characters
in the path have been converted to '--', so the code
needs to convert them back.

This is done because some devices are not in the device
tree, and hence wouldn't have the open firmware device
path that the code previously only supported.

Tested: Tested with the new /devices path.

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

show more ...


# 31dbe062 05-Mar-2018 Matt Spinler <spinler@us.ibm.com>

Rename function

A future commit will add a new function to find the
hwmon device from a different type of path, so clarify
the current function name in preparation.

Tested:

Rename function

A future commit will add a new function to find the
hwmon device from a different type of path, so clarify
the current function name in preparation.

Tested: Compiled

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

show more ...


# 9331ab78 29-Jan-2018 Patrick Venture <venture@google.com>

Add fan pwm interface target

The current daemon only supports RPM-based fan control, whereas the
hwmon interface for PWM is often present. This implements the Fan
Control PWM dbus i

Add fan pwm interface target

The current daemon only supports RPM-based fan control, whereas the
hwmon interface for PWM is often present. This implements the Fan
Control PWM dbus interface.

This CL is not the complete solution, but if mixed with a follow-on CL
that does this, I think it'll be ideal. For instance, this assumes the
pwm number matches, whereas the other CL lets you specify the
corresponding PWM target for the fan.

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

show more ...


# fee106b9 29-Nov-2017 Matt Spinler <spinler@us.ibm.com>

Support reading 64 bit integers

Some sysfs *_input values may be bigger than 32 bits,
for example power values reported in microwatts. As such,
read an int64_t value out of sysfs in

Support reading 64 bit integers

Some sysfs *_input values may be bigger than 32 bits,
for example power values reported in microwatts. As such,
read an int64_t value out of sysfs instead of just a uint32_t.
The D-Bus property that will hold the value is also the same
type, an int64_t.

Resolves openbmc/openbmc#2686

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

show more ...


# ca64c25f 25-Oct-2017 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: Ia3256c0771a94cc44154a7f81af2dcfaf851ffa7
Signed-off-by: Gunnar Mills <gmills@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 driv

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 ...


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

sysfs: Removed unused code

A number of methods have been deprecated. Remove.

Change-Id: I87fa63724d67770719e93a85803fa37737d5cfad
Signed-off-by: Brad Bishop <bradleyb@fuzziesqu

sysfs: Removed unused code

A number of methods have been deprecated. Remove.

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

show more ...


# 8b574a7e 25-Aug-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Add hwmon io wrapper class

Add a convenience class for doing hwmon attribute sysfs
IO.

A convenience class is warranted given some necessary
workarounds for some GCC io exce

Add hwmon io wrapper class

Add a convenience class for doing hwmon attribute sysfs
IO.

A convenience class is warranted given some necessary
workarounds for some GCC io exception bugs, and more importantly
to remove the burden of the rest of the application
checking for ENOENT in the case of a driver unbind event.

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

show more ...


# 431d26a5 25-Aug-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

sysfs: refactor findCallout

- Export findCalloutPath so other modules can use it.
- Change parameter to hwmon instance path to avoid
fs::canonical outside sysfs.cpp.
- C

sysfs: refactor findCallout

- Export findCalloutPath so other modules can use it.
- Change parameter to hwmon instance path to avoid
fs::canonical outside sysfs.cpp.
- Check for the iio-hwmon driver instead of relying on
DT nodes having 'iio-hwmon' in them.
- For iio devices, provide a /sys/devices path rather
than a DT path.
- Use existing application indenting and doxygen style.

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

show more ...


# f4bf63ad 28-Aug-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

sysfs: refactor findPhandleMatch

- Use same indenting style as the rest of the application.
- Invert branch logic to reduce indent levels.
- Move logic that does not depend on loo

sysfs: refactor findPhandleMatch

- Use same indenting style as the rest of the application.
- Invert branch logic to reduce indent levels.
- Move logic that does not depend on loop variants outside loop.
- Fix a bug where the io-channels phandle is read from the wrong file.
- Remove unnecessary try/catch block around DT IOs (DT is immutable).
- Export findPhandle so other modules can use it.
- Document current method limitations.

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

show more ...


# 3b8e36e2 28-Jul-2017 Matt Spinler <spinler@us.ibm.com>

Allow EAGAIN failures

Certain devices are known to return EAGAIN failures when read
too frequently, so be tolerant of them.

On startup, the code will retry for up to a second to

Allow EAGAIN failures

Certain devices are known to return EAGAIN failures when read
too frequently, so be tolerant of them.

On startup, the code will retry for up to a second to get a good
first reading, and then in the main loop the code will just stick
with the current value if it fails that way.

Resolves openbmc/openbmc#2038

Change-Id: I7621aa30429c43276239982a03ec3eef02ce9c6e
Signed-off-by: Matt Spinler <spinler@us.ibm.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

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 ...


# 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
re

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 ...


# 9ca659f9 24-Feb-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Remove unused methods

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


# 4db64422 16-Feb-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Log failing path after sysfs access failures

Log failing device path and error after a sysfs access failure.
Gracefully exit rather than crash.

Change-Id: I41316e84a70ceda8c166f

Log failing path after sysfs access failures

Log failing device path and error after a sysfs access failure.
Gracefully exit rather than crash.

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

show more ...


# a9b5f05b 17-Jan-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

sysfs: Remove return of const string

This prevents move operations.

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


# 613a5b37 05-Jan-2017 Brad Bishop <bradleyb@fuzziesquirrel.com>

Find hwmon instances from OF device paths

Provide a method that scans the hwmon subtree for a matching
open firmware device path.

Change-Id: Ic71dea90113c6894d9d2b61e03bd02f6b55

Find hwmon instances from OF device paths

Provide a method that scans the hwmon subtree for a matching
open firmware device path.

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

show more ...


12