summaryrefslogtreecommitdiffstats
path: root/presence
Commit message (Collapse)AuthorAgeFilesLines
* Add clang-format to repoPatrick Venture2018-11-014-193/+176
| | | | | | | Add clang-format to repo. Change-Id: I3f8704d80dd0bdde0706ab189c68cffe6d347995 Signed-off-by: Patrick Venture <venture@google.com>
* cleanup: use const reference passing stringPatrick Venture2018-10-141-1/+1
| | | | | | | | [presence/main.cpp:21]: (performance) Function parameter 'driverString' should be passed by const reference. Change-Id: I024e1622b03a3f2ac3487051bdd8f7e3b403639d Signed-off-by: Patrick Venture <venture@google.com>
* Use s.c_str() in log messagesJoseph Reynolds2018-05-301-1/+1
| | | | | | | | | Partly Resolves openbmc/openbmc 2905 Tested: static_assert only Change-Id: I16db5b66bf5a26558a2ed0c1617ef5466dadefea Signed-off-by: Joseph Reynolds <jrey@us.ibm.com>
* gpio-presence: Pass drivers in to applicationMatt Spinler2017-09-082-2/+63
| | | | | | | | | With the optional --drivers argument, pass in the path/device pairs to bind/unbind. That string will be parsed, and then passed into the Presence class. Change-Id: I1ac0e005de673a679dcb45e93bcac35fddf24d01 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* gpio-presence: Add function to bind/unbind driversMatt Spinler2017-09-054-4/+90
| | | | | | | | | | | | | | | The cards that this app is doing presence detection for may have devices with drivers that need to be bound and unbound when the card is added and removed, respectively. The drivers to do this to will be passed into the app on startup (in a future commit). Then when presence detect changes the proper binds/unbinds will be done. This commit adds the code in the Presence class to do so. Change-Id: I32827e45b88ddb7586aba6b819cc591b49aa9c51 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Refactor GPIO Presence classGunnar Mills2017-07-273-129/+8
| | | | | | | | | Refactor the GPIO Presence class to use a common class, Evdev, to inherit from. Evdev does the basic libevdev handling. A later commit moves monitor.hpp to this common class as well. Change-Id: I3c872680c88f8f400fefe3af49eb9b84c7491ceb Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Monitor for GPIO state changeGunnar Mills2017-07-263-3/+157
| | | | | | | | Use libevdev to monitor for GPIO state change and update item present accordingly. Change-Id: I1959a5ea09a7570c096b05d78a190394767a5ddd Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Update inventory item interfaceGunnar Mills2017-07-263-2/+141
| | | | | | | | Update the inventory item interface, setting Present and PrettyName. Change-Id: I6a0a8bd66a8427253706b2b1ee14dca919d0a809 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Read GPIO key on startupGunnar Mills2017-07-264-2/+153
| | | | | | | | | | | Create class Presence which will be responsible for determining and monitoring presence of inventory items and updating D-Bus accordingly. With this commit class Presence only reads the GPIO key on startup, more to come later. Change-Id: I647ae11d42a813a103e6d9d8922fd0f5b2155132 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Add base support for GPIO presenceGunnar Mills2017-07-255-0/+182
This is the starting code needed to build the application. Change-Id: I46112a222afbc057ac4fc4f8fb2b4c83822023df Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
OpenPOWER on IntegriCloud