History log of /openbmc/phosphor-hwmon/ (Results 1 – 25 of 288)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
e96daf6c18-Dec-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have b

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have been deprecated, so adjust the style file
accordingly.

See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style.
See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.

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

show more ...

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

30cab62917-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: Ib72ad9234220f72a4acbdbb46ab32045d94f0948
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>

show more ...

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

670d92a722-Jul-2024 Matt Spinler <spinler@us.ibm.com>

Provide option to always use device path

The application has the ability to use either the 'OF_FULLNAME' udev
environment variable or the udev device path as the path to the config
file, though it d

Provide option to always use device path

The application has the ability to use either the 'OF_FULLNAME' udev
environment variable or the udev device path as the path to the config
file, though it defaults to OF_FULLNAME if it's there.

The disadvantage of using OF_FULLNAME is that the file name then has to
match what someone manually typed into the device tree for the system,
for example mydevice@72.conf. The device path method, on the other
hand, has a file name that matches the stable I2C details, such as
7-0052.conf.

To force phosphor-hwmon to always use the device path for its config and
avoid being dependent on the device tree name, this commits adds a new
--always-use-devpath meson option.

When enabled, it add an '|| true' into the start_hwmon.sh script to
force it down the path to use the device path when starting the hwmon
service.

Tested:
When disabled, diffed start_hwmon.sh to that built from previous HEAD
and the files matched.

When enabled, start_hwmon.sh now has
```
if [ -z "${path}" ] || true
```

and app now uses device path for config file path.

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

show more ...

82f2db6e22-Jul-2024 Matt Spinler <spinler@us.ibm.com>

Remove add_object_vtable expect from fanpwm UT

For some reason, having an expect on the sdbusplus mock
sd_bus_add_object_vtable causes valgrind to fail in CI with errors such
as:

```
==729843== Con

Remove add_object_vtable expect from fanpwm UT

For some reason, having an expect on the sdbusplus mock
sd_bus_add_object_vtable causes valgrind to fail in CI with errors such
as:

```
==729843== Conditional jump or move depends on uninitialized value(s)
==729843== at 0x5CB89AB: std::unique_ptr<sd_bus_slot, sdbusplus::slot::details::SlotDeleter>::~unique_ptr() (unique_ptr.h:403)
==729843== by 0x5CB8665: sdbusplus::slot::slot::~slot() (slot.hpp:43)
==729843== by 0x5CC3CC9: sdbusplus::server::interface::interface::~interface() (interface.cpp:38)
==729843== by 0x13189B: sdbusplus::server::xyz::openbmc_project::control::FanPwm::~FanPwm() (server.hpp:32)
==729843== by 0x13E267: sdbusplus::server::object::details::compose<sdbusplus::server::xyz::openbmc_project::control::FanPwm>::~compose() (object.hpp:181)
==729843== by 0x13E4BC: sdbusplus::server::object::object<sdbusplus::server::xyz::openbmc_project::control::FanPwm>::~object() (object.hpp:95)
==729843== by 0x13C5C9: hwmon::FanPwm::~FanPwm() (fan_pwm.hpp:18)
==729843== by 0x12C0D1: FanPwmTest_BasicConstructorDeferredTest_Test::TestBody() (fanpwm_unittest.cpp:76)
==729843== by 0x5E089FC: void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2638)
==729843== by 0x5DFE67A: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2674)
==729843== by 0x5DD3BA3: testing::Test::Run() (gtest.cc:2713)
==729843== by 0x5DD4661: testing::TestInfo::Run() (gtest.cc:2859)
```

There are 4 more stanzas of similar 'Conditional jump or move...'
errors. None of these show up without the vtable expect.

Other repositories that use this same expect also fail.

I opened sdbusplus issue openbmc/sdbusplus#97 for the problem. I spent
time looking into it, and did not figure anything out.

This commit just removes the call to it because in these testcases the
FanPwm object, which is just derived from the sdbuplus interface object,
is simply created on the stack:

```
hwmon::FanPwm f(...);
```

The unit tests aren't actually testing any code that conditionally
creates a FanPwm interface on D-Bus, so checking that it happens isn't
that useful and seems to more just be testing sdbusplus.

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

show more ...

8df95be428-Mar-2024 Konstantin Aladyshev <aladyshev22@gmail.com>

meson: Provide missing wrap files

Currently "meson setup build" command fails because wrap files for
some of the subprojects are not currently present.
Provide missing wrap files to fix the issue.

meson: Provide missing wrap files

Currently "meson setup build" command fails because wrap files for
some of the subprojects are not currently present.
Provide missing wrap files to fix the issue.

Tested:
"meson setup build" now is executed successfully

Change-Id: I47cf6424696cb836b623375e73b1a1ee887cfc40
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>

show more ...

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

47fb49ac19-Oct-2023 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

sensor: Implement sensor "PRIORITY"

This commit introduces the `xyz.openbmc_project.Common.Priority`
interface to define the priority of sensors. If a sensor's priority
attribute is specified, this

sensor: Implement sensor "PRIORITY"

This commit introduces the `xyz.openbmc_project.Common.Priority`
interface to define the priority of sensors. If a sensor's priority
attribute is specified, this interface is created with the 'priority'
attribute. However, if the priority attribute is not specified, this
interface is not created.

The `xyz.openbmc_project.Common.Priority` interface is used to indicate
the priority level of fan sensors. It provides information about
primary and secondary RPM sensors for dual rotor fans, allowing for a
more specific description of the sensor's priority.

phosphor-dbus-interfaces commit:
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/66779

Tested: Build phosphor-hwmon successfully

'''
1. Retrieve the priority level of the secondary sensor

busctl introspect xyz.openbmc_project.Hwmon-xxx .Hwmon1 \
/xyz/openbmc_project/sensors/fan_tach/fan1_1 xyz.openbmc_project.Common.Priority

NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.Priority property u 1 emits-change writable

2. If the "PRIORITY" is not specified in the sensor's configuration file

busctl introspect xyz.openbmc_project.Hwmon-xxx .Hwmon1 \
/xyz/openbmc_project/sensors/fan_tach/fan1_0 xyz.openbmc_project.Common.Priority
NAME TYPE SIGNATURE RESULT/VALUE FLAGS

3. Change the sensor priority

busctl set-property xyz.openbmc_project.Hwmon-xxx.Hwmon1 \
/xyz/openbmc_project/sensors/fan_tach/fan1_1 xyz.openbmc_project.Common.Priority \
Priority u 0

busctl introspect xyz.openbmc_project.Hwmon-xxx .Hwmon1 \
/xyz/openbmc_project/sensors/fan_tach/fan1_1 xyz.openbmc_project.Common.Priority
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
.Priority property u 0 emits-change writable
'''

Change-Id: I7a226cf105756bc32e04f6724428d93e84dfb72a
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...

58bd8ba829-Nov-2023 Patrick Williams <patrick@stwcx.xyz>

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer retur

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and auto.

Switch all uses of `enabled` to `allowed`.

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

show more ...

c8e818dd20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 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-17 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: I542db97d7dc7fe5b03ffedbbdbff968d4c1bb032
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

ae7ae5b115-Aug-2023 George Liu <liuxiwei@inspur.com>

meson_options.txt: Support for reading options from meson.options

Support has been added for reading options from meson.options instead
of meson_options.txt[1]. These are equivalent, but not using t

meson_options.txt: Support for reading options from meson.options

Support has been added for reading options from meson.options instead
of meson_options.txt[1]. These are equivalent, but not using the .txt
extension for a build file has a few advantages, chief among them
many tools and text editors expect a file with the .txt extension to
be plain text files, not build scripts.

[1] https://mesonbuild.com/Release-notes-for-1-1-0.html#support-for-reading-options-from-mesonoptions

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

show more ...

24b8b4be07-Aug-2023 Willy Tu <wltu@google.com>

Add option to override of_node to use devpath

Allow us to force phosphor-hwmon to use the devpath to detect even if
the of_name exists. Some system may not be setup properly to have the
hwmon setup

Add option to override of_node to use devpath

Allow us to force phosphor-hwmon to use the devpath to detect even if
the of_name exists. Some system may not be setup properly to have the
hwmon setup matching what we needed. This allow us to have the
flexibility to override some config if we are not able to fix it on the
driver side.

The linux change in
https://github.com/torvalds/linux/commit/2315332efcbe7124252f080e03b57d3d2f1f4771
create the of_node to the device's ancestor instead of having it
missing. This forces multiple devices to be linked to the same node.
This required a single config to support multiple different type of
devices.

This change allow us to avoid that if it is not feasible to fix the
issue on the driver side.

Tested:
Override the devices with devpath only and didn't break other devices.

```
meson build -Doverride-with-devpath=nodeA,nodeB
```

with this if the `of_fullname` has a filename ended with nodeA or
nodeB, then it will not use the `of_fullname` and use the devpath
instead.

Change-Id: I76d05f0cf2aa8de3b7efadea8eb513f4708f049b
Signed-off-by: Willy Tu <wltu@google.com>

show more ...

64b90bfb12-Jul-2023 Patrick Williams <patrick@stwcx.xyz>

build: upgrade to C++23

Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of
the standard has been implemented. Upgrade the build to leverage it.

Change-Id: Ic14c5611d1d740495dd5f

build: upgrade to C++23

Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of
the standard has been implemented. Upgrade the build to leverage it.

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

show more ...

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

6b5af74c12-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

meson: remove deprecated get_pkgconfig_variable

Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In
meson 0.58 the `get_variable` was enhanced to no longer require the
`pkgconfig

meson: remove deprecated get_pkgconfig_variable

Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In
meson 0.58 the `get_variable` was enhanced to no longer require the
`pkgconfig` keyword argument. Ensure meson 0.58 is required and update
the usage of all `get_pkgconfig_variable` and `get_variable` to be the
modern variant.

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

show more ...

46a29b7f08-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

markdownlint: fix all warnings

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

5203d48a08-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

prettier: re-format

Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.

prettier: re-format

Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.

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

show more ...

c4f67be608-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

beautysh: re-format

beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh
files to have a consistent formatting. Re-run the formatter on the
whole repository.

Change-Id: I20d4441de

beautysh: re-format

beautysh is enabled in the openbmc-build-scripts on Bash/Zsh/POSIX-sh
files to have a consistent formatting. Re-run the formatter on the
whole repository.

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

show more ...

c9d6161312-Oct-2022 George Liu <liuxiwei@inspur.com>

sensor: Implement sensor "ACCURACY"

Support the accuracy attribute of the sensor. Since the latest
Redfish spec needs to support the accuracy attribute of the sensor,
extend the configuration file s

sensor: Implement sensor "ACCURACY"

Support the accuracy attribute of the sensor. Since the latest
Redfish spec needs to support the accuracy attribute of the sensor,
extend the configuration file syntax to support the accuracy value,
read the value and publish it to the new D-Bus Accuracy interface.

Also, This function will be synchronized to the dbus sensors repo in
the future.

Tested: Build phosphor-hwmon successfully
eg: The configuration accuracy in power supply is 1
~# busctl get-property xyz.openbmc_project.Hwmon-xxx.Hwmon1
/xyz/openbmc_project/sensors/power/ps0_input_power
xyz.openbmc_project.Sensor.Accuracy Accuracy
d 1

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

show more ...

5e5259bf04-Aug-2022 Patrick Williams <patrick@stwcx.xyz>

MAINTAINERS: remove file

The MAINTAINERS file is deprecated in favor of OWNERS.

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


ad6043f622-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: I86dfa77a53a306b0e868eeb82de30b270704c455

show more ...

cabec7f722-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

OWNERS: switch 'matches' to 'matchers'

The original OWNERS template had a mistake which used 'matches' instead
of the field supported by the Gerrit plugin 'matchers'. Update the
OWNERS file to have

OWNERS: switch 'matches' to 'matchers'

The original OWNERS template had a mistake which used 'matches' instead
of the field supported by the Gerrit plugin 'matchers'. Update the
OWNERS file to have the correct field.

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

show more ...

0bbd07c007-Apr-2022 Matt Spinler <spinler@us.ibm.com>

Use proper path in service file

Using '/usr/bin/env' is now an antipattern.

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

d273b1e030-Mar-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: object: don't use 'bool' argument constructor

`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.

sdbusplus: object: don't use 'bool' argument constructor

`sdbusplus::server::object_t` has long had an enum-based parameter for
signal action, but maintained a backwards compatible boolean mapping.
It is time to remove this boolean to make it more observable which
actions are being used in applications. Map all `true` occurrences to
`action::defer_emit` or `action::emit_no_signals` as appropriate.

- Value: defer_emit (primary object)
- Others: emit_no_signals (secondary objects)

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

show more ...

12345678910>>...12