#
16805a6a |
| 21-Jun-2019 |
Patrick Venture <venture@google.com> |
mainloop: Make HwmonIO injectable dependency HwmonIO was make into a interface object implementation. This patch transitions mainloop to receive a pointer to this interface to allow for
mainloop: Make HwmonIO injectable dependency HwmonIO was make into a interface object implementation. This patch transitions mainloop to receive a pointer to this interface to allow for injection testing. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iaa470fafccb42c4d7fbabac0dc92f96c8075faf2
show more ...
|
#
0cd4f69f |
| 21-Jun-2019 |
Patrick Venture <venture@google.com> |
mainloop: add helper methods for sensor removal Add a helper method that will remove from dbus sensors that are marked for removal and another helper method that will attempt to add sens
mainloop: add helper methods for sensor removal Add a helper method that will remove from dbus sensors that are marked for removal and another helper method that will attempt to add sensors marked for removal back. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iecb96045cc63d93f2896af9f6a8c2672ca8fcbb2
show more ...
|
#
6206723d |
| 19-Jun-2019 |
Patrick Venture <venture@google.com> |
rename Object type to InterfaceMap Rename the Object type to InterfaceMap to give it a less opaque name. The word object is somewhat overloaded. Signed-off-by: Patrick Venture <
rename Object type to InterfaceMap Rename the Object type to InterfaceMap to give it a less opaque name. The word object is somewhat overloaded. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ie1862450c15c8a8cecf7fcbec3552608d6a20cce
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
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 ...
|
#
d0ce7925 |
| 06-Jun-2019 |
Matthew Barth <msbarth@us.ibm.com> |
Emit signal and remove sensors from dbus When a sensor is configured to be removed upon certain return codes being returned when read, that sensor object should emit the proper signa
Emit signal and remove sensors from dbus When a sensor is configured to be removed upon certain return codes being returned when read, that sensor object should emit the proper signals and be removed from dbus. This may have previously been occurring but recently it was noticed that is not the case, so emit an object removed signal so the sensor object is removed from dbus and any applications subscribed to that sensor will be notified. Tested: For a sensor configured to be removed upon a rc, triggered that bad sensor read rc and used `busctl monitor` to see signals. Change-Id: Ia9557ea548bd5a00a9bd6fdf91d4aa91d8458225 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
52b40613 |
| 19-Dec-2018 |
Patrick Venture <venture@google.com> |
mainloop: add underscore prefix to members Most members of mainloop object have an underscore prefix. For consistency add this prefix to all members. The discussion within OpenBMC
mainloop: add underscore prefix to members Most members of mainloop object have an underscore prefix. For consistency add this prefix to all members. The discussion within OpenBMC pertaining to prefixes and suffixes for member variables indicates there is latitude within a repository. Change-Id: Ifce915923b9b8c58a433f334d45e19143b7b734f Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
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 exp
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 ...
|
#
0e749757 |
| 06-Nov-2018 |
William A. Kennington III <wak@google.com> |
mainloop: Include <cassert> We are currently relying on sdbusplus implicitly including cassert for us. Since we use assert(), depend on the header providing it. Change-Id: Idb77
mainloop: Include <cassert> We are currently relying on sdbusplus implicitly including cassert for us. Since we use assert(), depend on the header providing it. Change-Id: Idb771e74d5c0d5bdb0d82455dfd9d2e1a8b6b6ef Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
db7ecb6a |
| 23-Oct-2018 |
Patrick Venture <venture@google.com> |
cleanup: add const to read-only iterators Add const to read-only iterators. Change-Id: I848ec6a9558781fc193e19efa63494ec0cea3f46 Signed-off-by: Patrick Venture <venture@google.c
cleanup: add const to read-only iterators Add const to read-only iterators. Change-Id: I848ec6a9558781fc193e19efa63494ec0cea3f46 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
0dd0c4d7 |
| 18-Oct-2018 |
William A. Kennington III <wak@google.com> |
timer: Remove in favor of sdeventplus/timer Lets use the new standard event loop timer utility that comes with sdeventplus instead of the one copied from other projects. Change-
timer: Remove in favor of sdeventplus/timer Lets use the new standard event loop timer utility that comes with sdeventplus instead of the one copied from other projects. Change-Id: Ie7c8f462f2c0e2e05ce14da58b30a1f91acbf75d Signed-off-by: William A. Kennington III <wak@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
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 ...
|
#
0fe4cb34 |
| 18-Oct-2018 |
William A. Kennington III <wak@google.com> |
mainloop: Use sdeventplus Convert to using sdeventplus instead of sd_event directly. Change-Id: Ie8ee25c2d75ac4c56b88fb79f70eaa53c4f7b6e4 Signed-off-by: William A. Kennington II
mainloop: Use sdeventplus Convert to using sdeventplus instead of sd_event directly. Change-Id: Ie8ee25c2d75ac4c56b88fb79f70eaa53c4f7b6e4 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
4cbdfef2 |
| 18-Oct-2018 |
William A. Kennington III <wak@google.com> |
Remove old experimental includes We are now using c++17 so we no longer need experimental optional and any. We can use the standard any and optional now. Change-Id: I88fcb4258c6
Remove old experimental includes We are now using c++17 so we no longer need experimental optional and any. We can use the standard any and optional now. Change-Id: I88fcb4258c69ac5ad9766e2c65463c52a3b7f05f Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
#
685efa16 |
| 12-Oct-2018 |
Patrick Venture <venture@google.com> |
cleanup: reduced scope of variables Cppcheck CI tool identified many variables whose scope could be reduced. Change-Id: I1478b5680adc560d08bc74ffc91929b1d19e24fa Signed-off-by:
cleanup: reduced scope of variables Cppcheck CI tool identified many variables whose scope could be reduced. Change-Id: I1478b5680adc560d08bc74ffc91929b1d19e24fa Signed-off-by: Patrick Venture <venture@google.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
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 se
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
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 asso
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-I
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 ...
|
#
7c424807 |
| 04-May-2018 |
Matt Spinler <spinler@us.ibm.com> |
Support indirections other than just "label" The current code only allowed the MODE_<type><Num> env var to be "label" when doing DBus naming indirection. Add support to allow it
Support indirections other than just "label" The current code only allowed the MODE_<type><Num> env var to be "label" when doing DBus naming indirection. Add support to allow it to be anything, and then use that value to do the lookup. For example, if MODE_temp1 = "foo", then the code will read the temp1_foo file to find the value to append to LABEL to find the DBus object name. So if temp1_foo contained a 42, then the code will use the LABEL_temp42 var to find the object name. Tested: Test on the OpenPower OCC device which use 'label' and now 'function_id' for the indirections. Change-Id: I1f3115a2d37d008efca74748ac7eff8434d8320a Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
c897d8bb |
| 23-Apr-2018 |
Patrick Venture <venture@google.com> |
mainloop: add uniqueness to busname There can be multiple daemon instances that have the same devpath which leads to a collision which errors silently. This adds uniqueness to the pa
mainloop: add uniqueness to busname There can be multiple daemon instances that have the same devpath which leads to a collision which errors silently. This adds uniqueness to the path, which was no longer human-readable to avoid this collision situation. Tested: Ran on quanta-q71l with unique devices and two instances pointing to the same device and it correctly set them up with unique but deterministic bus names. Change-Id: Id5aea3c3df5f793b28557a74995608ec40792a43 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
#
0b305058 |
| 26-Apr-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Remove OCC EREMOTEIO return code hack With openbmc/openbmc#2329, an OCC sensor value will not be read when the associated fault file is set to true. This will set the value to 0 when
Remove OCC EREMOTEIO return code hack With openbmc/openbmc#2329, an OCC sensor value will not be read when the associated fault file is set to true. This will set the value to 0 when a sensor is faulted at startup or not update the previous value during the monitoring loop if the OCC sensor becomes faulted. Applications(i.e. fan control) needing to react to a faulted OCC sensor can subscribe to property changed signals on the OperationalStatus Functional property for the sensor's dbus object. Tested: A faulted OCC sensor has a non-functional status on dbus Change-Id: Ia43ebb1e0fe0227797bc4034e617ac357edd348d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
bfcaf3d8 |
| 25-Apr-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Refresh sensor functional state During the monitoring loop, the associated fault file of a sensor is read and its functional status is updated prior to reading the sensor's input fil
Refresh sensor functional state During the monitoring loop, the associated fault file of a sensor is read and its functional status is updated prior to reading the sensor's input file. Tested: The functional property is updated according to its fault file Resolves: openbmc/openbmc#2329 Change-Id: Icc28e914df79c6681d45e92a5ea4054704ad8efd Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
#
27c4a394 |
| 25-Apr-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Skip updating value for faulted sensors When a sensor is marked as faulted, the input value is skipped from being read and updated in the sensor's dbus object during the monitoring l
Skip updating value for faulted sensors When a sensor is marked as faulted, the input value is skipped from being read and updated in the sensor's dbus object during the monitoring loop. This keeps the sensor's value set to its previously known state. The hwmon documentation states that when a sensor input channel presents an associated fault file, the measurement value provided for that channel should not be trusted when the fault boolean has a value of 1. Not updating the sensor value follows this specification. Tested: A non-functional sensor's input value is not read A non-functional sensor's value state in dbus object is not updated Any functional sensor's input value is read during monitoring Any functional sensor's value state is updated during monitoring All sensors without a fault sysfs file are read/updated normally Change-Id: Iccf3e4e44125d6e481ce91c8f63e8f0e4ee3df4b Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|