History log of /openbmc/phosphor-gpio-monitor/presence/main.cpp (Results 1 – 14 of 14)
Revision Date Author Comments
# c78e23d6 10-Aug-2023 George Liu <liuxiwei@inspur.com>

phosphor-gpio-presence: Add expected method for CLI11

The Phosph-gpio-presence@.service template has a --drivers and
--extra-ifaces which can be empty in some configurations[1].
systemd will end up

phosphor-gpio-presence: Add expected method for CLI11

The Phosph-gpio-presence@.service template has a --drivers and
--extra-ifaces which can be empty in some configurations[1].
systemd will end up launching the process with an extra empty
argument. CLI11 will fail unless we give an explicit
"--drivers=<value> or --extra-ifaces=<value>".
Add the expected method to --drivers and --extra-ifaces to limit the
number of incoming parameters for parameters.

Observed in hardware testing:
```
--drivers: 1 required TEXT missing
Run with --help for more information.
```

[1] https://github.com/openbmc/openbmc/blob/master/meta-facebook/meta-bletchley/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/presence-sled1.conf

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Iab8da95d88843652e657933656d9121b43311655

show more ...


# 7d7cc9e6 01-Aug-2023 George Liu <liuxiwei@inspur.com>

presence: Replace Argument class with CLI11

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Idd6e49c7206ce0b71990cc4999659bd51768f691


# 2a8848c6 01-Aug-2023 George Liu <liuxiwei@inspur.com>

logging: switch to lg2

After switching to C++20, it is recommended to use `phosphor::lg2`
to format log, and the correct `CODE_LINE` and `CODE_FUNC` values
can be used in log tracking.

Signed-off-b

logging: switch to lg2

After switching to C++20, it is recommended to use `phosphor::lg2`
to format log, and the correct `CODE_LINE` and `CODE_FUNC` values
can be used in log tracking.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I4fe8f4dec90e5062096168e05947b6d9bc355bb2

show more ...


# 162bd710 01-Jun-2023 Patrick Williams <patrick@stwcx.xyz>

presence: optimize emplace_back

The emplace_back call is created using temporary strings obtained from a
substr call which are not used past that point. Use std::move to avoid
string copy during th

presence: optimize emplace_back

The emplace_back call is created using temporary strings obtained from a
substr call which are not used past that point. Use std::move to avoid
string copy during the emplacement.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I5b0c7eebfd7281a2be379192ccdb0b2e5e4d5828

show more ...


# 39084b4a 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I3942bdbbb0fc2d46d755a74f481bb44fa63dc486
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 206f0040 02-May-2019 Anthony Wilson <wilsonan@us.ibm.com>

gpio-presence: Support for multiple iface assocs

This will allow additional interfaces to be specified
to associate with inventory items to allow for further
customization of inventory items.

Speci

gpio-presence: Support for multiple iface assocs

This will allow additional interfaces to be specified
to associate with inventory items to allow for further
customization of inventory items.

Specifying property values for an interface added this way
is currently not supported.

Tested: Verified any given interface(s) is associated properly

Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
Change-Id: I99e655b35120c82454a8851201218ec548ad9fe3

show more ...


# dace680f 01-Nov-2018 Patrick Venture <venture@google.com>

Add clang-format to repo

Add clang-format to repo.

Change-Id: I3f8704d80dd0bdde0706ab189c68cffe6d347995
Signed-off-by: Patrick Venture <venture@google.com>


# 3c4a23e7 14-Oct-2018 Patrick Venture <venture@google.com>

cleanup: use const reference passing string

[presence/main.cpp:21]: (performance) Function parameter 'driverString' should
be passed by const reference.

Change-Id: I024e1622b03a3f2ac3487051bdd8f7e3

cleanup: use const reference passing string

[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>

show more ...


# d5636b07 01-Sep-2017 Matt Spinler <spinler@us.ibm.com>

gpio-presence: Pass drivers in to application

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

gpio-presence: Pass drivers in to application

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>

show more ...


# 902d1c37 01-Sep-2017 Matt Spinler <spinler@us.ibm.com>

gpio-presence: Add function to bind/unbind drivers

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

gpio-presence: Add function to bind/unbind drivers

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>

show more ...


# 765725e0 06-Jul-2017 Gunnar Mills <gmills@us.ibm.com>

Monitor for GPIO state change

Use libevdev to monitor for GPIO state change and
update item present accordingly.

Change-Id: I1959a5ea09a7570c096b05d78a190394767a5ddd
Signed-off-by: Gunnar Mills <gm

Monitor for GPIO state change

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>

show more ...


# 80292bbe 05-Jul-2017 Gunnar Mills <gmills@us.ibm.com>

Update inventory item interface

Update the inventory item interface, setting
Present and PrettyName.

Change-Id: I6a0a8bd66a8427253706b2b1ee14dca919d0a809
Signed-off-by: Gunnar Mills <gmills@us.ibm.

Update inventory item interface

Update the inventory item interface, setting
Present and PrettyName.

Change-Id: I6a0a8bd66a8427253706b2b1ee14dca919d0a809
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 5f101103 29-Jun-2017 Gunnar Mills <gmills@us.ibm.com>

Read GPIO key on startup

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 on

Read GPIO key on startup

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>

show more ...


# 7263915a 22-Jun-2017 Gunnar Mills <gmills@us.ibm.com>

Add base support for GPIO presence

This is the starting code needed to build the application.

Change-Id: I46112a222afbc057ac4fc4f8fb2b4c83822023df
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>