History log of /openbmc/phosphor-hwmon/ (Results 51 – 75 of 293)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
bc58decd16-Mar-2021 Anton D. Kachalov <gmouse@google.com>

Make shellcheck happy about the max31785-msl script

Signed-off-by: Anton D. Kachalov <gmouse@google.com>
Change-Id: I84a6ce4fa6ff9172c2c91f93e6d01784d9ea46f9

82921ae802-Feb-2021 Matt Spinler <spinler@us.ibm.com>

Change an sdbusplus mock signature

The signature of sd_bus_emit_properties_changed_strv changed.

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

9455535216-Nov-2020 Matthew Barth <msbarth@us.ibm.com>

max31785-msl: Default not to install

Default not to install the max31785-msl script and provide autoconf and
meson options to install it. This is a tool used to check the revision
of the MAX31785 fa

max31785-msl: Default not to install

Default not to install the max31785-msl script and provide autoconf and
meson options to install it. This is a tool used to check the revision
of the MAX31785 fan controller chip against a configuration defining
what the minimum ship level is required. Always installing this script
isn't necessary where a MAX31785 chip doesn't exist in a machine or
where the revision of it needs to be verified.

Tested:
Built using autoconf where the max31785-msl script is only installed
when `--enable-max31785-msl` is given
Build using meson where the max31785-msl script is only installed
when `-Denable-max31785-msl=true` is given

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

show more ...

7ab1b25b22-Jul-2020 Matt Spinler <spinler@us.ibm.com>

Fix applying sensor scale on first read

In Sensor::addValue(), the adjustValue() function was being called
before the _scale member was getting set. So until the first interval
timer expired the se

Fix applying sensor scale on first read

In Sensor::addValue(), the adjustValue() function was being called
before the _scale member was getting set. So until the first interval
timer expired the sensor value would be unscaled. For example it could
show a temperature of 27000.0 instead of 27.0.

To fix this, reorder the code so that first _scale would get set, then
the sensor value would get adjusted based on _scale, and finally the
value could be set on the Value interface.

Tested:
Use a big INTERVAL config value so that I can check the first read of a
sensor does leave it unscaled. Then test with fix and check that it
is correct.

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

show more ...

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

ecac0ae208-Jul-2020 Matt Spinler <spinler@us.ibm.com>

Fixes for when sensor value is a double

The change to the xyz.openbmc_project.Sensor.Value interface that moves
the Value property to a double from an int64_t has merged, which
uncovered some proble

Fixes for when sensor value is a double

The change to the xyz.openbmc_project.Sensor.Value interface that moves
the Value property to a double from an int64_t has merged, which
uncovered some problems in the code that was trying to detect the type
and handle it accordingly.

This does remove support for the Scale property on the Value interface,
as meson CI won't even compile with it since the double version of it is
empty and so the function has unused parameters, which meson doesn't
like.

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

show more ...

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

5906173a07-Oct-2019 Brad Bishop <bradleyb@fuzziesquirrel.com>

build: add support for building with meson

Follow the OpenBMC herd and support a more modern, more comprehensible,
more performant build framework.

To build using meson:
meson build
ninja -C bu

build: add support for building with meson

Follow the OpenBMC herd and support a more modern, more comprehensible,
more performant build framework.

To build using meson:
meson build
ninja -C build
ninja -C build install

Maintain support for:
Configurable dbus parameters:
BUSNAME_PREFIX= -> -Dbusname-prefix=
SENSOR_ROOT= -> -Dsensor-root=
System call failure behavior:
--enable-negative-errno-on-failure -> -Dnegative-errno-on-fail
--enable-update-functional-on-fail -> -Dupdate-functional-on-fail

Add -Dtests to match de-facto OpenBMC meson usage conventions.

Drop support for --enable-oe-sdk rpath munging. This is a workaround
for broken oe sdks that don't figure out the correct rpath when running
make check or ninja test.

Upstream meson does not currently have support for custom code coverage
parameters:
https://github.com/mesonbuild/meson/issues/4628

Autotools does support this, so support of our custom code coverage
parameters cannot be maintained using meson, without meson enhancements.

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

show more ...

ddbf1c6817-Oct-2019 Gunnar Mills <gmills@us.ibm.com>

Update sensor-architecture.md link

sensor-architecture.md is moving under architecture/ as part of
https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/26251/

26251 should merge before this is merge

Update sensor-architecture.md link

sensor-architecture.md is moving under architecture/ as part of
https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/26251/

26251 should merge before this is merged.

Change-Id: I3d01bf49d4bf22a18c74a96d0547dcbd060ef046
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...

778f5c3907-Oct-2019 Brad Bishop <bradleyb@fuzziesquirrel.com>

tests: fix warnings

Fix a couple of warnings:

-Werror=unused-parameter

so we can use meson's warning_level=3 and -Werror without build
failures.

Change-Id: I1c3930226b34d6beeb7c5fb5ce135c722d3e87

tests: fix warnings

Fix a couple of warnings:

-Werror=unused-parameter

so we can use meson's warning_level=3 and -Werror without build
failures.

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

show more ...

57e18b9407-Oct-2019 Brad Bishop <bradleyb@fuzziesquirrel.com>

test: average: avoid unwanted implicit type deduction

Avoid undesired implicit type deduction of std::make_pair with integer
literal arguments. Ensure the correct type of int64_t is always
deduced;

test: average: avoid unwanted implicit type deduction

Avoid undesired implicit type deduction of std::make_pair with integer
literal arguments. Ensure the correct type of int64_t is always
deduced; long is not 64 bits wide on all platforms.

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

show more ...

bd9bc00b21-Aug-2019 Kun Yi <kunyi731@gmail.com>

Rework envMock

Instead of mocking all the functions, only mock std::getenv.
Now each test only needs to provide an EnvImpl that delegate calls to
mockEnv in order to inject dependencies on std::gete

Rework envMock

Instead of mocking all the functions, only mock std::getenv.
Now each test only needs to provide an EnvImpl that delegate calls to
mockEnv in order to inject dependencies on std::getenv. This for several
reasons:
1. Any call to env::getEnv() will be calling the real implementation of
the C++ code, and testing real code is better than testing mocks.
2. It is easier to write a fake class that takes a config string which
can greatly simplify test cases.
3. We can now write unit tests that ensure the number of times
std::getenv gets called (should be once, but multiple times right now).

Tested: unit tests still pass

Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I3e5aff7fa5d025de1b8ae798af43b97d31151ab9

show more ...

94a04c4e21-Aug-2019 Kun Yi <kunyi731@gmail.com>

Suppress clang-format on one case

Newer version of clang-format will format this pair of braces differently
than clang-format-8, which is the version used in upstream CI. Turn off
clang-format to av

Suppress clang-format on one case

Newer version of clang-format will format this pair of braces differently
than clang-format-8, which is the version used in upstream CI. Turn off
clang-format to avoid a clang version update in CI breaking us.
Difference shown below.

```

Change-Id: I1633522f0c028af3cfd395bb143a5ea00410648e
--- a/mainloop.cpp (clang 8.0)
+++ b/mainloop.cpp (clang 10.0)
@@ -80,8 +80,7 @@ void updateSensorInterfaces(InterfaceMap& ifaces, int64_t value)
{
switch (iface.first)
{
- case InterfaceType::VALUE:
- {
+ case InterfaceType::VALUE: {
```

Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I1339a10173a4632decbe1be6c4d7ab8a397a9f38

show more ...

9bbe602601-Aug-2019 Carol Wang <wangkair@cn.ibm.com>

Support averaging power values

Support new env variables 'AVERAGE_power* = "true"' in hwmon config file.
When this env variable is set, power value is the calculated average value.
Otherwise, power

Support averaging power values

Support new env variables 'AVERAGE_power* = "true"' in hwmon config file.
When this env variable is set, power value is the calculated average value.
Otherwise, power value is from power*_input by default.
The new average of power is calculated since the last time the sensor's
values were changed and read.

average =
(cur_average*cur_average_interval - pre_average*pre_average_interval) /
(cur_average_interval - pre_average_interval)

hwmon config example:
AVERAGE_power2 = "true"
AVERAGE_power3 = "true"
AVERAGE_power4 = "true"

Tested: Set AVERAGE_power* in p0 OCC hwmon conf but not in p1 OCC hwmon conf,
then get power sensor info with restapi to check the values.
1. The values of p0*power are all average values.
2. The values of p1*power are all input values.

Note:
Delete $(CODE_COVERAGE_CPPFLAGS) in AM_CPPFLAGS in test/Makefile.am.
This option will define NDEBUG during configuration, then assert in
code doesn't work.

Resolves: openbmc/openbmc#3187
Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
Change-Id: I8d97a7b2905c79cd4f2c276b32e7f5590ffc0483

show more ...

2227bd5219-Jun-2019 William A. Kennington III <wak@google.com>

sensor: Replace GpioLock with stdplus RAII helper

The old RAII helper was not move safe, although it was never moved in
the current code so it didn't have any effect on runtime safety.

Change-Id: I

sensor: Replace GpioLock with stdplus RAII helper

The old RAII helper was not move safe, although it was never moved in
the current code so it didn't have any effect on runtime safety.

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

show more ...

501ade2415-Jul-2019 Kun Yi <kunyi731@gmail.com>

[cleanup] mainloop: simplify with structured bindings

This somewhat avoids cryptic names when looping through maps. Still
doesn't help with type checking which can be fixed later.

Signed-off-by: Ku

[cleanup] mainloop: simplify with structured bindings

This somewhat avoids cryptic names when looping through maps. Still
doesn't help with type checking which can be fixed later.

Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: Iee69605211580e2f95005480bae2812ef1bc0d09

show more ...

553552c416-Jul-2019 Kun Yi <kunyi731@gmail.com>

[cleanup] mainloop: continue early

Do an early continue if hwmon input attr file is not there, which would
save one nested loop.

Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I03795240355f9

[cleanup] mainloop: continue early

Do an early continue if hwmon input attr file is not there, which would
save one nested loop.

Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I03795240355f96503d62aaf267f168862c298bba

show more ...

15492e7416-Jul-2019 Kun Yi <kunyi731@gmail.com>

[cleanup] sensor: Fix function declaration constness

Add const qualifier to a couple of getter methods such that they can be
used with a const reference object. Also, const bool doesn't make sense.

[cleanup] sensor: Fix function declaration constness

Add const qualifier to a couple of getter methods such that they can be
used with a const reference object. Also, const bool doesn't make sense.

Change-Id: Ib3127aba83c2f9c2479ada7078147358103188ff
Signed-off-by: Kun Yi <kunyi731@gmail.com>

show more ...

79205b2c20-Jun-2019 Brandon Kim <brandonkim@google.com>

sensor: Add UPDATE_FUNCTIONAL_ON_FAIL and its behavior

Add the build switch UPDATE_FUNCTIONAL_ON_FAIL. When enabled, sensor
read failures will not exit the mainloop. Instead, mainloop will update
th

sensor: Add UPDATE_FUNCTIONAL_ON_FAIL and its behavior

Add the build switch UPDATE_FUNCTIONAL_ON_FAIL. When enabled, sensor
read failures will not exit the mainloop. Instead, mainloop will update
the Functional property and skip the read of that sensor.

This will skip the "Remove RCs" check during value interface creation in
MainLoop::getObject. However, it will perform the "Remove RCs" checks
during MainLoop::read.

Tested: I was able to use busctl to read the Functional property of a
custom driver to test with UPDATE_FUNCTIONAL_ON_FAIL defined.
1. Negative values were reported, Functional was true
2. Sensor reporting errors had stale values, Functional was set to false

Resolves: openbmc/phosphor-hwmon#10
Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: I0984dad12250e9587ec36de2f9212de0b0e1cda6

show more ...

0892c3fb27-Jun-2019 Patrick Venture <venture@google.com>

drop remove_from_dbus_on_fail option

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

feb744a726-Jun-2019 Patrick Venture <venture@google.com>

mainloop: move out the interface update method

Move the interface update method out of the read() loop.

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

mainloop: move out the interface update method

Move the interface update method out of the read() loop.

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

show more ...

1fc55df826-Jun-2019 Patrick Venture <venture@google.com>

mainloop: delete unused local empty pointer instances

Delete local variables that are not used.

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

mainloop: delete unused local empty pointer instances

Delete local variables that are not used.

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

show more ...

86dcac8518-Jun-2019 Brandon Kim <brandonkim@google.com>

sensor: Always add status interface, track fault file with class member

Always add the status interface regardless of whether there is a
fault file or not and update the functional property accordin

sensor: Always add status interface, track fault file with class member

Always add the status interface regardless of whether there is a
fault file or not and update the functional property accordingly.

Added a new sensor class member to track the presence of fault file.

Resolves: openbmc/phosphor-hwmon#10
Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: I4480541691ccfa853d85151965428c564db8ba52

show more ...

802d94fb24-Jun-2019 Patrick Venture <venture@google.com>

MAINTAINERS: +R: Brandon Kim

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

caaebd1f21-Jun-2019 Patrick Venture <venture@google.com>

hwmonio: Add injection point to test internal behavior

With the complexities of the various behaviors within the read() method
of HwmonIO, introduce an injection point for testing. There is a
defau

hwmonio: Add injection point to test internal behavior

With the complexities of the various behaviors within the read() method
of HwmonIO, introduce an injection point for testing. There is a
default available, and therefore this is a surgical change that only
impacts future tests.

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

show more ...

12345678910>>...12