Question on States monitoring
Andres Oportus
andresoportus at google.com
Tue May 15 15:05:17 AEST 2018
On Mon, May 14, 2018 at 6:57 PM Lei YU <mine260309 at gmail.com> wrote:
> On Tue, May 15, 2018 at 9:53 AM, Andrew Jeffery <andrew at aj.id.au> wrote:
> > Hi Lei,
> >
> > On Tue, 15 May 2018, at 11:19, Lei YU wrote:
> >> Hi Andres,
> >>
> >> The existing [phosphor-gpio-monitor][1] contains two services, one is
for
> >> monitor gpio interrupts, the other is "phosphor-gpio-presence" that
checks a
> >> gpio output and let it be some state on DBus.
> >>
> >> I guess the "presence" service is what you are looking for, that maps a
> >> gpio output to a Dbus object.
> >>
> >> The existing use case is:
> >> 1. Witherspoon checks if power supply is connected and create dbus
object
> >> /inventory/system/chassis/motherboard/powersupplyX, it also is able
to
> >> bind the kernel driver when it is attached.
> >> 2. Zaius checks if a PCIE card is connected on E2B and create dbus
object
> >> /inventory/system/chassis/pcie_card_e2b
> >>
> >> You can see a little detailed explanation at
> >>
https://github.com/mine260309/openbmc-intro/blob/master/Porting_Guide.md#gpio-presence
> >
Thanks for info. It seems that since both monitor and presence are
subclasses from Evdev they, at least in their current form, need GPIOs to
be setup as input (in the examples use /dev/input devices) with a driver
like gpio-keys, is this the case?
More information about the openbmc
mailing list