summaryrefslogtreecommitdiff
path: root/gpiodaemon
AgeCommit message (Collapse)AuthorFilesLines
2019-04-08Do case insentive comparisons & representationsRichard Marian Thomaiyar1-10/+31
Code updated to do case insentive comparisons for direction & polarity, when read from Entity-manager. Tested: 1. Verified gpiodaemon exposes all the objects as before using busctl 2. verified ipmitool chassis status still works (ascertaining the whole flow is good) Change-Id: I6955b00b1d2ccd6add42ad30ba3ae3753655068e Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-03-27Skip property change signal during startRichard Marian Thomaiyar1-1/+1
During the object addition in Gpio daemon, InterfaceAdded signal will be generated which contains all property values. Need to block generating PropertiesChanged signal during this time, as there was no property changed. Generating PropertiesChanged signal during start-up will also confuse Buttons or any other application which monitors this signal, hence it has to be avoided. Tested: 1. Verified InterfacesAdded signal is properly generated during startup 2. Verified PropertiesChanged signal is properly sent out, when there is gpio value change. Change-Id: I59c1db645197a0244567a87cbff04e0e7282ea9f Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-03-25Support: sampled value property in gpio daemonRichard Marian Thomaiyar2-44/+28
1. Added property SampledValue, which will reflect the gpio value status always, will be used when ignore property is true 2. Removed enabled property, as it is not used anymore 3. Fixed bug for Value property which had the inversion first before comparison. Tested: 1. Verified the behavior using D-Bus commands 2. Verified Power-up / Gpio Sampling / etc, along with Buttons & set-passthrough patch. Change-Id: I30b31d12019c54377d0f279f604aee83c5f63883 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-03-21gpio daemon: Support addedRichard Marian Thomaiyar2-230/+175
Simplified Gpio daemon service and it's corresponding members. Buttons must use these gpio daemon instead of directly queriying gpio. Daemon will send out properties changed signal, when there is change in gpio value. Introduced Ignore property, if set true will return cached values for the specified gpio. Gpio daemon will query objects from entity manager and initialize accordignly. Restarting gpio daemon, will re-init these pins as per the entity manager. Tested: 1. Verified the properties of Power button & Reset button 2. Performed FP buttons operation and made sure power button & reset button properties changed signals are properly sent out 3. Testd against updated buttons code (which uses gpio daemon) and verified basic power operations both from front panel and from ipmitool power 4. Verified object creation, during gpio daemon restart and also on entity-manager restart Change-Id: I89ad04d58c74ebd534712f38be53549ec2c39662 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
2019-01-22Make 'set value' available only on output GPIOsYoo, Jae Hyun1-7/+8
This commit fixes the 'Value' property handling code to make it available only on output GPIOs. Change-Id: I6c92df47e01339a8becf9788004f400834695a7c Signed-off-by: Yoo, Jae Hyun <jae.hyun.yoo@intel.com>
2019-01-17Fix dangling file descriptor issueYoo, Jae Hyun1-0/+5
This commit fixes dangling file descriptor issue on gpioutils. Change-Id: Ieabb26ad2b8c6b81570d8142f0ba6816d3ad14e2 Signed-off-by: Yoo, Jae Hyun <jae.hyun.yoo@intel.com>
2019-01-17Block 'edge' setting on output GPIOsYoo, Jae Hyun1-7/+11
Setting of 'edge' property on an output GPIO causes this warning in kernel: gpio gpiochip10: (1e780000.gpio): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ This commit make it does the 'edge' setting only on input GPIOs to fix the issue. Change-Id: I35c866598b82e2d05defd8492900345a88325ed3 Signed-off-by: Yoo, Jae Hyun <jae.hyun.yoo@intel.com>
2019-01-10Merge "Monitor gpio value changes"Wang, Kuiying2-58/+219
2018-12-19gpiodaemon: Add phosphor-logging to linkJames Feist1-1/+3
We now have to link against it. Change-Id: Icf66d6de7b11a9ce020daf542334a5b67dc92e54 Signed-off-by: James Feist <james.feist@linux.intel.com>
2018-12-12Monitor gpio value changesCezary Golder2-58/+219
Only gpio with direction set as "input" are monitored. Each gpio by separate GpioState class. Presently only gpio "value" property is monitored by looking into file descriptor of /sys/class/gpio/gpioXX/edge. Planning to be changed into gpio cheracter device soon. Change-Id: Id2aa717d32903df02fa79419d36466d725167178 Signed-off-by: Cezary Golder <cezary.golder@intel.com>
2018-12-07Fix build error with the latest sdbusplus variant changeYong Li1-3/+7
Enable C++ 17 and modify the code to align with the below commit: https://github.com/openbmc/sdbusplus/commit/90778b430290c9ec8c33fb77b03e2552d9dd6905 Change-Id: If405f03494f66dd9addc407e1d0b0c38f438a2c5 Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
2018-11-14Update gpiodaemon with Entity-manager signalsGolder, Cezary2-187/+149
Gpiodaemon handling all gpio related signals (having "xyz.openbmc_project.Configuration.Gpio" interface) from Entity Manager to update own gpio configuration. Change-Id: I2e3bac50fea665de17023f6065b4d7b17299a1eb Signed-off-by: Golder, Cezary <cezary.golder@intel.com>
2018-10-26Create gpio dbus service basing on EntityManager.Golder, Cezary8-0/+878
Service name is "xyz.openbmc_project.Gpio" with below properties: .Direction .Enabled .Value Whenever "Enabled" is set to "false" the "Value" and "Direction" properties cannot be overridden. Tested By: Cezary Golder Change-Id: I9192676d00c56e3637ded9ca4029b1df50a96f26 Signed-off-by: Golder, Cezary <cezary.golder@intel.com>