#
b6865fdc |
| 16-Dec-2024 |
Matt Spinler <spinler@us.ibm.com> |
Remove vim mode lines
It isn't necessary to store editor settings in source files.
Change-Id: I248bb4db00e3abd93fab50d59c63e1cf48b2ee65 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
#
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 ...
|
#
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 ...
|
#
e8771fd4 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I267a17e007b99caed10aef060e7dd9a0bcc5fc2e 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 Spinler <spinler@us
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 (starts with a '/') i
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 ...
|
#
9e997b4d |
| 08-Mar-2019 |
Patrick Venture <venture@google.com> |
use filesystem instead of experimental
Use filesystem now that it should be available instead of experimental::filesystem.
Change-Id: I62838b343ce34f85a47661f1eaaff3c7e6338bbf Signed-off-by: Patric
use filesystem instead of experimental
Use filesystem now that it should be available instead of experimental::filesystem.
Change-Id: I62838b343ce34f85a47661f1eaaff3c7e6338bbf Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
09560174 |
| 13-Oct-2018 |
Patrick Venture <venture@google.com> |
sysfs: transition to std::find_if
[sysfs.cpp:228]: (style) Consider using std::find_if algorithm instead of a raw loop.
Change-Id: Ie07ca5e32405fc7d27e85936377cec44291d3f94 Signed-off-by: Patrick V
sysfs: transition to std::find_if
[sysfs.cpp:228]: (style) Consider using std::find_if algorithm instead of a raw loop.
Change-Id: Ie07ca5e32405fc7d27e85936377cec44291d3f94 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>
|
#
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 ...
|
#
8729e44a |
| 02-Apr-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Remove OCC EAGAIN workaround
The ability to handle an EAGAIN for a sensor from the OCC device can be done by defining the EAGAIN return code(11) as a sensor removal return code within each OCC confi
Remove OCC EAGAIN workaround
The ability to handle an EAGAIN for a sensor from the OCC device can be done by defining the EAGAIN return code(11) as a sensor removal return code within each OCC config file. This return code can be defined at the device level within the config file to be applied across all sensors the OCC provides.
Tested: OCC sensors are removed from Dbus when EAGAIN is returned
Resolves openbmc/openbmc#2327
Change-Id: If16ec37da6d960d54de1d47af3a39944249df772 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
c1cece76 |
| 07-Nov-2017 |
Patrick Venture <venture@google.com> |
Add configure option for how read fails behave
Different platforms have different requirements for handling hwmon sysfs access failures.
The default behavior is that a read failure leads to the dae
Add configure option for how read fails behave
Different platforms have different requirements for handling hwmon sysfs access failures.
The default behavior is that a read failure leads to the daemon exiting after some number of read failures. This can be controlled to then remove the object from the dbus on failure. Now, it can instead be controlled to return -errno on read failure.
This new behavior to set the value to -errno must be checked by whatever mechanism is reporting the value.
Change-Id: I50b93aea56f22267da79c9571319f281e24a1e6f 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 an EREMOTEIO return code
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 directories removed fro
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: Compiled
Change-Id: I3c
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 ...
|
#
c8a8e010 |
| 14-Dec-2017 |
Matt Spinler <spinler@us.ibm.com> |
Clear errno before reading/writing
Ensure the errno is cleared before accessing the sysfs file, so exceptions thrown without setting an errno can be recognized as such.
Without this, the errno coul
Clear errno before reading/writing
Ensure the errno is cleared before accessing the sysfs file, so exceptions thrown without setting an errno can be recognized as such.
Without this, the errno could still be set to a nonzero value from a previous operation, and the error handling code would think it happened on the current operation. The difference being if there is a nonzero errno a Read/WriteFailure error will be logged, and if zero the exception will be rethrown.
Change-Id: Ia958376ca80484d4d594872ab8ab0154d1b767ca Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
26d21731 |
| 30-Nov-2017 |
Edward A. James <eajames@us.ibm.com> |
Silently exit on ENODEV
ENODEV should be included in the check for "disappeared" device or directory when hwmon driver is being unloaded. There is a race condition between unloading drivers and stop
Silently exit on ENODEV
ENODEV should be included in the check for "disappeared" device or directory when hwmon driver is being unloaded. There is a race condition between unloading drivers and stopping hwmon polling, even up to several seconds, which exceeds the previous retry period for ENODEV.
Change-Id: I39c8ae9ea79aa41028f5529c7ea9816d4736fc65 Signed-off-by: Edward A. James <eajames@us.ibm.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 instead of just a
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 ...
|
#
67ce4a46 |
| 16-Nov-2017 |
Matt Spinler <spinler@us.ibm.com> |
Retry on ENODATA errors
A particular device in a particular system is known to fail with an ENODATA errno when another entity is using the same path to access it. Add it to the retry list so that p
Retry on ENODATA errors
A particular device in a particular system is known to fail with an ENODATA errno when another entity is using the same path to access it. Add it to the retry list so that phosphor-hwmon will retry and hopefully be able to get a clean read. Even for devices where this contention isn't the case, the code may as well retry as opposed to trying once and giving up.
Resolves openbmc/openbmc#2645
Change-Id: Ib7aaaa14be33a33794a8c62d6991f77ab65a2ffa Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
8a37c4b7 |
| 04-Oct-2017 |
Matt Spinler <spinler@us.ibm.com> |
Retry on ENODEV errnos
This errno can be returned by certain device drivers when they are in the process of being unbound.
Retrying will give the driver time to finish unbinding, and phosphor-hwmon
Retry on ENODEV errnos
This errno can be returned by certain device drivers when they are in the process of being unbound.
Retrying will give the driver time to finish unbinding, and phosphor-hwmon will then die off naturally as phosphor-hwmon's lifetime is tied to the loaded driver's.
Resolves openbmc/openbmc#2401
Change-Id: Ife888f3b608d7694d22f95412a7d320377daefa4 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 ...
|
#
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@fuzziesquirrel.com>
|
#
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 exception bugs, and more imp
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. - Check for the iio-hwm
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 ...
|