| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Installs into bin instead of sbin per guidelines.
Change-Id: I298c17fb2bf6fcb6a949624f8bb2475f3878545f
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Swap out getopt for cli11 for parsing parameters.
Tested: Verified on quanta-q71l-variant that phosphor-hwmon started as
before.
Change-Id: Ic0137432afd254b77133842b5d73a5bab1e415aa
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Enable code coverage for the project. Valgrind not enabled in this
step.
Tested: Verified code coverage step now running.
Change-Id: Ieb3606e5ad741fb0dd181f8da594c18258efa6bc
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Convert to using sdeventplus instead of sd_event directly.
Change-Id: Ie8ee25c2d75ac4c56b88fb79f70eaa53c4f7b6e4
Signed-off-by: William A. Kennington III <wak@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Split out the hwmon io access object from the sysfs namespace
into its own.
Change-Id: I8d1a45630117d1d503d0d5fa6061163911b695e8
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
This patchset just starts the process of adding unit-tests
to the hwmon module.
Change-Id: I569aa97658b0ff56634ddf1a599fedb4caa95abe
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Moved the current test folder to tools and started a new test
folder. This will allow for rapid introduction of new unit-tests into
phosphor-hwmon. The tools folder contains small tools to aid in
phosphor-hwmon configuration and misc. This folder will go under review
at another time.
Change-Id: Ice18ffb5cdcbd519d49088e233a8082a9410b03e
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
Moved the code that maps a sensor type to its dbus and
hwmon components from mainloop to the hwmon namespace.
Change-Id: I7963951c9484c02d17a3eb415906859609e0efd3
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
| |
The class provides for a timer, callback invocation on timer expiry, and
timer control/cleanup. This will be used in subsequent commits.
Change-Id: Ieb04e5ec76a1023efa2c3f5c5b88f03e9819c3eb
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current daemon only supports RPM-based fan control, whereas the
hwmon interface for PWM is often present. This implements the Fan
Control PWM dbus interface.
This CL is not the complete solution, but if mixed with a follow-on CL
that does this, I think it'll be ideal. For instance, this assumes the
pwm number matches, whereas the other CL lets you specify the
corresponding PWM target for the fan.
Change-Id: I23aaa0619cdefba0a004ac0d26dc6b928e78f1e8
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
| |
Add a script that checks the firmware revision of a max31785 hwmon
device and populates the MeetsMinimumShipLevel interface of the
specified inventory items.
Change-Id: If3dd527d2815edffd3b8b425a15617290016769b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Override the default FanSpeed.Target set implementation so when a target
value is written to the FanSpeed interface it is also updated in the
related fan target sysfs file. This sets a particular fan to the given
target speed.
Resolves openbmc/openbmc#962
Resolves openbmc/phosphor-hwmon#1
Change-Id: I867811737269b3f42d2a0dc15b37782a74f147b8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Reuse some code. Fix a bug in the process.
Resolves openbmc/openbmc#1254
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I3fdbb70d6372f4a3193204bd2c9b6535315a3c70
|
|
|
|
|
|
|
|
|
|
|
| |
Use libtool defaults.
Define CXXFLAGS rather than CFLAGS.
Add libraries via LIBADD rather than LDFLAGS. This allows
--as-needed to drop unnecessary libs if present.
Don't bother with PIC objects for convenience library.
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I4a6079402a01ad5f6ccfb71ca9fca44c567ec62d
|
|
|
|
|
|
|
|
| |
Log failing device path and error after a sysfs access failure.
Gracefully exit rather than crash.
Change-Id: I41316e84a70ceda8c166f31ab3269f97978da3ab
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Remove manually generated server bindings.
Change-Id: I77ccda7f669d58f55e86ee5887dbbb380c673390
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Sensor configuration is passed to the application via the enviroment.
Create a map of environment values for a given sensor.
Change-Id: I8369eda27798fd9472166e898b8d6166c6997392
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Temporarily add the server bindings for xyz.openbmc_project.Sensor.Threshold
until they are available elsewhere.
Change-Id: I476d0ee3abbc5a93a6720eedc4ecfa8ae0cc3d0c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Provide a method that scans the hwmon subtree for a matching
open firmware device path.
Change-Id: Ic71dea90113c6894d9d2b61e03bd02f6b550e1e6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Temporarily add the server bindings for xyz.openbmc_project.Sensor.Value
until they are available elsewhere.
Change-Id: Ic04b88e4ef08308ce57732eca74407d5248050cf
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Prepare for DBus.
Change-Id: I59b63202db603b5137d7dce62e03f1cde177e675
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
Add a basic test that simply runs the server.
Change-Id: Ie682df8cf4dd755852e4fb07ccbc83e8bb13d629
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
| |
Isolate main in its own file for maximum flexibility
when linking.
Change-Id: I7b1f591386d69a7044c65e7aab2116626166e4ff
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
An archive is more appropriate.
Change-Id: I2fa87d0d83d3c74b4b8f44c2b6c742b1fa9f952c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
Replaced the use of a manual Makefile with the use of autotools to
automatically verify and generate the necessary build files. Follow the
steps outlined within the README.md file to build the package.
Change-Id: Ieed870c63b2bef83b3741dd22e413c25916ed408
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|