summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* monitor: Remove getServiceBrad Bishop2017-08-032-17/+0
| | | | | | | Remove getService from tach_sensor as it is no longer used. Change-Id: I568afb502379e05e85685d279033ab198c3cc91f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* monitor: Use common wrapper methodsBrad Bishop2017-08-031-32/+5
| | | | | | | | Replace the implementation of readProperty with a call to the common property accessor in sdbusplus.hpp. Change-Id: Ic4ba75bad7458a99f3e29c9235e1a54ae62286fe Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Allow existing bus connectionsBrad Bishop2017-08-031-6/+129
| | | | | | | | Overload the wrapper methods in sdbusplus.hpp for clients that already have a bus connection. Change-Id: I662385e6afe52179293ccbd41212d208e34bfbc5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* whitespace fixesBrad Bishop2017-08-031-42/+42
| | | | | Change-Id: Ibce6f79d4f4efb4a1605afc2958dd543f54ae726 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* build: Remove unused presence variableBrad Bishop2017-08-021-6/+0
| | | | | Change-Id: I72f801067ff09c91c53d32bf5ebb66fed3ec4dfc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Un-hardcode input device pathBrad Bishop2017-08-025-4/+12
| | | | | | | Allow a device path to be configured. Change-Id: I2eabd71747b124eae96738d1332f58b96ece6dc9 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Allow missing tach sensorsBrad Bishop2017-08-021-4/+19
| | | | | | | | Do not allow missing tach sensors to abort the program. Instead, assume the fan is not spinning. Change-Id: Idc923b9c57b4d180aa16f0aa4933c65e7e4a2d42 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add parser support for any ofBrad Bishop2017-08-024-2/+46
| | | | | | | Add support for the anyof yaml keyword. Change-Id: Ib28ca8ef9959cec29cb2d15a0bf758668375895f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add any of redundancy policyBrad Bishop2017-08-023-0/+154
| | | | | | | | Add a bitwise logical or redundancy policy implementation (fan is present if any sensor indicates as such). Change-Id: I1d161478a4a6fe9d5690a385703e41c6fff9c81c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add sensor to redundancy policy apiBrad Bishop2017-08-025-5/+9
| | | | | | | | | | Include a reference to the sensor changing state when sensor implementations ping the policy object. This allows policy logic based on multiple sensors, simultaneously. Change-Id: I44cf00c7ecd220d0cc99e51ca6093bac6da7343c Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add sensor comparisonBrad Bishop2017-08-023-1/+48
| | | | | | | Add a basic comparison operator for presence sensors. Change-Id: Ib147fd24f6e9ea1daf5f2b0b71943e0b4c96a8b7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Throw errors after sd_event api failuresBrad Bishop2017-08-022-9/+45
| | | | | Change-Id: Ie0635bc28fcd1a2fd96764674e15c71f1dcbe51a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add fallback testcaseBrad Bishop2017-08-022-0/+249
| | | | | Change-Id: Ic3390ba18d6f029fc16aee7492d51ac5f49bf2c0 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add test directoryBrad Bishop2017-08-022-1/+8
| | | | | Change-Id: I1d0a8e7d4c442beb271c83d5ef6be3ca69c7c115 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Switch to new frameworkBrad Bishop2017-08-0213-591/+11
| | | | | | | | | Switch the main application logic to the output produced by the new parser previously. Remove unused code. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: If8b262bd80fd0f0135aeea55e578fb3c7f44339a
* presence: Invoke pfpgen.pyBrad Bishop2017-08-024-1/+19
| | | | | | | Invoke the new parser during build. Change-Id: I3a3c8c227a79e6f80a051c5e1d3a9a2b7f4e9656 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: New parserBrad Bishop2017-08-026-0/+533
| | | | | | | | | | | Adopt an easy on the tongue acronym similar to other projects. Add a robust parser with support for sensors and policies. Sensors: gpio, tach Policies: fallback Add an example yaml file. Change-Id: I9158a0ce2a08ef6b7bb3f5d659ea0e0433af5b96 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add fallback redundancy policyBrad Bishop2017-08-023-0/+181
| | | | | | | | | | | | Add a fallback redundancy implementation of the RedundancyPolicy interface. The fallback policy associates multiple PresenceSensor instances to a single fan, and "falls-back" on secondary sensor implementations when the primary sensor cannot see the fan. Change-Id: I6468d77d97b8916b3ff33bcd0cd28a102d1aaba1 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add gpio presence sensorBrad Bishop2017-08-023-0/+206
| | | | | | | | | | | | Add a gpio presence implementation of the PresenceSensor interface. The gpio sensor simply maps the on off state of a gpio directly to the xyz.openbmc_project.Inventory.Item Present property. Change-Id: I071dd475bebb15372edb59506352746c20542eff Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add new tach sensor implementationBrad Bishop2017-08-023-0/+259
| | | | | | | | | | | | | Add a new fan speed (tach) presence implementation for the new PresenceSensor interface. This fan tach sensor behaves mostly like the existing one, with the addition of support for multiple tach sensors for the single PresenceSensor instance, and implementation of the PresenceSensor start and stop interfaces. Change-Id: I535a3e2c78ef0f06f10b6f4cda9a7e2d0e9c11db Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add redundancy policy interfaceBrad Bishop2017-08-021-0/+110
| | | | | | | | | | | | Add a redundancy policy interface class. Redundancy policies introduce the concept of multiple presence sensors for a given fan. A redundancy model implementation determines how the distinct sensors making up the redundancy set are controlled and how their feedbacks determine the overall fan presence state reflected in the inventory. Change-Id: Ibb5f71b3189dbb253bb669691e8016cda83a6ebb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add presence sensor interfaceBrad Bishop2017-08-021-0/+77
| | | | | | | | | | | | Prepare to extend the fan presence model to include sensors of other types with a presence sensor interface class. Presence sensors can be both event driven or polled. Provide start and stop for the former and present for the latter. Change-Id: Ia1b91a5e30e27fbe66c6f075e5e5ce620dac997e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* presence: Add fan utilityBrad Bishop2017-08-023-0/+110
| | | | | | | | Add utility wrappers for reading/writing xyz.openbmc_project.Inventory.Item.Present. Change-Id: I9d6bb776e56b67b9cac1f991790886ec8105d4b1 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* evdevpp: Add evmon utilityBrad Bishop2017-08-023-0/+177
| | | | | | | Add a sample/test ev event monitor program for evdevpp. Change-Id: I46dcc47b67b377a1abd79ceef3bc28dbf269d6f2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* evdevpp: Add test directory for libevdev wrappersBrad Bishop2017-08-024-2/+10
| | | | | Change-Id: Ib9d2e5cee2b9c1e28eb08c3c85f36f448160c16f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* evdevpp: Add C++ bindings for libevdevBrad Bishop2017-08-023-4/+133
| | | | | Change-Id: Iff27168588ee0767902801e6df3c6745a643ac9a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add sdevent singletonBrad Bishop2017-08-021-0/+27
| | | | | | | Avoid sdevent::event::Event reference proliferation. Change-Id: I5c3de11e902cd9e61fdaca8f06c73d329bf4d293 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add iotest for sdevent io wrapperBrad Bishop2017-08-023-0/+61
| | | | | Change-Id: I5f3054720e9c48248351c398b58f98f499799a0a Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add test directory for sdevent wrappersBrad Bishop2017-08-024-2/+9
| | | | | Change-Id: I23843493e8f2c43ed50cdf1ad5def66a2f29dec3 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add loop exit wrapperBrad Bishop2017-08-021-0/+23
| | | | | | | Add a wrapper for sd_event_exit. Change-Id: Ie08a74cb388e8441683fbf90902cbcb463aa9e6f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add sdevent io source C++ wrappersBrad Bishop2017-08-022-0/+110
| | | | | Change-Id: Ifadee2bb8788be87e759d1f0be875f7047a2f37e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Switch which GPIO value sets air or water cooledBrandon Wyman2017-08-011-2/+2
| | | | | | | | | | | | | | During the coding and testing of this application there was some miscommunication on the jumper position for a Witherspoon system. The system was jumpered for Air when intended to be jumpered for the Water cooled position. Further examination of the documentation and the jumper settings on systems found that the logic was reversed. This change should correct the problem and report the correct cooling properties. Resolves openbmc/openbmc#2041 Change-Id: I7e25bd72342fde40df1fec8f6a1a444eac401f09 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
* fan-monitor: Capture more data on failureMatt Spinler2017-07-302-1/+12
| | | | | | | | | When a fan gets set to nonfunctional, it is useful to know how fast the rotor was actually going and what the expected speed was. Change-Id: I760d6fa7d193038f9740d241bf4d4d0039020f64 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Changes to auto generate fan_zone_defs.cppBrandon Wyman2017-07-301-13/+15
| | | | | | | | | | | If the control/fan_zone_defs.cpp is removed, an attempt to rebuild from the phosphor-fan-presence top directory will fail due to that file being missing. These changes fix that so that 'make' will redo the configure step. Change-Id: Ia774677ec2e3e62c9ba6939f2bfac63d64613886 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
* phosphor-fan-presence READMEGunnar Mills2017-07-251-0/+13
| | | | | Change-Id: I651338de2d07b9fae105e3225ffd08f2088a4518 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* sdbusplus: Add PropertiesChanged type aliasBrad Bishop2017-07-181-0/+4
| | | | | | | | Add an alias to cut down on typing when using properties changed signal callbacks. Change-Id: I494d58006cbc136fc2f1d9395039a4535922f35e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* monitor: Avoid Target interface for mapper queriesBrad Bishop2017-07-111-1/+3
| | | | | | | Avoid asking the mapper for the Target interface on sensors that do not have it. Change-Id: I43f61c98291cc15d7daf43d2b01c6b7fa4edfa62
* presence: Check DBus for initial stateBrad Bishop2017-07-081-5/+38
| | | | | | | | At startup load the initial state from the DBus object if one exists already. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ia4ad2f3c2b5c521406d9a186113b11cf8ed69b14
* presence: Add initialstate ctor argumentsBrad Bishop2017-07-083-9/+14
| | | | | | | | Allow class users to set the initial state of enclosures and tach sensors. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: If5199361ab051ca46096f66ba925aeb1a874801f
* presence: Remove work from enclosure constructorBrad Bishop2017-07-082-2/+2
| | | | | | | | Allow class users to control when an enclosure should export its state on DBus. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I64bc2d85b7a072e9ec539330640f766961724b17
* presence: Use new sdbusplus wrapperBrad Bishop2017-07-084-42/+19
| | | | | | | Use the sdbusplus wrapper methods introduced previously. Change-Id: Ifd431753e9513436a9b5ab98cc49d907a5929c20 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add sdbusplus wrapperBrad Bishop2017-07-081-0/+195
| | | | | | | | Facilitate mocking. Avoid sdbusplus::bus::bus reference proliferation. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: I0a55fa178a96af4fd63f249cde0a129b7007731f
* Fan control: Example yaml updates(doc only)Matthew Barth2017-07-062-1/+61
| | | | | Change-Id: I30fdecd3af3dcdc7f954bdb9d535c6bc92edd67a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add increase & decrease timer values in secondsMatthew Barth2017-07-064-7/+32
| | | | | | | | | | | | | | | | | Support setting the increase delay time(in seconds) for each zone from the zone yaml file. Speed increases use a delay type timer where the amount of time given delays additional increase requests from happening until the fans within the zone reach the highest net increase in speeds. Support setting the decrease interval time(in seconds) for each zone from the zone yaml file. Since decreasing is done on an interval, a decrease interval time of zero disables the decrease interval timer causing no decreases in speed to occur. Speed decreases use an interval type timer to decrease the fan speeds within the zone when no speed increase requests exist on the given time interval. Change-Id: I88334a313b6e2820b768fa7e3f1cb65887f29258 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Set target speed according to floor speed changeMatthew Barth2017-07-062-15/+18
| | | | | | | | When the floor speed updates, a request to increase the target speed should be made when the target is now below the floor speed. Change-Id: Ib622bc717a952ef0c0703cbff40a4dc14b213416 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Timer for fan speed increasesMatthew Barth2017-07-062-7/+30
| | | | | | | | | | | | | A oneshot timer is started on each target speed increase where the amount of time configured is how long the fans within the zone are allowed to reach the new target speed before additional speed increase requests will be processed. Any speed increase request deltas that are above the current speed increase delta being processed as the new target speed will cause the timer to stop and the difference between the deltas are added onto the target speed. Change-Id: I064941c4e12c3e44be90880d6f32c6fbcf7ae32d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Move event init steps at startup to functionsMatthew Barth2017-07-062-47/+69
| | | | | Change-Id: I8a281935368cd705658d489c7c7af59b8dde7e4d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Timer to decrease fan speedsMatthew Barth2017-07-065-11/+62
| | | | | | | | | Create a repeating timer for decreasing fan speeds where the fan speeds in the zone are decreased when the timer expires and a decrease speed request exists with no increase request present or active. Change-Id: I419592f6f50c0ed524f8bf3ebf183854ab5ef2ea Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Support speed decrease eventsMatthew Barth2017-07-063-5/+105
| | | | | | | | | | | | | | | | | A net decrease speed action determines the net decrease delta from each group member's property value and requests a speed decrease of that delta from the current target speed. From all the requests for a speed decrease on a zone, only the lowest net decrease is used from all the groups subscribed to decrease a zone's speed. The new target speed is only decreased when no increase requests exist and the resulting target is above the zone's floor speed, otherwise the floor speed is set as the new target. Resolves openbmc/openbmc#1626 Change-Id: Iaefa7b25c3f44691dd3ca4084bfddd3c1a504de9 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Process speed increase requestsMatthew Barth2017-07-063-6/+43
| | | | | | | | | | | Speed increases are made providing a target speed delta. The increase is made when the delta is higher than the current increase that may be occurring. When no increase is currently happening, the increase delta requested is accepted. All resulting target increases will not go above a defined ceiling speed. Change-Id: Ia19c71a023cf5b897d5ba92974ff98451f34d5a3 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
OpenPOWER on IntegriCloud