| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Add missed python variable initialization causing srcrev bump fail
Failed srcrev bump:
https://gerrit.openbmc-project.xyz/18414
Change-Id: I0d7d4647abe3c2f46cabfebf6be5ab500641f504
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Interfaces can optionally be defined on each zone to include setting
properties under those interfaces when fan control initializes the zone.
Setting the property values here allows them to be initialized to a
default value or set of values.
Change-Id: I75d51a05caa9e5662a0608d285fd388acc8593e2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a service attribute that can be optionally defined on a group
denoting what service is hosting the group members. Initially, defining
a service name generates the group member(s) to be zone objects only.
This service attribute will be enhanced to specifically note what
service provides the group members and allow for a better trigger for
properties on zone objects instead of generating a blank signal match.
Tested:
Blank signal match generated for group members in events used
Change-Id: I483fcf6a5e210e5d70bc9d5c4c0dee15524b01b9
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the use alternate events action, the ability to generate an event
type is required within the parser. This action requires two separate
lists of events to be generated and to generate the event code, it was
necessary to add what code is generated for each section that comprises
an event to the parser directly.
Tested:
Updated events yaml with an event to use the alternate events action
Verified the generated code builds and runs on wspoon
Change-Id: I2078610222b0ae0f7fdbcf348e5c9ff02c4108b6
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is confusing to read some of the type definitions that deal with
timers when Timer could mean a timer instantiation or a set of timer
configuration parameters. This change disambiguates the two types.
Tested:
Built and run through unit tests.
Change-Id: I9dd6b47886747d56a86b6a50eb9a74a331d0a1fe
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed for a future commit that removes the local
phosphor::util::Timer implementation.
Tested:
Built and run through unit tests.
Change-Id: I8ea3399fec8761055d4a0d94fb9ea91fd34040ea
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Using an exit status of -1 everywhere leads to the status being
converted to 255 when output to a calling application. While this does
signify an error it has a reserved meaning for exit status out of range.
Lets use a valid general exit status of 1 instead.
Change-Id: I326701c78985e34c430c258fe31d9e910da10405
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation of enhancing the generated code format, the template used
has been externalized and will continue to be modified in future commits
to parse & generate more efficiently.
Tested:
Generated code remains unchanged
Resolves openbmc/phosphor-fan-presence#8
Change-Id: Ifbf718e8a22acb2f2f939bbdcc2e7fe041e9ed58
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case that an interface containing a property used within an event
is removed from dbus, that event can subscribe to the InterfacesRemoved
signal. When an InterfacesRemoved signal is received by fan control, the
corresponding interface (and all associated properties) is removed from
the cache used by all events.
*Note: This area of signal subscription/handling code generation is
intended to be re-worked under openbmc/openbmc#2911. This is the reason
for supporting a different yaml layout for the InterfacesRemoved signal.
Tested:
Generated code constructs InterfacesRemoved signals correctly
Resolves openbmc/openbmc#2223
Change-Id: Idc3e8db4e7dc07a2bb6898d3cc30ab775362dd35
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Event actions should be made optional for events that only require
subscribing to group signals.
This is in preparation for separating signal and timer based event
actions. A use case would be where one event can be used to subscribe to
signals that update cached property values without performing an action,
and another timer based event performs an action based on those
property values the signal event provides.
Tested:
Events without an action are generated correctly
Events without an action are handled correctly and run no action
Change-Id: I757a82ce6c45ac637ce7cea8f82a62b98b600e3e
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set speed events can use a list of groups associated with its actions
where each group defines what zone conditions the group should be
included in actions.
Tested:
List a single group within an event
List two groups within an event with different zone conditions
List two groups within an event in the same zone conditions
List more than two groups with different zone conditions
Change-Id: Ifba30e116f92d945f8812c15e856a5e772e077f2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current fan control assumes the use of the FanSpeed interface for fan
targets.
For fans controlled by pwm, FanPwm interface is added.
This commit adds "target_interface" config parameter, so that user can
specify the interface for the fan targets.
E.g.
- inventory: /system/chassis/motherboard/fan0
cooling_zone: 0
cooling_profile: air
sensors:
- fan0
target_interface: xyz.openbmc_project.Control.FanPwm
The config is optional and defaults to FanSpeed, so the current code
will not be affected.
Tested: Use this config on Romulus, ensures the fan control sets
target on FanPwm interface and works fine.
Change-Id: I73adccaa770d657b5d7aaeb307917f89588524de
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Properties used within set speed events may be of type string to trigger
an action. These should be handled where the defined type attribute is
given as 'std::string' and a parsed value is an instance of python str
type.
Resolves openbmc/openbmc#292
Change-Id: Ib188e7abc212062a1c61950abaa28434a4726521
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Add support for timer parameters to action functions along with
recursively build action functions that are a parameter to an event
action.
Change-Id: Ic126c8dfc85d5ede5f53034262f8910913e4cdd4
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Move to constructing the entire event action parameter string within the
python code in prep for additional special parameters.
Change-Id: I517ad859813e348cd6781cc9be11ab92fa6cac09
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
This is the first step towards allowing timer driven and/or wrapped
actions where the timer interval and type will be defined by the user.
Change-Id: If008fda5a2b73117e869f93223e0bfe61290f858
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The available event handlers are listed within the events yaml and would
be selected per event.
Change-Id: Ia393009b3a10b6f47f5de9a0e6d44f804576f05a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using a null dbus message to the event signal will perform the necessary
steps to initialize the event parameters using the given signal
handler's function directly.
i.e.) In the case for subscribing to PropertiesChanged signals,
initially the given property must be read. When the PropertiesChanged
signal struct is given a null message, it finds the property, reads the
value, and then can perform the given signal handler function directly.
This produces the same functional path as receiving a PropertiesChanged
signal containing the property value within the message.
Change-Id: I35575cfff66eb0305156be786cb1f5536d42bb1c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The available matches and their associated signals are now listed
within the events yaml and can be added to the list of matches to
register for per event.
Change-Id: I65f657038afe7c68a421adb4820ea09e275be06d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
| |
Action functions are not required to have parameters.
Change-Id: I04bf8294d9be9141cc7d8d3183628c94b777154a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Added some optimizations in the event yaml format to nest set speed
events that have the same preconditions and allow multiple actions to be
taken within a single set speed event.
Change-Id: I21ec395b6c9686e1efd5abc1be48d563480fec5f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
For groups within set speed events where the property values of the
group may not signal its action to occur, an optional timer may be added
to the event. This timer is configured as a repeating timer on the
interval provided where upon timer expiration, the event's action is
run.
Change-Id: I4cbe8a0ab1b734bfc7828706a6515af7f6d78b52
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For each group in an event, subscribe to the interfacesAdded signals in
the case where the member(s) of a group may or may not exist when
initialized.
Additionally, updated to use the propertiesChanged function to remove
repetitive property change subscription lines generated.
Change-Id: I52b0cd839383ebb90e93a81b5bac02ee7c4f44b2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set speed events are now allowed to have preconditions defined within
the event where those preconditions must be met before the set speed
event is enabled and active. The supported precondition added is against
a list of groups and their properties matching a given value.
The parser generates a precondition with the same layout as a set speed
event where the event is nested as the last parameter to the
precondition function. Having the set speed event as the last input
parameter to precondition functions is required.
Resolves openbmc/openbmc#1835
Change-Id: I7a247e7eb2d6b31ba9a60da1bc321a35edda9b24
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support setting the increase delay time(in seconds) for each zone from
the zone yaml file. Speed increases use a delay type timer where the
amount of time given delays additional increase requests from happening
until the fans within the zone reach the highest net increase in speeds.
Support setting the decrease interval time(in seconds) for each zone
from the zone yaml file. Since decreasing is done on an interval, a
decrease interval time of zero disables the decrease interval timer
causing no decreases in speed to occur. Speed decreases use an interval
type timer to decrease the fan speeds within the zone when no speed
increase requests exist on the given time interval.
Change-Id: I88334a313b6e2820b768fa7e3f1cb65887f29258
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#940
Change-Id: I238cd4a6ef69c1d54a775ad90ee87e6e327b82bd
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Id2d3b362e79e7a8c2330181f68ae11e43f84e2fd
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The interface is needed on the properties stored to uniquely identify
each property used in events.
Change-Id: Ia062f25514d7ed04ef1023a02eecad4738711ffb
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Only add events to the zone if the conditions and
zone number are correct.
Resolves openbmc/openbmc#1500
Change-Id: Ia040fcbdd9093d25d4ed1773d5fea0ed8a95ba2b
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
| |
Fixed pep8 warnings in gen-fan-zone-defs.py
Change-Id: I78472a1e9ce1bd6eb14e0352398c6470fa144604
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
| |
Zone conditions are used to determine which zone to use.
Change-Id: I11f0ffa4da12532aeedf88941fb8a2d7fca5d352
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Attach the event handler callback function to the match along with
generating the match string using the new match methods
Change-Id: I7595d65cbc615f29db60e2a65534ee5b635d6f96
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
| |
Fixed resulting pep8 alignment issues in the generated template
Change-Id: I26d316a86c40896cda729683b26ccf06a3f89d5f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Add the list of property(s) associated to a set speed event where the
handler updates the property cached on the zone for the action
Change-Id: Ifac61dda6eb200ca28735ddfaab3d34c9a9df758
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Adds the set speed event action functions with the associated parameters
in the order required for the function
Change-Id: Ib08f2442d8ff1fb3d49ab5234eacc2db8304a20d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Adds the groups for a set speed event for each zone listed within the
event. The groups are for maintaining a cached property value.
Change-Id: I2de9cf62215f9861e8ea2e6807df11e6a04638fb
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
phosphor-fan-control can behave differently based
on its command line arguments
--init: Set fans to full speed, delay for a
configurable amount of time to allow fans to ramp up,
start the fan control ready target, and then exit.
--control: Start the control algorithm. Never exits.
Will be started as part of the fan control ready target.
Change-Id: I453daf8cc05a5c85a19c098e1cca64cac2ad9520
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Using data from the zone and fan definition yaml files,
generate a .cpp file with data structures that define
the fan zones and the fans in those zones for a system.
Change-Id: I5679ee692856e01138750f41bc23eb0cbb7f9464
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
The basics of a python script that will generate the
fan zone data structures for the fan control code
from zone and fan yaml files using a mako template.
Change-Id: I1d92dc55c2b6dd986e5aaae0d3440ef85cbe79c0
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|