History log of /openbmc/phosphor-fan-presence/control/gen-fan-zone-defs.py (Results 1 – 25 of 64)
Revision Date Author Comments
# c7f68bee 08-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

black: re-format

black and isort are enabled in the openbmc-build-scripts on Python files
to have a consistent formatting. Re-run the formatter on the whole
repository.

Change-Id: Ic2869f39aef47b8

black: re-format

black and isort are enabled in the openbmc-build-scripts on Python files
to have a consistent formatting. Re-run the formatter on the whole
repository.

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

show more ...


# 0f2588f2 05-Dec-2022 Patrick Williams <patrick@stwcx.xyz>

python: fix flake8 warnings and format with black

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


# 44872b07 19-Sep-2022 Chau Ly <chaul@amperecomputing.com>

control: Support target_path option in configuration file

The target path containing the interface
xyz.openbmc_project.control.FanPwm or
xyz.openbmc_project.control.FanSpeed can be different between

control: Support target_path option in configuration file

The target path containing the interface
xyz.openbmc_project.control.FanPwm or
xyz.openbmc_project.control.FanSpeed can be different between
phosphor-hwmon and dbus-sensor.

In phosphor-hwmon, it is "/xyz/openbmc_project/sensors/fan_tach/".
In dbus-sensor, it is "/xyz/openbmc_project/control/fanpwm/"

This commit supports making this path configurable via "target_path".
By default, it is "/xyz/openbmc_project/sensors/fan_tach/".

Signed-off-by: Chau Ly <chaul@amperecomputing.com>
Change-Id: Id799986ff69455b7c7054070ed2ab3b2e2500a6c

show more ...


# f24d7749 17-Mar-2020 Matthew Barth <msbarth@us.ibm.com>

Switch to use of python3

Update each fan application that uses a python script to parse/generate
their respective configuration to use python3.

*Decoupling the fan presence application from using s

Switch to use of python3

Update each fan application that uses a python script to parse/generate
their respective configuration to use python3.

*Decoupling the fan presence application from using sdbusplus python
libraries is outside the scope of this change and could be rebased
before this if necessary.

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

show more ...


# 005ff2ff 18-Feb-2020 Matthew Barth <msbarth@us.ibm.com>

control: Allow `zone_conditions` to not be in yaml

The `zone_conditions` yaml config key was intended to be optional,
however it was still being required in the `zone_configuration` entry.
This remo

control: Allow `zone_conditions` to not be in yaml

The `zone_conditions` yaml config key was intended to be optional,
however it was still being required in the `zone_configuration` entry.
This removes it from being required in the yaml even if it was empty.

Tested:
Generated source correctly without `zone_conditions`
Generated current machine(wspoon) config without effecting output
No `zone_configuration` produces empty generated config

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

show more ...


# 867a31cf 13-Feb-2020 Matthew Barth <msbarth@us.ibm.com>

control: Update python2 -> python3

Changes to support moving to python3

Tested:
No change in output using python2 before & after updates
Run using python3 generated output without error

Ch

control: Update python2 -> python3

Changes to support moving to python3

Tested:
No change in output using python2 before & after updates
Run using python3 generated output without error

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

show more ...


# 799cdf74 08-Oct-2019 Matthew Barth <msbarth@us.ibm.com>

Conditionally add/remove events action

A new action to add or remove events based on the state of all members
of a group. When all members of a group match the state given, the
events will be enable

Conditionally add/remove events action

A new action to add or remove events based on the state of all members
of a group. When all members of a group match the state given, the
events will be enabled. At any time a member's property state no longer
matches, all the events will be removed.

For example, to enable an event that changes the fan floor table using
different values based on the selected state of the current thermal
mode.

- name: set_speed_boundaries_based_on_ambient
groups:
- name: zone0_control_mode
interface: xyz.openbmc_project.Control.ThermalMode
property:
name: Current
type: std::string
triggers:
- name: init
method: getProperties
handler: setProperty
- name: signal
signal: propertiesChanged
handler: setProperty
actions:
- name: use_events_on_state
property:
value: DEFAULT
type: std::string
events:
- name: default_fan_speed_boundaries
groups:
- name: zone0_ambient
interface: xyz.openbmc_project.Sensor.Value
property:
name: Value
type: int64_t
triggers:
- name: init
method: getProperties
handler: setProperty
- name: signal
signal: propertiesChanged
handler: setProperty
actions:
- name: set_floor_from_average_sensor_value
map:
value:
- 27000: 3500
- 32000: 4600
- 37000: 5200
- 40000: 5800
type: std::map<int64_t, uint64_t>
- name: use_events_on_state
property:
value: CUSTOM
type: std::string
events:
- name: custom_fan_speed_boundaries
groups:
- name: zone0_ambient
interface: xyz.openbmc_project.Sensor.Value
property:
name: Value
type: int64_t
triggers:
- name: init
method: getProperties
handler: setProperty
- name: signal
signal: propertiesChanged
handler: setProperty
actions:
- name: set_floor_from_average_sensor_value
map:
value:
- 27000: 4600
- 32000: 5000
- 37000: 5400
- 40000: 5800
type: std::map<int64_t, uint64_t>

Tested:
Different fan floor events loaded based on thermal mode state

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

show more ...


# 6db547dd 08-Oct-2019 Matthew Barth <msbarth@us.ibm.com>

Fix generated group on nested events

A group consists of a dbus object path, interface, and property which
are all strings. The generated group members need to be generated
within quotes.

Tested:

Fix generated group on nested events

A group consists of a dbus object path, interface, and property which
are all strings. The generated group members need to be generated
within quotes.

Tested:
Nested event group strings contained in quotes

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

show more ...


# 8a697b68 14-Dec-2018 Matthew Barth <msbarth@us.ibm.com>

Correct precondition generation

Currently, preconditions must include the set speed event as a
parameter, so the ability to generate a precondition with no parameters
is removed. Related to this, ac

Correct precondition generation

Currently, preconditions must include the set speed event as a
parameter, so the ability to generate a precondition with no parameters
is removed. Related to this, actions without parameters are supported
and was corrected to allow this.

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

show more ...


# a6f75169 20-Nov-2018 Matthew Barth <msbarth@us.ibm.com>

Remove events with no groups defined

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


# 06fa7817 20-Nov-2018 Matthew Barth <msbarth@us.ibm.com>

Generate groups defined on actions

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


# 75d97350 01-Nov-2018 Matthew Barth <msbarth@us.ibm.com>

Create empty action groups

This introduces the framework for set speed events to have the groups
within an event assign directly on the event action. When a group is
defined directly to an action, i

Create empty action groups

This introduces the framework for set speed events to have the groups
within an event assign directly on the event action. When a group is
defined directly to an action, it will be used in place of the group(s)
on the event. This allows a single event, driven by trigger(s), to call
multiple actions on different groups with differing parameters to those
actions.

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

show more ...


# f7e1cb34 19-Nov-2018 Matthew Barth <msbarth@us.ibm.com>

Event groups are optional

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


# 621a5778 14-Nov-2018 Matthew Barth <msbarth@us.ibm.com>

Add event name to SetSpeedEvent data

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


# 03774017 26-Oct-2018 Matthew Barth <msbarth@us.ibm.com>

Allow event groups to be empty

Some events may not require a group to be provided. Also, this will
allow events to define the group(s) to be used by the actions directly
on the action.

Ex) A case o

Allow event groups to be empty

Some events may not require a group to be provided. Also, this will
allow events to define the group(s) to be used by the actions directly
on the action.

Ex) A case of defining groups on the event's actions may be that a set
of actions are run by the same event trigger but have parameters
specific to the different groups.

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

show more ...


# 926df663 09-Oct-2018 Matthew Barth <msbarth@us.ibm.com>

Separate handlers for signals and method calls

Signals and method calls have different parameter structures. When the
associated event trigger is chosen, what's generated to retrieve the
dbus data i

Separate handlers for signals and method calls

Signals and method calls have different parameter structures. When the
associated event trigger is chosen, what's generated to retrieve the
dbus data is specific to that trigger event. For signals, the data is
read from the given signal message. A method call is method specific and
is called to be done against all of the members within the event group.

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

show more ...


# cd3bfbc1 07-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Add event init trigger

An event defined with an init trigger will run the event's actions
upon the event initializing. An event initializes when the fan control
application starts or at anytime an e

Add event init trigger

An event defined with an init trigger will run the event's actions
upon the event initializing. An event initializes when the fan control
application starts or at anytime an event's precondition is valid.

Tested:
Used missing fan action to set a speed at application start
Used missing fan action to set a speed upon valid precondition

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

show more ...


# 146b7390 08-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Convert event group to a vector of tuples

In preparation for storing each event group member's property state used
within the event's actions, the group type should be converted to a
vector of tuple

Convert event group to a vector of tuples

In preparation for storing each event group member's property state used
within the event's actions, the group type should be converted to a
vector of tuples. This vector will allow, if user defines, easier use of
different interfaces and properties on the same path to be used within
the same event group.

Tested:
Generated code for groups reflects vector instead of map
Actions against groups remain unchanged

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

show more ...


# 73379f99 15-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Converge generating signal and handler params

In preparation of including the handler within the signal functors, the
generation of these can be done thru a single function. The handlers are
not act

Converge generating signal and handler params

In preparation of including the handler within the signal functors, the
generation of these can be done thru a single function. The handlers are
not actually user selectable and are specific to the signal chosen for
an event. This commit begins the transition of removing the handlers
from being selectable and associating them with the specific signal.

Tested:
Code generated remains unchanged

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

show more ...


# 016bd24c 07-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Move signals to event triggers

Move the generation and initialization of signals to be included in the
available event triggers. The signal trigger consists of subscribing to
a given signal match wh

Move signals to event triggers

Move the generation and initialization of signals to be included in the
available event triggers. The signal trigger consists of subscribing to
a given signal match where when the signal is received and handled, it
causes the event actions to be called.

Tested:
All current event signals are still registered and received
Speed changes occur based on temperature sensor change signals

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

show more ...


# 1b4de26a 06-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Call event triggers on initialization

Move timers to be an event trigger function that is called upon event
initialization. Previously, event timers were created and started
directly within the init

Call event triggers on initialization

Move timers to be an event trigger function that is called upon event
initialization. Previously, event timers were created and started
directly within the initialization of the event, this moves the creation
and starting of a defined event timer to within a selectable event
trigger function.

With the creation of event triggers, an event can be defined with a list
of supported triggers used to execute the actions, if defined, of the
event. In the case no actions are given, the trigger is still used.

Tested:
Timer triggers are created/started correctly for an event
Events with no actions have timers created/started as defined

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

show more ...


# d0b90fc6 05-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Have timers be a trigger type in microseconds

Extract and generate timers in microseconds for all event triggers and
actions that take a timer as a parameter.

Tested:
Timers are created on even

Have timers be a trigger type in microseconds

Extract and generate timers in microseconds for all event triggers and
actions that take a timer as a parameter.

Tested:
Timers are created on events with timer triggers defined
Inspect that generated timers are created in microseconds
No timer is created for events without a timer trigger

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

show more ...


# f20c321d 02-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Preconditions use signal triggers

Merge precondition events to use the same signal trigger generation
function.

Tested:
Generated code remains unchanged

Change-Id: I4c3e9df2567a0f4290ddeba2bf7

Preconditions use signal triggers

Merge precondition events to use the same signal trigger generation
function.

Tested:
Generated code remains unchanged

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

show more ...


# a69465a1 02-Mar-2018 Matthew Barth <msbarth@us.ibm.com>

Move signal matches to triggers section

Create a triggers section that will support different types of triggers
for an event. Currently the only supported trigger is signal based where
code is gener

Move signal matches to triggers section

Create a triggers section that will support different types of triggers
for an event. Currently the only supported trigger is signal based where
code is generated to subscribe to the given matches for each member of
all groups in the event.

Tested:
Generated code remains unchanged

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

show more ...


# 59096e50 18-Feb-2019 Matthew Barth <msbarth@us.ibm.com>

Generate zone property persist configs

Each zone object's hosted interfaces' properties can be configured to be
persisted or not at compile time. Those properties configured to be
persisted are set

Generate zone property persist configs

Each zone object's hosted interfaces' properties can be configured to be
persisted or not at compile time. Those properties configured to be
persisted are set to be persisted after the initial value is set. When
this value doesnt change on a system, there's no need to persist it
since the initial value is compiled into the fan control application per
zone. Once this value is changed and therefore persisted, upon a
application restart, initially the value would be what's compiled in
until its configured again to be persisted and then restored.

Tested:
Current property always set to what's persisted between restarts
Nothing persisted when Current property doesnt change from default

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

show more ...


123