#
94539af6 |
| 01-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Ie32798cbf7083f3e59a4f36ff9459bb737c97476 Signed-off-by: Patrick Williams <p
clang-format: update latest spec and reformat
Copy the latest format file from the docs repository and apply.
Change-Id: Ie32798cbf7083f3e59a4f36ff9459bb737c97476 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
30cab629 |
| 17-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 ...
|
#
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 ...
|
#
47fb49ac |
| 19-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 ...
|
#
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 ...
|
#
c9d61613 |
| 12-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 ...
|
#
6d50c3e9 |
| 09-Aug-2019 |
Brandon Kim <brandonkim@google.com> |
sensor: Implement sensor "ASYNC_READ_TIMEOUT"
This change will prevent sensors from blocking all other sensor reads and D-Bus if they do not report failures quickly enough.
If "ASYNC_READ_TIMEOUT"
sensor: Implement sensor "ASYNC_READ_TIMEOUT"
This change will prevent sensors from blocking all other sensor reads and D-Bus if they do not report failures quickly enough.
If "ASYNC_READ_TIMEOUT" environment variable is defined in the sensor's config file for a key_type, the sensor read will be asynchronous with timeout set in milliseconds.
For example for "sensor1": ASYNC_READ_TIMEOUT_sensor1="1000" // Timeout will be set to 1 sec
If the read times out, the sensor read will be skipped and the sensor's functional property will be set to 'false'. Timed out futures will be placed in a map to prevent their destructor from running and blocking until the read completes (limitation of std::async).
Tested: This patch has been running downstream for over a year to solve a slow I2C sensor reads causing IPMI slowdown.
Change-Id: I3d9ed4d5c9cc87d3196fc281451834f3001d0b48 Signed-off-by: Brandon Kim <brandonkim@google.com>
show more ...
|
#
2227bd52 |
| 19-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 ...
|
#
15492e74 |
| 16-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 ...
|
#
86dcac85 |
| 18-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 ...
|
#
db76d49c |
| 17-Jun-2019 |
Brandon Kim <brandonkim@google.com> |
sensor: Implement RAII object for GPIO unlock and lock
There is a bug where GPIO lock may not be called if there is an exception after GPIO unlock. Adding an RAII object for GPIO lock and replacing
sensor: Implement RAII object for GPIO unlock and lock
There is a bug where GPIO lock may not be called if there is an exception after GPIO unlock. Adding an RAII object for GPIO lock and replacing the current usage of gpioUnlock, gpioLock in sensor.cpp and mainloop.cpp.
Bug: openbmc/phosphor-hwmon#11 Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: Ica094e716a6ff9dc99165651f83fc496d5ed5a17
show more ...
|
#
12659aa1 |
| 19-Dec-2018 |
Patrick Venture <venture@google.com> |
sensor: add underscore prefix to members
Add underscore prefix to members for sensor object.
Change-Id: I5b59f9f45cc20bd700940bc3b0e5d2d4127b333d Signed-off-by: Patrick Venture <venture@google.com>
|
#
e3e0f97d |
| 19-Dec-2018 |
Patrick Venture <venture@google.com> |
test: add gpiohandle mock impl
Add gpio handle mock implementation for use in testing.
Change-Id: I0fb2d1af4739ad700f62a4e7cbbe62db528bb93e Signed-off-by: Patrick Venture <venture@google.com>
|
#
2864b063 |
| 19-Dec-2018 |
Patrick Venture <venture@google.com> |
sensor: to enable testing receive hwmonio interface pointer
The sensor objects all share a reference to the mainloop's ioAccess object. To enable testing, the sensor object needs to expect the base
sensor: to enable testing receive hwmonio interface pointer
The sensor objects all share a reference to the mainloop's ioAccess object. To enable testing, the sensor object needs to expect the base pointer to this object.
Change-Id: I1d7f2841528776c8d4f1166e20874ddeb4b8554a Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
ee73f5bd |
| 01-Aug-2018 |
James Feist <james.feist@linux.intel.com> |
Make hwmon work with double or int64 interface
Deduce type based on interface using decltype and if it is double apply scale to the value.
Tested-by: Noticed that on dbus using busctl and debug ser
Make hwmon work with double or int64 interface
Deduce type based on interface using decltype and if it is double apply scale to the value.
Tested-by: Noticed that on dbus using busctl and debug server that doubles were produced and scaled.
Also verifed that hwmon still produced int64_t values when building with current phosphor-dbus-interfaces.
Change-Id: I00e21d5ef0ea6cee0eb30baa0b39cde95e7f4a86 Signed-off-by: James Feist <james.feist@linux.intel.com>
show more ...
|
#
b28f432a |
| 14-Sep-2018 |
Patrick Venture <venture@google.com> |
Use gpioplus for specifying gpio gating
A GPIO can control whether a hwmon sensor is readable. This module allows one to specify whether a sensor is gated and by what GPIO. This is often the case
Use gpioplus for specifying gpio gating
A GPIO can control whether a hwmon sensor is readable. This module allows one to specify whether a sensor is gated and by what GPIO. This is often the case for battery voltages, such that the battery isn't drained constantly by being left open.
For each sensor where you need GPIO locking: GPIOCHIP_in1=0 GPIO_in1=53
such that GPIOCHIP is the gpiochip: /sys/bus/gpio/devices/gpiochip{id} such that GPIO is the line offset. the value used to unlock the sensor via gpio is 1 after 1 is written to the gpio, it pauses for 500ms
Tested: Verified the failure case for invalid gpio fields. Verified correct behavior on two platforms. Change-Id: I2fa12848972075cad0e0f69c0bfa6382e15d4f50 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>
|
#
ac47309f |
| 07-May-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Move sensor adjust within sensor object
All sensor adjustments should be contained within the sensor object for the sensor. This allows the adjustments to be retrieved for a given sensor and applied
Move sensor adjust within sensor object
All sensor adjustments should be contained within the sensor object for the sensor. This allows the adjustments to be retrieved for a given sensor and applied accordingly.
Tested: No change in adjusting a sensor value No change in removing a sensor given a removal return code
Change-Id: I5e1e40fe41b4064422a47178aec1f297b781566d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
cb3daafb |
| 07-May-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Move value iface creation into sensor object
Create the Sensor.Value interface for a sensor within the sensor object. Each sensor must have an input sysfs file to get a Value property on the Sensor.
Move value iface creation into sensor object
Create the Sensor.Value interface for a sensor within the sensor object. Each sensor must have an input sysfs file to get a Value property on the Sensor.Value interface and be included by hwmon.
Tested: No change in value interface creation for sensors
Change-Id: I09b1c79142ba2a34424f5ec29f41d19a987c84e7 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
2e41b13f |
| 07-May-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Move status iface creation into sensor object
For sensors that have a status interface created with a functional property set according to its fault sysfs file value, the object associated with the
Move status iface creation into sensor object
For sensors that have a status interface created with a functional property set according to its fault sysfs file value, the object associated with the sensor should contain the creation of this interface.
Tested: No change in status interface creation for sensors
Change-Id: Ic3c0a81c661ac481b90ad9bd4c8bf415dae3520e Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
9c43106c |
| 07-May-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Add sensor object framework
Create a sensor object to store sensor monitoring specifications.
Tested: Sensor objects are created and stored for each sensor
Change-Id: Idfa982f1bb8da888abbd4738
Add sensor object framework
Create a sensor object to store sensor monitoring specifications.
Tested: Sensor objects are created and stored for each sensor
Change-Id: Idfa982f1bb8da888abbd473881870df4beec6824 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
35819381 |
| 18-Apr-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Add status interface to sensors
When a fault sysfs file is present for a sensor, the OperationalStatus interface is attached to the sensor object. The functional property is initially set to the cor
Add status interface to sensors
When a fault sysfs file is present for a sensor, the OperationalStatus interface is attached to the sensor object. The functional property is initially set to the corresponding value read from the fault sysfs file when the sensor object is created. A follow-up commit will address updating the functional property based on reading the fault sysfs file during the polling interval.
Tested: OperationalStatus interface created for sensors with fault files Interface not created for sensors without fault file Functional property set to correct value from sensor's fault file
Change-Id: Id75b3711d048d4667d2173a3255512cf5482ab67 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|