| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Use filesystem now that it should be available instead of
experimental::filesystem.
Change-Id: I62838b343ce34f85a47661f1eaaff3c7e6338bbf
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
The _scale member will not be used without ::addValue() being called
first, however, initialize it regardless to 0.
Change-Id: I712e9192500a8a58db03bcbbaf0f0d736f1dfd23
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Add underscore prefix to members for sensor object.
Change-Id: I5b59f9f45cc20bd700940bc3b0e5d2d4127b333d
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Cppcheck CI tool identified many variables whose scope could be reduced.
Change-Id: I1478b5680adc560d08bc74ffc91929b1d19e24fa
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I94ce26d595367e08d6fb3734535bcd855f1b1473
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|