History log of /openbmc/phosphor-power/tools/power-utils/ (Results 1 – 21 of 21)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
5c6a693e29-Nov-2023 Patrick Williams <patrick@stwcx.xyz>

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer retur

build: use allowed over enabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and auto.

Switch all uses of `enabled` to `allowed`.

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

show more ...


/openbmc/phosphor-power/.clang-format
/openbmc/phosphor-power/README.md
/openbmc/phosphor-power/cold-redundancy/cold_redundancy.cpp
/openbmc/phosphor-power/elog-errors.hpp
/openbmc/phosphor-power/meson.build
/openbmc/phosphor-power/meson.options
/openbmc/phosphor-power/phosphor-power-sequencer/config_files/UCD90160Monitor_ibm,bonnell.json
/openbmc/phosphor-power/phosphor-power-supply/meson.build
/openbmc/phosphor-power/phosphor-power-supply/power_supply.cpp
/openbmc/phosphor-power/phosphor-power-supply/power_supply.hpp
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.cpp
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.hpp
/openbmc/phosphor-power/phosphor-power-supply/test/meson.build
/openbmc/phosphor-power/phosphor-power-supply/test/mock.hpp
/openbmc/phosphor-power/phosphor-power-supply/test/power_supply_tests.cpp
/openbmc/phosphor-power/phosphor-power-supply/util.hpp
/openbmc/phosphor-power/phosphor-power-supply/util_base.hpp
/openbmc/phosphor-power/phosphor-regulators/meson.build
/openbmc/phosphor-power/phosphor-regulators/test/meson.build
/openbmc/phosphor-power/power-sequencer/main.cpp
/openbmc/phosphor-power/power-sequencer/meson.build
/openbmc/phosphor-power/power-supply/main.cpp
/openbmc/phosphor-power/power-supply/meson.build
/openbmc/phosphor-power/power-supply/power_supply.cpp
/openbmc/phosphor-power/power-supply/test/meson.build
/openbmc/phosphor-power/subprojects/googletest.wrap
/openbmc/phosphor-power/subprojects/nlohmann-json.wrap
/openbmc/phosphor-power/test/meson.build
/openbmc/phosphor-power/tools/i2c/meson.build
/openbmc/phosphor-power/tools/i2c/test/meson.build
meson.build
test/meson.build
c0b9e9e417-Jul-2023 Matt Spinler <spinler@us.ibm.com>

Fix standalone build fail in utils/version.cpp

Either the new compiler, C++ version, or nlohmann version starting
giving an error when building with subprojects:

```
../tools/power-utils/version.cp

Fix standalone build fail in utils/version.cpp

Either the new compiler, C++ version, or nlohmann version starting
giving an error when building with subprojects:

```
../tools/power-utils/version.cpp: In function ‘PsuVersionInfo utils::getVersionInfo(const std::string&)’:
../tools/power-utils/version.cpp:67:40: error: ambiguous overload for ‘operator=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
and ‘const nlohmann::basic_json<>::value_type’ {aka ‘const nlohmann::basic_json<>’})
67 | versionStr = fru["fileName"];
```

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

show more ...

888bebde31-May-2023 Patrick Williams <patrick@stwcx.xyz>

meson: add necessary subprojects

Add subprojects for all the direct dependencies of the project such
that the project can be built outside of a Yocto SDK on a typical
Linux development system.

-

meson: add necessary subprojects

Add subprojects for all the direct dependencies of the project such
that the project can be built outside of a Yocto SDK on a typical
Linux development system.

- Update the .gitignore to ignore the subproject source directories.
- Update the .gitignore to ignore alternative build subdirectory
names as is typical with most projects in the openbmc organization.
- Add wrap files for direct dependencies, copied from other
repositories that already have the same dependencies.
- Modify the meson.build dependency for libgpiod so that the C++
bindings are included.
- Add many missing dependencies throughout.
- Sort all dependencies alphabetically for consistency.

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

show more ...


/openbmc/phosphor-power/.gitignore
/openbmc/phosphor-power/OWNERS
/openbmc/phosphor-power/cold-redundancy/meson.build
/openbmc/phosphor-power/meson.build
/openbmc/phosphor-power/names_values.hpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/meson.build
/openbmc/phosphor-power/phosphor-power-supply/meson.build
/openbmc/phosphor-power/phosphor-power-supply/power_supply.cpp
/openbmc/phosphor-power/phosphor-power-supply/power_supply.hpp
/openbmc/phosphor-power/phosphor-power-supply/test/meson.build
/openbmc/phosphor-power/phosphor-regulators/src/config_file_parser.hpp
/openbmc/phosphor-power/phosphor-regulators/src/meson.build
/openbmc/phosphor-power/phosphor-regulators/test/device_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/meson.build
/openbmc/phosphor-power/phosphor-regulators/test/temporary_file_tests.cpp
/openbmc/phosphor-power/power-sequencer/meson.build
/openbmc/phosphor-power/power-supply/meson.build
/openbmc/phosphor-power/power-supply/power_supply.cpp
/openbmc/phosphor-power/services/phosphor-regulators-config.service
/openbmc/phosphor-power/services/phosphor-regulators-monitor-disable.service
/openbmc/phosphor-power/services/phosphor-regulators-monitor-enable.service
/openbmc/phosphor-power/subprojects/CLI11.wrap
/openbmc/phosphor-power/subprojects/fmt.wrap
/openbmc/phosphor-power/subprojects/libgpiod.wrap
/openbmc/phosphor-power/subprojects/nlohmann-json.wrap
/openbmc/phosphor-power/subprojects/phosphor-dbus-interfaces.wrap
/openbmc/phosphor-power/subprojects/phosphor-logging.wrap
/openbmc/phosphor-power/subprojects/sdbusplus.wrap
/openbmc/phosphor-power/subprojects/sdeventplus.wrap
/openbmc/phosphor-power/subprojects/stdplus.wrap
/openbmc/phosphor-power/test/file_descriptor_tests.cpp
meson.build
test/meson.build
48781aef10-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: If66f68c96df4baf8dc07abf8729a3cb7657e932d
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


/openbmc/phosphor-power/.clang-format
/openbmc/phosphor-power/cold-redundancy/cold_redundancy.cpp
/openbmc/phosphor-power/device.hpp
/openbmc/phosphor-power/file_descriptor.hpp
/openbmc/phosphor-power/meson.build
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_control.cpp
/openbmc/phosphor-power/phosphor-power-supply/power_supply.cpp
/openbmc/phosphor-power/phosphor-power-supply/power_supply.hpp
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.cpp
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.hpp
/openbmc/phosphor-power/phosphor-power-supply/test/mock.hpp
/openbmc/phosphor-power/phosphor-power-supply/util.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_write_bytes_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/log_phase_fault_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/pmbus_read_sensor_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/pmbus_write_vout_command_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/run_rule_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/config_file_parser.cpp
/openbmc/phosphor-power/phosphor-regulators/src/device.hpp
/openbmc/phosphor-power/phosphor-regulators/src/error_logging.hpp
/openbmc/phosphor-power/phosphor-regulators/src/journal.cpp
/openbmc/phosphor-power/phosphor-regulators/src/manager.cpp
/openbmc/phosphor-power/phosphor-regulators/src/presence_service.hpp
/openbmc/phosphor-power/phosphor-regulators/src/rail.hpp
/openbmc/phosphor-power/phosphor-regulators/src/regsctl/main.cpp
/openbmc/phosphor-power/phosphor-regulators/src/regsctl/utility.hpp
/openbmc/phosphor-power/phosphor-regulators/src/services.hpp
/openbmc/phosphor-power/phosphor-regulators/src/temporary_file.cpp
/openbmc/phosphor-power/phosphor-regulators/src/vpd.hpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/set_device_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/device_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/id_map_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/phase_fault_detection_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/system_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/test_sdbus_error.hpp
/openbmc/phosphor-power/phosphor-regulators/test/validate-regulators-config_tests.cpp
/openbmc/phosphor-power/pmbus.cpp
/openbmc/phosphor-power/power-sequencer/mihawk-cpld.hpp
/openbmc/phosphor-power/power-sequencer/ucd90160.cpp
/openbmc/phosphor-power/power-sequencer/ucd90160.hpp
/openbmc/phosphor-power/power-supply/main.cpp
/openbmc/phosphor-power/power-supply/power_supply.cpp
/openbmc/phosphor-power/power-supply/record_manager.cpp
/openbmc/phosphor-power/power-supply/record_manager.hpp
/openbmc/phosphor-power/services/phosphor-psu-monitor.service
main.cpp
version.cpp
/openbmc/phosphor-power/types.hpp
/openbmc/phosphor-power/utility.cpp
/openbmc/phosphor-power/utility.hpp
b9cf0d2b27-Feb-2023 George Liu <liuxiwei@inspur.com>

tools: Fix some warnings by cppcheck

Warning message:
tools/i2c/i2c.hpp:30:9: performance: Variable 'busStr' is assigned in
constructor body. Consider performing initialization in
initialization lis

tools: Fix some warnings by cppcheck

Warning message:
tools/i2c/i2c.hpp:30:9: performance: Variable 'busStr' is assigned in
constructor body. Consider performing initialization in
initialization list. [useInitializationList]
busStr = "/dev/i2c-" + std::to_string(busId);
^

tools/power-utils/updater.cpp:213:18: style: Local variable 'devPath'
shadows outer variable [shadowVariable]
auto devPath = internal::getDevicePath(p);
^
tools/power-utils/updater.hpp:108:17: note: Shadowed declaration
std::string devPath;
^
tools/power-utils/updater.cpp:213:18: note: Shadow variable
auto devPath = internal::getDevicePath(p);
^

Tested: Verify that there are no such warnings in local CI.

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

show more ...


/openbmc/phosphor-power/OWNERS
/openbmc/phosphor-power/README.md
/openbmc/phosphor-power/example/psu.json
/openbmc/phosphor-power/meson.build
/openbmc/phosphor-power/org/open_power/Witherspoon/Fault.errors.yaml
/openbmc/phosphor-power/org/open_power/Witherspoon/Fault.metadata.yaml
/openbmc/phosphor-power/org/open_power/Witherspoon/Fault/meson.build
/openbmc/phosphor-power/phosphor-power-sequencer/README.md
/openbmc/phosphor-power/phosphor-power-sequencer/config_files/README.md
/openbmc/phosphor-power/phosphor-power-sequencer/config_files/UCD90320Monitor_ibm,everest.json
/openbmc/phosphor-power/phosphor-power-sequencer/config_files/UCD90320Monitor_ibm,rainier.json
/openbmc/phosphor-power/phosphor-power-sequencer/src/README.md
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_control.cpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_control.hpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/ucd90320_monitor.cpp
/openbmc/phosphor-power/phosphor-power-supply/README.md
/openbmc/phosphor-power/phosphor-power-supply/configurations/witherspoon/psu_config.json
/openbmc/phosphor-power/phosphor-power-supply/power_supply.cpp
/openbmc/phosphor-power/phosphor-power-supply/power_supply.hpp
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.cpp
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.hpp
/openbmc/phosphor-power/phosphor-power-supply/test/power_supply_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/README.md
/openbmc/phosphor-power/phosphor-regulators/config_files/ibm_bonnell.json
/openbmc/phosphor-power/phosphor-regulators/config_files/ibm_everest.json
/openbmc/phosphor-power/phosphor-regulators/config_files/ibm_rainier.json
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/README.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/action.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/and.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/chassis.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/compare_presence.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/compare_vpd.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/config_file.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/configuration.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/device.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_capture_bytes.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_compare_bit.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_compare_byte.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_compare_bytes.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_interface.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_write_bit.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_write_byte.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_write_bytes.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/if.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/log_phase_fault.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/not.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/or.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/phase_fault_detection.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/pmbus_read_sensor.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/pmbus_write_vout_command.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/presence_detection.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/rail.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/rule.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/run_rule.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/sensor_monitoring.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/set_device.md
/openbmc/phosphor-power/phosphor-regulators/docs/design.md
/openbmc/phosphor-power/phosphor-regulators/examples/config.json
/openbmc/phosphor-power/phosphor-regulators/schema/config_schema.json
/openbmc/phosphor-power/phosphor-regulators/src/journal.cpp
/openbmc/phosphor-power/phosphor-regulators/src/phase_fault.hpp
/openbmc/phosphor-power/phosphor-regulators/test/run-ci.sh
/openbmc/phosphor-power/phosphor-regulators/test/validate-regulators-config_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/tools/validate-regulators-config.py
/openbmc/phosphor-power/power-sequencer/example/ucd90160.yaml
/openbmc/phosphor-power/power-sequencer/gen-ucd90160-defs.py
/openbmc/phosphor-power/services/phosphor-regulators-config.service
/openbmc/phosphor-power/services/phosphor-regulators.service
/openbmc/phosphor-power/services/pseq-monitor-pgood.service
/openbmc/phosphor-power/tools/i2c/i2c.hpp
updater.cpp
7354ce6222-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: Ief05bd757cffb1453e058a719ee4b060861752e7

show more ...


/openbmc/phosphor-power/.clang-format
/openbmc/phosphor-power/.gitignore
/openbmc/phosphor-power/.shellcheck
/openbmc/phosphor-power/MAINTAINERS
/openbmc/phosphor-power/OWNERS
/openbmc/phosphor-power/README.md
/openbmc/phosphor-power/cold-redundancy/cold_redundancy.cpp
/openbmc/phosphor-power/cold-redundancy/cold_redundancy.hpp
/openbmc/phosphor-power/cold-redundancy/meson.build
/openbmc/phosphor-power/cold-redundancy/util.cpp
/openbmc/phosphor-power/device.hpp
/openbmc/phosphor-power/device_monitor.hpp
/openbmc/phosphor-power/elog-errors.hpp
/openbmc/phosphor-power/file_descriptor.hpp
/openbmc/phosphor-power/gpio.hpp
/openbmc/phosphor-power/meson.build
/openbmc/phosphor-power/meson_options.txt
/openbmc/phosphor-power/org/open_power/Witherspoon/Fault.errors.yaml
/openbmc/phosphor-power/org/open_power/Witherspoon/Fault.metadata.yaml
/openbmc/phosphor-power/phosphor-power-sequencer/README.md
/openbmc/phosphor-power/phosphor-power-sequencer/config_files/UCD90320Monitor_ibm,everest.json
/openbmc/phosphor-power/phosphor-power-sequencer/config_files/UCD90320Monitor_ibm,rainier.json
/openbmc/phosphor-power/phosphor-power-sequencer/meson.build
/openbmc/phosphor-power/phosphor-power-sequencer/src/meson.build
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_control.cpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_control.hpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_control_main.cpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_interface.cpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_interface.hpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_sequencer_monitor.cpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/power_sequencer_monitor.hpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/ucd90320_monitor.cpp
/openbmc/phosphor-power/phosphor-power-sequencer/src/ucd90320_monitor.hpp
/openbmc/phosphor-power/phosphor-power-supply/README.md
/openbmc/phosphor-power/phosphor-power-supply/average.hpp
/openbmc/phosphor-power/phosphor-power-supply/configurations/witherspoon/psu_config.json
/openbmc/phosphor-power/phosphor-power-supply/main.cpp
/openbmc/phosphor-power/phosphor-power-supply/maximum.hpp
/openbmc/phosphor-power/phosphor-power-supply/meson.build
/openbmc/phosphor-power/phosphor-power-supply/power_supply.cpp
/openbmc/phosphor-power/phosphor-power-supply/power_supply.hpp
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.cpp
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.hpp
/openbmc/phosphor-power/phosphor-power-supply/record_manager.cpp
/openbmc/phosphor-power/phosphor-power-supply/record_manager.hpp
/openbmc/phosphor-power/phosphor-power-supply/test/meson.build
/openbmc/phosphor-power/phosphor-power-supply/test/mock.cpp
/openbmc/phosphor-power/phosphor-power-supply/test/mock.hpp
/openbmc/phosphor-power/phosphor-power-supply/test/power_supply_tests.cpp
/openbmc/phosphor-power/phosphor-power-supply/util.cpp
/openbmc/phosphor-power/phosphor-power-supply/util.hpp
/openbmc/phosphor-power/phosphor-power-supply/util_base.hpp
/openbmc/phosphor-power/phosphor-regulators/README.md
/openbmc/phosphor-power/phosphor-regulators/config_files/ibm_everest.json
/openbmc/phosphor-power/phosphor-regulators/config_files/ibm_rainier.json
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/README.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/action.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/chassis.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/compare_presence.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/compare_vpd.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/config_file.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/device.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_capture_bytes.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/log_phase_fault.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/phase_fault_detection.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/pmbus_read_sensor.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/presence_detection.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/rule.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/set_device.md
/openbmc/phosphor-power/phosphor-regulators/docs/design.md
/openbmc/phosphor-power/phosphor-regulators/examples/config.json
/openbmc/phosphor-power/phosphor-regulators/schema/config_schema.json
/openbmc/phosphor-power/phosphor-regulators/src/actions/action_environment.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/and_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/compare_presence_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/compare_presence_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/compare_vpd_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/compare_vpd_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_capture_bytes_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_capture_bytes_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_compare_bit_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_compare_bit_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_compare_byte_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_compare_byte_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_compare_bytes_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_compare_bytes_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_write_bit_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_write_bit_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_write_byte_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_write_byte_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_write_bytes_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/i2c_write_bytes_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/if_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/log_phase_fault_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/not_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/or_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/pmbus_read_sensor_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/pmbus_read_sensor_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/pmbus_write_vout_command_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/pmbus_write_vout_command_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/run_rule_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/set_device_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/chassis.cpp
/openbmc/phosphor-power/phosphor-regulators/src/chassis.hpp
/openbmc/phosphor-power/phosphor-regulators/src/config_file_parser.cpp
/openbmc/phosphor-power/phosphor-regulators/src/config_file_parser.hpp
/openbmc/phosphor-power/phosphor-regulators/src/config_file_parser_error.hpp
/openbmc/phosphor-power/phosphor-regulators/src/configuration.cpp
/openbmc/phosphor-power/phosphor-regulators/src/configuration.hpp
/openbmc/phosphor-power/phosphor-regulators/src/dbus_sensor.cpp
/openbmc/phosphor-power/phosphor-regulators/src/dbus_sensor.hpp
/openbmc/phosphor-power/phosphor-regulators/src/dbus_sensors.cpp
/openbmc/phosphor-power/phosphor-regulators/src/dbus_sensors.hpp
/openbmc/phosphor-power/phosphor-regulators/src/device.cpp
/openbmc/phosphor-power/phosphor-regulators/src/device.hpp
/openbmc/phosphor-power/phosphor-regulators/src/error_history.hpp
/openbmc/phosphor-power/phosphor-regulators/src/error_logging.cpp
/openbmc/phosphor-power/phosphor-regulators/src/error_logging.hpp
/openbmc/phosphor-power/phosphor-regulators/src/error_logging_utils.cpp
/openbmc/phosphor-power/phosphor-regulators/src/error_logging_utils.hpp
/openbmc/phosphor-power/phosphor-regulators/src/exception_utils.cpp
/openbmc/phosphor-power/phosphor-regulators/src/exception_utils.hpp
/openbmc/phosphor-power/phosphor-regulators/src/ffdc_file.cpp
/openbmc/phosphor-power/phosphor-regulators/src/ffdc_file.hpp
/openbmc/phosphor-power/phosphor-regulators/src/id_map.cpp
/openbmc/phosphor-power/phosphor-regulators/src/id_map.hpp
/openbmc/phosphor-power/phosphor-regulators/src/interfaces/manager_interface.cpp
/openbmc/phosphor-power/phosphor-regulators/src/interfaces/manager_interface.hpp
/openbmc/phosphor-power/phosphor-regulators/src/journal.cpp
/openbmc/phosphor-power/phosphor-regulators/src/journal.hpp
/openbmc/phosphor-power/phosphor-regulators/src/main.cpp
/openbmc/phosphor-power/phosphor-regulators/src/manager.cpp
/openbmc/phosphor-power/phosphor-regulators/src/manager.hpp
/openbmc/phosphor-power/phosphor-regulators/src/meson.build
/openbmc/phosphor-power/phosphor-regulators/src/phase_fault.hpp
/openbmc/phosphor-power/phosphor-regulators/src/phase_fault_detection.cpp
/openbmc/phosphor-power/phosphor-regulators/src/phase_fault_detection.hpp
/openbmc/phosphor-power/phosphor-regulators/src/pmbus_error.hpp
/openbmc/phosphor-power/phosphor-regulators/src/pmbus_utils.cpp
/openbmc/phosphor-power/phosphor-regulators/src/pmbus_utils.hpp
/openbmc/phosphor-power/phosphor-regulators/src/presence_detection.cpp
/openbmc/phosphor-power/phosphor-regulators/src/presence_detection.hpp
/openbmc/phosphor-power/phosphor-regulators/src/presence_service.cpp
/openbmc/phosphor-power/phosphor-regulators/src/presence_service.hpp
/openbmc/phosphor-power/phosphor-regulators/src/rail.cpp
/openbmc/phosphor-power/phosphor-regulators/src/rail.hpp
/openbmc/phosphor-power/phosphor-regulators/src/regsctl/main.cpp
/openbmc/phosphor-power/phosphor-regulators/src/regsctl/utility.hpp
/openbmc/phosphor-power/phosphor-regulators/src/rule.hpp
/openbmc/phosphor-power/phosphor-regulators/src/sensor_monitoring.cpp
/openbmc/phosphor-power/phosphor-regulators/src/sensor_monitoring.hpp
/openbmc/phosphor-power/phosphor-regulators/src/sensors.hpp
/openbmc/phosphor-power/phosphor-regulators/src/services.hpp
/openbmc/phosphor-power/phosphor-regulators/src/system.cpp
/openbmc/phosphor-power/phosphor-regulators/src/system.hpp
/openbmc/phosphor-power/phosphor-regulators/src/temporary_file.cpp
/openbmc/phosphor-power/phosphor-regulators/src/temporary_file.hpp
/openbmc/phosphor-power/phosphor-regulators/src/vpd.cpp
/openbmc/phosphor-power/phosphor-regulators/src/vpd.hpp
/openbmc/phosphor-power/phosphor-regulators/src/write_verification_error.hpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/action_environment_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/action_utils_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/and_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/compare_presence_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/compare_vpd_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_capture_bytes_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_compare_bit_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_compare_byte_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_compare_bytes_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_write_bit_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_write_byte_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/i2c_write_bytes_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/if_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/log_phase_fault_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/not_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/or_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/pmbus_read_sensor_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/pmbus_write_vout_command_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/run_rule_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/set_device_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/chassis_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/config_file_parser_error_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/config_file_parser_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/configuration_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/device_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/error_history_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/error_logging_utils_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/exception_utils_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/ffdc_file_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/id_map_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/meson.build
/openbmc/phosphor-power/phosphor-regulators/test/mock_error_logging.hpp
/openbmc/phosphor-power/phosphor-regulators/test/mock_journal.hpp
/openbmc/phosphor-power/phosphor-regulators/test/mock_presence_service.hpp
/openbmc/phosphor-power/phosphor-regulators/test/mock_sensors.hpp
/openbmc/phosphor-power/phosphor-regulators/test/mock_services.hpp
/openbmc/phosphor-power/phosphor-regulators/test/mock_vpd.hpp
/openbmc/phosphor-power/phosphor-regulators/test/phase_fault_detection_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/phase_fault_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/pmbus_error_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/pmbus_utils_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/presence_detection_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/rail_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/rule_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/run-ci.sh
/openbmc/phosphor-power/phosphor-regulators/test/sensor_monitoring_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/sensors_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/system_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/temporary_file_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/test_sdbus_error.hpp
/openbmc/phosphor-power/phosphor-regulators/test/test_utils.hpp
/openbmc/phosphor-power/phosphor-regulators/test/validate-regulators-config_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/write_verification_error_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/tools/validate-regulators-config.py
/openbmc/phosphor-power/pmbus.cpp
/openbmc/phosphor-power/pmbus.hpp
/openbmc/phosphor-power/power-sequencer/gen-ucd90160-defs.py
/openbmc/phosphor-power/power-sequencer/main.cpp
/openbmc/phosphor-power/power-sequencer/meson.build
/openbmc/phosphor-power/power-sequencer/mihawk-cpld.cpp
/openbmc/phosphor-power/power-sequencer/mihawk-cpld.hpp
/openbmc/phosphor-power/power-sequencer/pgood_monitor.cpp
/openbmc/phosphor-power/power-sequencer/pgood_monitor.hpp
/openbmc/phosphor-power/power-sequencer/runtime_monitor.cpp
/openbmc/phosphor-power/power-sequencer/runtime_monitor.hpp
/openbmc/phosphor-power/power-sequencer/ucd90160.cpp
/openbmc/phosphor-power/power-sequencer/ucd90160.hpp
/openbmc/phosphor-power/power-supply/average.hpp
/openbmc/phosphor-power/power-supply/main.cpp
/openbmc/phosphor-power/power-supply/maximum.hpp
/openbmc/phosphor-power/power-supply/power_supply.cpp
/openbmc/phosphor-power/power-supply/power_supply.hpp
/openbmc/phosphor-power/power-supply/record_manager.cpp
/openbmc/phosphor-power/power-supply/record_manager.hpp
/openbmc/phosphor-power/services/phosphor-power-control.service
/openbmc/phosphor-power/services/phosphor-psu-monitor.service
/openbmc/phosphor-power/services/phosphor-regulators-config.service
/openbmc/phosphor-power/services/phosphor-regulators-monitor-disable.service
/openbmc/phosphor-power/services/phosphor-regulators-monitor-enable.service
/openbmc/phosphor-power/services/phosphor-regulators.service
/openbmc/phosphor-power/services/pseq-monitor-pgood.service
/openbmc/phosphor-power/services/pseq-monitor.service
/openbmc/phosphor-power/test/file_descriptor_tests.cpp
/openbmc/phosphor-power/test/meson.build
/openbmc/phosphor-power/tools/i2c/i2c.cpp
/openbmc/phosphor-power/tools/i2c/i2c.hpp
/openbmc/phosphor-power/tools/i2c/i2c_interface.hpp
/openbmc/phosphor-power/tools/i2c/test/mocked_i2c_interface.cpp
updater.hpp
/openbmc/phosphor-power/types.hpp
/openbmc/phosphor-power/utility.cpp
/openbmc/phosphor-power/utility.hpp
dc8e931214-Feb-2020 Brandon Wyman <bjwyman@gmail.com>

Add OE-SDK option to Meson

Add option to enable oe-sdk which will setup linker arguments to allow
for building and running tests with the x86 SDK.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
C

Add OE-SDK option to Meson

Add option to enable oe-sdk which will setup linker arguments to allow
for building and running tests with the x86 SDK.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: I8279b7d862e29235d2d4eae39405cc35a51b762f

show more ...

ff48143813-Feb-2020 Shawn McCarney <shawnmm@us.ibm.com>

Only build tests if -Dtests=enabled specified

A meson build option named 'tests' is defined for this repository. It
indicates whether gtest/gmock tests should be built.

However, some tests are cur

Only build tests if -Dtests=enabled specified

A meson build option named 'tests' is defined for this repository. It
indicates whether gtest/gmock tests should be built.

However, some tests are currently always built even if -Dtests=enabled
isn't specified. This causes build errors in some environments where
gtest and gmock are not available.

Modify meson.build files to only descend into 'test' subdirectories and
build test cases if -Dtests=enabled was specified.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ic0da2326e3d9c273ff76d54b5ac27cbe00d78876

show more ...


/openbmc/phosphor-power/meson.build
/openbmc/phosphor-power/phosphor-power-supply/main.cpp
/openbmc/phosphor-power/phosphor-power-supply/meson.build
/openbmc/phosphor-power/phosphor-power-supply/psu_manager.hpp
/openbmc/phosphor-power/phosphor-regulators/config_files/.keep
/openbmc/phosphor-power/phosphor-regulators/meson.build
/openbmc/phosphor-power/phosphor-regulators/src/actions/action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/action_error.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/and_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/if_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/not_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/or_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/run_rule_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/set_device_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/device.hpp
/openbmc/phosphor-power/phosphor-regulators/src/meson.build
/openbmc/phosphor-power/phosphor-regulators/test/actions/action_environment_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/action_error_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/and_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/if_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/mock_action.hpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/not_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/or_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/run_rule_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/set_device_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/device_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/id_map_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/meson.build
/openbmc/phosphor-power/phosphor-regulators/test/validate-regulators-config_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/tools/validate-regulators-config.py
/openbmc/phosphor-power/power-supply/meson.build
/openbmc/phosphor-power/services/phosphor-psu-monitor.service
/openbmc/phosphor-power/tools/i2c/meson.build
meson.build
b1216b9621-Jan-2020 Shawn McCarney <shawnmm@us.ibm.com>

Create libi2c_dev_mock.a to solve linker errors

The i2c::create() function is currently defined in
mocked_i2c_interface.hpp. This causes linker errors if that header file
is included by multiple .c

Create libi2c_dev_mock.a to solve linker errors

The i2c::create() function is currently defined in
mocked_i2c_interface.hpp. This causes linker errors if that header file
is included by multiple .cpp files in the same test executable.

Moved i2c::create() to mocked_i2c_interface.cpp so that it is only
defined once. Created the static library libi2c_dev_mock.a that
contains mocked_i2c_interface.o.

Test executables that need the mock version of i2c::create() should link
with libi2c_dev_mock.a.

Normal executables that need the real version of i2c::create() should
link with libi2c_dev.a as before. This has not changed.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ic00203c5429c1a2162327905ba547602258c6b0d

show more ...

d1bc4cec13-Dec-2019 Brandon Wyman <bjwyman@gmail.com>

Update .clang-format to latest version from docs

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: Ie6e7f43e7554429704dca86b21320c90aed18791

1d10342829-Nov-2019 Lei YU <mine260309@gmail.com>

i2c: Add i2c block transaction support

The previous code always uses SMBus block read/write.
On some PSU (e.g. FP5280G2's PSU) the I2C block read/write is
required, so add that support.

Specificall

i2c: Add i2c block transaction support

The previous code always uses SMBus block read/write.
On some PSU (e.g. FP5280G2's PSU) the I2C block read/write is
required, so add that support.

Specifically, add a Mode enum class and add the parameter for block
read/write to indicate whether SMBus or I2C block read/write is to be
called.

Tested: Verify the code works on FP5280G2 with I2C block write.

Note: Currently there is no case for I2C block read, so that function is
not tested.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I5f77ffe6900d14f3703dae7241799a7b37c5a726

show more ...

34fb8bda07-Nov-2019 Lei YU <mine260309@gmail.com>

i2c: Implement write function

Implement I2CDevice::write() by invoking i2c_smbus_write_xxx() APIs.
The code is referenced from i2c-tools' i2cset.c:

https://github.com/ev3dev/i2c-tools/blob/ev3dev-

i2c: Implement write function

Implement I2CDevice::write() by invoking i2c_smbus_write_xxx() APIs.
The code is referenced from i2c-tools' i2cset.c:

https://github.com/ev3dev/i2c-tools/blob/ev3dev-stretch/tools/i2cset.c

Tested: Verify on Witherspoon that it writes the PSU unlock upgrade
command and boot flag successfully.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I9fb014c787ef3ebb2f7793a0d012b1d652ef069f

show more ...

92e89eb506-Nov-2019 Lei YU <mine260309@gmail.com>

i2c: Implement read function

Implement I2CDevice::read() by invoking i2c_smbus_read_xxx() APIs.
The code is referenced from i2c-tools' i2cget.c:

https://github.com/ev3dev/i2c-tools/blob/ev3dev-str

i2c: Implement read function

Implement I2CDevice::read() by invoking i2c_smbus_read_xxx() APIs.
The code is referenced from i2c-tools' i2cget.c:

https://github.com/ev3dev/i2c-tools/blob/ev3dev-stretch/tools/i2cget.c

Tested: Verify on Witherspoon that it reads the PSU ppgrade mode status
register (1 byte) and CRC16 register (2 bytes) correctly.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I8759b6a35229f81120acf77f08429f7f79458b8b

show more ...

7c2fbbb606-Nov-2019 Lei YU <mine260309@gmail.com>

power-utils: Initially use i2c in updater

Create I2CDevice in updater and invoke read() in doUpdate(), that could
be used in future.
Use mocked I2CInterface in updater's unit test case.

Tested: Man

power-utils: Initially use i2c in updater

Create I2CDevice in updater and invoke read() in doUpdate(), that could
be used in future.
Use mocked I2CInterface in updater's unit test case.

Tested: Manually verify on Witherspoon that the i2c device is opened
and closed during PSU code update.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ie3d9f0565a2ceb000f489647a58ca967a2ef0c38

show more ...

e8c9cd6404-Nov-2019 Lei YU <mine260309@gmail.com>

power-utils: Implement isReadyToUpdate

Check other PSUs' status word and status vout, return false when the
status has input/output fault.

Tested: Verify on Witherspoon that the update is not start

power-utils: Implement isReadyToUpdate

Check other PSUs' status word and status vout, return false when the
status has input/output fault.

Tested: Verify on Witherspoon that the update is not started and log
Unable to update PSU when other PSU has input/ouput fault
when the other PSU has input/output error;
And the update continues when the other PSU has no errors.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ia2a4a23a43c18a417b8a85fbd5339f487984e689

show more ...

575ed13929-Oct-2019 Lei YU <mine260309@gmail.com>

power-utils: Initially add isReadyToUpdate

Initially add isReadyToUpdate() that checks the pre-condition for PSU
update.
For now it only checks the power state and return false if power is on.

When

power-utils: Initially add isReadyToUpdate

Initially add isReadyToUpdate() that checks the pre-condition for PSU
update.
For now it only checks the power state and return false if power is on.

When it is not ready to update, there is no need to unbind/bind the
driver, so move the unbind/bind calls into doUpdate() from ctor/dtor.

Tested: Verify it returns and logs "PSU not ready to update" when power
is on, and continues the update when power is off.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I1cbb454baf735ceb3de883a7317753d46485696f

show more ...


/openbmc/phosphor-power/phosphor-regulators/meson.build
/openbmc/phosphor-power/phosphor-regulators/src/actions/action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/action_environment.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/action_utils.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/and_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/if_action.cpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/if_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/not_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/or_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/run_rule_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/actions/set_device_action.hpp
/openbmc/phosphor-power/phosphor-regulators/src/device.hpp
/openbmc/phosphor-power/phosphor-regulators/src/id_map.cpp
/openbmc/phosphor-power/phosphor-regulators/src/id_map.hpp
/openbmc/phosphor-power/phosphor-regulators/src/meson.build
/openbmc/phosphor-power/phosphor-regulators/src/rail.hpp
/openbmc/phosphor-power/phosphor-regulators/src/rule.hpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/action_environment_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/action_utils_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/and_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/if_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/mock_action.hpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/not_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/or_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/run_rule_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/actions/set_device_action_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/id_map_tests.cpp
/openbmc/phosphor-power/phosphor-regulators/test/meson.build
/openbmc/phosphor-power/phosphor-regulators/test/rule_tests.cpp
updater.cpp
updater.hpp
cfc040c729-Oct-2019 Lei YU <mine260309@gmail.com>

Refactor: Move isPoweredOn to utility

The check of power on will be used by other components, so move it to
utility.
There are several constexpr definitions are used by multiple components,
move the

Refactor: Move isPoweredOn to utility

The check of power on will be used by other components, so move it to
utility.
There are several constexpr definitions are used by multiple components,
move them into types.hpp so that we do not have duplicated constexprs.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I42ad142d6e7ae8da9c0cf6d8f5cb21dee229eba2

show more ...

9ab6d75028-Oct-2019 Lei YU <mine260309@gmail.com>

power-utils: Initially add Updater class

The Updater class is used to do PSU code update, initially add it that
does unbind/bind driver and set PSU present to false/true during the
update.

Tested:

power-utils: Initially add Updater class

The Updater class is used to do PSU code update, initially add it that
does unbind/bind driver and set PSU present to false/true during the
update.

Tested: Manually verify on Witherspoon that the driver is unbind/bind,
and the PSU present property is set to false/true during the PSU
update:
psutils --update \
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0 \
/tmp/images/xxxxxxxx

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ic0a9df7687303caeb9a7f21ba00dc33ee76482db

show more ...

d19df25525-Oct-2019 Lei YU <mine260309@gmail.com>

power-utils: Initially add --update option

This option is used to update the PSU firmware, usage:

psutils --update <psu-inventory-path> <image-dir>

Signed-off-by: Lei YU <mine260309@gmail.com>
Ch

power-utils: Initially add --update option

This option is used to update the PSU firmware, usage:

psutils --update <psu-inventory-path> <image-dir>

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I3958e360f04bb0ace9eea41d9f81e4533432701c

show more ...

093b591722-Oct-2019 Lei YU <mine260309@gmail.com>

power-utils: Add --compare option

This option is to get a latest version from a list of PSU versions.

Due to the --compare option requires a list of strings and only one
option is supported at the

power-utils: Add --compare option

This option is to get a latest version from a list of PSU versions.

Due to the --compare option requires a list of strings and only one
option is supported at the same time, it's easier to switch to CLI11 to
parse the arguments.

Also add --raw option that outputs the text without linefeed.

Tested: Verify both --get-version and --compare works on Witherspoon.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Idec75e3a5699eba8ba587e74824431993fe10c4c

show more ...

0bf1b78229-Aug-2019 Lei YU <mine260309@gmail.com>

Add power-utils

The power-utils is added to support psu code manager as vendor-specifc
tool.
In this commit, the util returns the PSU version based on the PSU
inventory path, where the inventory pat

Add power-utils

The power-utils is added to support psu code manager as vendor-specifc
tool.
In this commit, the util returns the PSU version based on the PSU
inventory path, where the inventory path are mapped to the PSU sysfs
device directory based on a json config.

Tested: Verify the version is returned correctly on Witherspoon:
$ ./psutils --getversion \
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
01100110
And it returns non-zero when it fails to get the version without
throwing exception.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ib60f3aa50ce581d55fe4cd62642f30398e25be83

show more ...


/openbmc/phosphor-power/.clang-format
/openbmc/phosphor-power/.gitignore
/openbmc/phosphor-power/LICENSE
/openbmc/phosphor-power/MAINTAINERS
/openbmc/phosphor-power/README.md
/openbmc/phosphor-power/argument.hpp
/openbmc/phosphor-power/device.hpp
/openbmc/phosphor-power/device_monitor.hpp
/openbmc/phosphor-power/elog-errors.hpp
/openbmc/phosphor-power/example/psu.json
/openbmc/phosphor-power/file.hpp
/openbmc/phosphor-power/gpio.cpp
/openbmc/phosphor-power/gpio.hpp
/openbmc/phosphor-power/meson.build
/openbmc/phosphor-power/meson_options.txt
/openbmc/phosphor-power/names_values.hpp
/openbmc/phosphor-power/org/open_power/Witherspoon/Fault.errors.yaml
/openbmc/phosphor-power/org/open_power/Witherspoon/Fault.metadata.yaml
/openbmc/phosphor-power/org/open_power/Witherspoon/Fault/meson.build
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/README.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/action.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/and.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/chassis.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/compare_presence.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/compare_vpd.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/config_file.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/configuration.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/device.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_compare_bit.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_compare_byte.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_compare_bytes.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_interface.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_write_bit.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_write_byte.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/i2c_write_bytes.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/if.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/not.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/or.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/pmbus_read_sensor.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/pmbus_write_vout_command.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/presence_detection.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/rail.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/rule.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/run_rule.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/sensor_monitoring.md
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/set_device.md
/openbmc/phosphor-power/phosphor-regulators/examples/config_file.json
/openbmc/phosphor-power/pmbus.cpp
/openbmc/phosphor-power/pmbus.hpp
/openbmc/phosphor-power/power-sequencer/argument.cpp
/openbmc/phosphor-power/power-sequencer/example/ucd90160.yaml
/openbmc/phosphor-power/power-sequencer/gen-ucd90160-defs.py
/openbmc/phosphor-power/power-sequencer/main.cpp
/openbmc/phosphor-power/power-sequencer/meson.build
/openbmc/phosphor-power/power-sequencer/pgood_monitor.cpp
/openbmc/phosphor-power/power-sequencer/pgood_monitor.hpp
/openbmc/phosphor-power/power-sequencer/runtime_monitor.cpp
/openbmc/phosphor-power/power-sequencer/runtime_monitor.hpp
/openbmc/phosphor-power/power-sequencer/templates/ucd90160_defs.mako.cpp
/openbmc/phosphor-power/power-sequencer/types.hpp
/openbmc/phosphor-power/power-sequencer/ucd90160.cpp
/openbmc/phosphor-power/power-sequencer/ucd90160.hpp
/openbmc/phosphor-power/power-supply/argument.cpp
/openbmc/phosphor-power/power-supply/average.hpp
/openbmc/phosphor-power/power-supply/main.cpp
/openbmc/phosphor-power/power-supply/maximum.hpp
/openbmc/phosphor-power/power-supply/meson.build
/openbmc/phosphor-power/power-supply/power_supply.cpp
/openbmc/phosphor-power/power-supply/power_supply.hpp
/openbmc/phosphor-power/power-supply/record_manager.cpp
/openbmc/phosphor-power/power-supply/record_manager.hpp
/openbmc/phosphor-power/power-supply/test/meson.build
/openbmc/phosphor-power/power-supply/test/test_records.cpp
/openbmc/phosphor-power/services/power-supply-monitor@.service
/openbmc/phosphor-power/services/pseq-monitor-pgood.service
/openbmc/phosphor-power/services/pseq-monitor.service
/openbmc/phosphor-power/test/meson.build
/openbmc/phosphor-power/test/nvtest.cpp
argument.cpp
main.cpp
meson.build
version.cpp
version.hpp
/openbmc/phosphor-power/utility.cpp
/openbmc/phosphor-power/utility.hpp