summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fan and TachSensor class introductionMatt Spinler2017-05-115-1/+445
| | | | | | | | | | | | | A Fan object has one or more TachSensor objects. The TachSensor class is used to keep track of the the actual and expected speeds. It only tracks expected speeds if the _hasTarget attribute is true. Future commits will add more functionality. Change-Id: I9bb5fac39f25c5c31c18457ebedf82838fcf6641 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan monitor dataMatt Spinler2017-05-114-0/+94
| | | | | | | | | | | This commit contains the data that will be used by the monitor code. The generated.cpp file will later be generated during the build by a python script. Change-Id: I4dc4552ae8e58cd27478416888dd3363e7c2bf3f Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* phosphor-fan-monitor frameworkMatt Spinler2017-05-115-0/+47
| | | | | | | | | | | | | | | | This application will monitor the actual speeds of fans (via their sensors) and compare them to their expected speeds. If a fan is too slow for too long, it will have its Functional property in the inventory set to false. If it starts working again, the property will be set back to true. It will use configuration data to say which fans to check and which values to use for various timeout and deviation parameters. Change-Id: Ic61613018a758727835b70f2df0ecd1bf12e8256 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* phosphor-fan: Testcases for Timer classMatt Spinler2017-05-114-2/+395
| | | | | Change-Id: Id8b752cc6e494dcf76d9668553292a65a3fd19d6 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* phosphor-fan: Create timer classMatt Spinler2017-05-113-1/+352
| | | | | | | | | This class can be used to call an arbitrary function after a certain amount of time, which is set in microseconds. Change-Id: Ifd65bbf0c3482db4e37efc3b1ccc868e62fa0afa Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Enable data generationMatt Spinler2017-05-046-26/+113
| | | | | | | | | | | | Start running the python script that generates the fan zone data structures during the build. If the paths to the 2 yaml files aren't provided during configure, then the yaml in the example directory will be used instead. Change-Id: I9f67c1b94b5302c30ac87b0f80746854c42776b2 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Generate structures from YAMLMatt Spinler2017-04-271-23/+103
| | | | | | | | | Using data from the zone and fan definition yaml files, generate a .cpp file with data structures that define the fan zones and the fans in those zones for a system. Change-Id: I5679ee692856e01138750f41bc23eb0cbb7f9464 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Python script frameworkMatt Spinler2017-04-271-0/+78
| | | | | | | | | The basics of a python script that will generate the fan zone data structures for the fan control code from zone and fan yaml files using a mako template. Change-Id: I1d92dc55c2b6dd986e5aaae0d3440ef85cbe79c0 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Fill in Manager classMatt Spinler2017-04-272-1/+44
| | | | | | | | Create Zone objects for the fan zones defined in the definition data that meet all conditions. Change-Id: I9c29be93716cd137f1c714355a0bd2a1c93271cd Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Create Zone classMatt Spinler2017-04-273-1/+137
| | | | | | | | This class represents a fan zone, which is a collection of fans that are always set to a speed together. Change-Id: I5646f07b7b136aad216dabded3b5da3e9da0a531 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Create Fan classMatt Spinler2017-04-273-0/+171
| | | | | | | | | | | This class contains the inventory name of the fan, and the sensor names representing the rotors. Calling setSpeed on this object will set the speed on all contained sensors. Change-Id: I850e2d69067813005270105618fcf69b04382b03 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Add getService() utility functionMatt Spinler2017-04-263-9/+35
| | | | | | | | | | | This function returns the service name from the mapper based on the dbus path and interface passed in. Eventually, getInvService can be removed and this call can be used instead. Change-Id: Ieb090a9b650803e8cfaf2f24143f25a4bbf1cd23 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Add Manager class and fan dataMatt Spinler2017-04-265-1/+120
| | | | | | | | | | | Create the fan manager class. Check in the fan zone data as a normal file. In a future commit this will be generated during the compile. It is required now for review and so everything compiles. Change-Id: I5733b81db80c5e072abdbffd42e335fa46c61ef8 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fan control: Add types for use with generated dataMatt Spinler2017-04-261-0/+34
| | | | | Change-Id: I9cb2037dc459516f577fc2bff91cccafea539eff Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* control: build: Use LDADD instead of LDFLAGSBrad Bishop2017-04-251-2/+7
| | | | | | | | LDFLAGS is for linker flags other than -lfoo: https://www.gnu.org/software/automake/manual/html_node/Linking.html Change-Id: I813e093ff8c7b824178d7170ca7c71982e49a53b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Create framework for phosphor-cooling-type appBrandon Wyman2017-04-245-0/+42
| | | | | | | | | | | | | | | | | An application called phosphor-cooling-type is being created in the phosphor-fan-presence repo under the chassis-cooling-type subdirectory. This application will update the D-Bus CoolingType properties for a cooling zone via passed in parameters. The current properties to be updated are AirCooling and WaterCooling. They will be set to true or false based the passed in parameters --air (set AirCooling to true), --water (set WaterCooling to true), and/or --gpio=<path> (path to a GPIO pin to read to determine if one or more properties should be set to true or false). Change-Id: I774065e29849aaa54653ae6188dc42aa846a1cf0 Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* build: Add disables for control and presence pkgsBrad Bishop2017-04-242-13/+36
| | | | | | | Allow granular control of built packages. Change-Id: Idaded1f149991b1d767f29e0762015f3ba4a0d9d Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* build: Move presence to a subdirectoryBrad Bishop2017-04-2414-25/+37
| | | | | Change-Id: I33b28922107b9b041de3699e4a6eebd3d05ebdef Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Fan control: Add phosphor-fan-control frameworkMatt Spinler2017-04-125-1/+44
| | | | | Change-Id: Ie1dc082490997712b4fe3f42d0ddb5049ae5ca06 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Use PrettyName YAML field instead of DescriptionMatt Spinler2017-03-272-3/+3
| | | | | | | | When generating fan_detect_defs.cpp, pull in the PrettyName YAML property instead of Description. Change-Id: I9db6bd09309874a5b6b6cbb062c6cd3a9ddcaa5d Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Generate cpp file using makoMatt Spinler2017-03-211-99/+32
| | | | | Change-Id: I17f027118c318bc519c7755e7fda465f6c47d927 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Move getInvService() into utility function.Brandon Wyman2017-03-205-44/+92
| | | | | | | Resolves openbmc/openbmc#1299 Change-Id: I61f511dcc15e67393a47bd0395b752d2e6f17f11 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
* ObjectMapper: revert service and intf name changePatrick Williams2017-03-201-2/+2
| | | | | | | Partial fix for openbmc/openbmc#1112. Change-Id: I6080bcefeb2c4fbeff2311aeb3abe1af74652994 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Move object_mapper per dbus path conventions.Leonel Gonzalez2017-03-201-3/+3
| | | | | | | Partial fix for openbmc/openbmc#1112. Change-Id: Ibd1f35ef2410c7c9519095796279af0485adc3b3 Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
* Documentation only, no functional changeMatthew Barth2017-03-157-3/+159
| | | | | | | | | Added copyrights and comments within headers Resolves openbmc/openbmc#959 Change-Id: If58d78a39fb08251a34a88c2b6340c9fa33d2569 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Only update inventory when presence state changesMatthew Barth2017-03-152-30/+53
| | | | | | | | When the presence state of a fan enclosure, determined from all the sensors part of that fan enclosure, changes then update inventory. Change-Id: Ie80e83fa7d0200239ced7b9d2ef84664e599e8ca Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Trace mapper and inventory errorsMatthew Barth2017-03-153-6/+26
| | | | | | | | Add journal error entries for error conditions on mapper and inventory manager update calls. Change-Id: Iecb310575414878f4b83c24136e6ae1312c6f7aa Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Update inventory with latest presence stateMatthew Barth2017-03-151-1/+11
| | | | | | | | Inventory is attempted to be updated with the current presence state, which is determined from all of the fan's sensor readings. Change-Id: Ic869cf5e5fdeada8d07b3deeabf347e40da3d8ba Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Get inventory manager service nameMatthew Barth2017-03-152-4/+38
| | | | | | | Retrieve the inventory manager's service name from object mapper. Change-Id: I56c67012105b5bc389763608c998ccc756b1104a Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Function to setup fan inventory object mapMatthew Barth2017-03-152-9/+34
| | | | | | | | | The getObjectMap() function constructs the object map needed by inventory manager for the object path, interface, and properties of a fan. Change-Id: I8cce5cd611d3a0f7a2079b81f280b261aee486e2 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Enable tach signal handlerMatthew Barth2017-03-154-4/+79
| | | | | | | | | Register and handle tach change signals for each tach sensor. Inventory would be updated when all tach sensors for a specific fan enclosure have a tach value of zero. Change-Id: Idd3f53c29c68c6171d858e616fbfe868f30a4ea9 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add tach sensors to each fan enclosureMatthew Barth2017-03-156-2/+42
| | | | | | | | | | Create a tach sensor instance for each sensor listed within a fan enclosure that uses 'tach' based presence detection. Each tach sensor has a pointer to the fan it's associated with and is added to the list of sensors for that fan enclosure. Change-Id: I9a83ec52d1a5d01e39702e185336a09edeb4d158 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Create fan enclosure objectsMatthew Barth2017-03-154-1/+61
| | | | | | | | For tach feedback based presence detected fans, a fan enclosure object is created from the properties given within the yaml file. Change-Id: I698dd7c8d05863aaaab4dcb5d4c696b15fdf941d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Call gen-fan-detect-defs script during buildMatthew Barth2017-03-103-0/+22
| | | | | Change-Id: Ie7b9109f097490401c2f4d75f278afad6926d18b Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add fan presence detection definition parserMatthew Barth2017-03-103-0/+172
| | | | | | | | | The parser creates a source file from a given yaml file that defines each fan's presence detection method, which is accessible using the non-generated header file. Change-Id: I8110c031abc23c0a621cdb984b2a315892d9a1ac Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add fan presence application frameworkMatthew Barth2017-03-099-3/+152
| | | | | | | Add class framework for detecting fans by tach Change-Id: I45295fd6bcd81c62cef36320dfbc4f0da6092557 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Initial fan presence build frameworkMatthew Barth2017-01-264-0/+67
| | | | | Change-Id: Ic39848e285e776ef198c7a41f20debfa164af644 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Initial commitPatrick Williams2017-01-181-0/+201
OpenPOWER on IntegriCloud