History log of /openbmc/phosphor-fan-presence/presence/json_parser.hpp (Results 1 – 8 of 8)
Revision Date Author Comments
# bc4179e9 04-Oct-2022 Matt Spinler <spinler@us.ibm.com>

pres: Add way to bind fan eeprom driver after plug

Some fans have EEPROMs on them that are read by other BMC code so the
contents can be added to the BMC inventory. Since fans can usually be
hotplu

pres: Add way to bind fan eeprom driver after plug

Some fans have EEPROMs on them that are read by other BMC code so the
contents can be added to the BMC inventory. Since fans can usually be
hotplugged, this means those EEPROMs need to be read after a fan is
plugged, and there was previously no method to trigger that.

This commit adds functionality to phosphor-fan-presence-tach to bind the
EEPROM driver to the new device after a fan with an EEPROM is plugged.
This triggers a udev event which triggers EEPROM reads if the platform
is configured to do so.

This is done with a new optional JSON section in the config.json, which
looks like:
"eeprom": {
"bus_address": "31-0050",
"driver_name": "at24",
"bind_delay_ms": 1000
}

The 'bus_address' field is the device's I2C bus and address string as it
is represented in the I2C subsystem in sysfs. The 'driver_name' field
is the name of the device driver that manages that device. The
'bind_delay_ms' field allows there to be a defined amount of time
between when the device is plugged and when the driver is bound, in case
a certain amount of time is required for the device to come online after
it receives power.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I10d36efab954393239e6face96244ecd34035596

show more ...


# cb356d48 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

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

show more ...


# 808d7fe8 13-Jun-2022 Mike Capps <mikepcapps@gmail.com>

meson support: remove code warnings 1

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.

To keep the review

meson support: remove code warnings 1

This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.

To keep the review size manageable, this commit contains only monitor
and presence changes (and top-level json_config.hpp).

Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Change-Id: I7280b512c54e8d5aeba3300764a239f3dcbab14d

show more ...


# dfc8c4d0 22-Jun-2022 Matt Spinler <spinler@us.ibm.com>

presence: Only allow loading once

If entity manager were to get restarted, the JsonConfig::start()
function would be called again which would attempt to load a config on
top of an existing one.

Fix

presence: Only allow loading once

If entity manager were to get restarted, the JsonConfig::start()
function would be called again which would attempt to load a config on
top of an existing one.

Fix that by only allowing the config to load once. If someone wanted
the config to load again, they could either send the HUP signal or just
restart the service.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I1526db17500ffe88408c8bc1f0abba9c4952107b

show more ...


# 5b839919 21-Jun-2021 Matthew Barth <msbarth@us.ibm.com>

presence: Use new JsonConfig object

To simplify handling the loading of config files, use the updated
JsonConfig object that populates the available compatibility values used
when re

presence: Use new JsonConfig object

To simplify handling the loading of config files, use the updated
JsonConfig object that populates the available compatibility values used
when retrieving the JSON file and loading it. The given load function is
called if compatibility values are found upon being constructed or after
an interfacesAdded signal is received, which then it can call
`getConfFile` to find the JSON config file to be loaded.

Change-Id: I7698f0abf91dc6414386a42b710bcde9c3f47612
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>

show more ...


# 0daedd18 25-Jan-2021 Matt Spinler <spinler@us.ibm.com>

presence: Don't start until JSON config is found

Make use of the JsonConfig class's callback functionality to not
actually start fan presence checking until the config file is available.

presence: Don't start until JSON config is found

Make use of the JsonConfig class's callback functionality to not
actually start fan presence checking until the config file is available.

If the config file name is known right away, then monitoring will start
right away, but if it has to wait for the IBMCompatible interface to
show up on D-bus first, it will wait for that.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic00bbf56a092983f93968b08bcbcaa848e4d085a

show more ...


# e8122390 24-Sep-2020 Matt Spinler <spinler@us.ibm.com>

presence: Create ErrorReporter class

This class will, eventually, create event logs for missing fans.

This first commit will just create a stubbed out class if there is a
'repor

presence: Create ErrorReporter class

This class will, eventually, create event logs for missing fans.

This first commit will just create a stubbed out class if there is a
'reporting' section in the configuration JSON. From the JSON, the class
will pull out the value for the number of seconds to wait between first
detecting a fan is missing and creating the event log for it.

This requires a slight change to the existing JSON format, however the
JsonConfig class was updated to support both the old and new formats.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I991ea7cf0457448411e65f4c8e274bb2584d15f4

show more ...


# 1a568650 24-Aug-2020 Jolie Ku <jolie_ku@wistron.com>

presence: Use shared JSON config file finding & loading header

Use the shared JSON config determination header for loading its
JSON configuration file.

Tested:
run phosp

presence: Use shared JSON config file finding & loading header

Use the shared JSON config determination header for loading its
JSON configuration file.

Tested:
run phosphor-fan-presence-tach can find and load config.json from
/usr/share/phosphor-fan-presence/presence and
/etc/phosphor-fan-presence/presence/ in witherspoon qemu

Change-Id: I5c4fdf7d96de7c956ca24b4a5751911cc1bf1f03
Signed-off-by: Jolie Ku <jolie_ku@wistron.com>

show more ...