commit | b28f432a3fdb96c634e93ea27807daec59a941e7 | [log] [tgz] |
---|---|---|
author | Patrick Venture <venture@google.com> | Fri Sep 14 10:19:14 2018 -0700 |
committer | Patrick Venture <venture@google.com> | Fri Sep 21 10:26:14 2018 -0700 |
tree | 7c3619d61d1f662bd29389fe34d3e3ba984af0e6 | |
parent | 86e58fffbb3a889beb2e306464929819dbf97986 [diff] |
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>
Exposes generic hwmon entries as DBus objects. More information can be found at Sensor Architecture
To build this package, do the following steps: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make To clean the repository run `./bootstrap.sh clean`.
To enable the use of Linux features like cgroups prioritization and udev/systemd control, one instance of phosphor-hwmon is intended to be run per hwmon sysfs class instance. This requires an algorithm for selecting a stable, well-known D-Bus busname. The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is an autoconf configurable prefix (BUSNAME_PREFIX, xyz.openbmc_project by default), ID is a std::hash of the /sys/devices path backing the hwmon class instance, and N is the implemented phosphor-hwmon D-Bus API version.