History log of /openbmc/witherspoon-pfault-analysis/pmbus.hpp (Results 1 – 23 of 23)
Revision Date Author Comments
# 9c7897ce 28-Mar-2019 Brandon Wyman <bjwyman@gmail.com>

Cleanup: Use filesystem instead of experimental

The GCC version bump in Yocto 2.6 allows for use of std::filesystem
instead of std::experimental::filesystem.

Change-Id: Ibfd6c28

Cleanup: Use filesystem instead of experimental

The GCC version bump in Yocto 2.6 allows for use of std::filesystem
instead of std::experimental::filesystem.

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

show more ...


# f0f02b9a 25-Oct-2018 Matt Spinler <spinler@us.ibm.com>

Start using .clang-format

Used the one from docs/style/cpp.

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


# cab48342 13-Jun-2018 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

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

show more ...


# fa23e330 18-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add support to read binary PMBus data

PMBus::readBinary() can read a sysfs file that
contains binary data and returns a vector of bytes
representing that data.

Change-Id: I3

Add support to read binary PMBus data

PMBus::readBinary() can read a sysfs file that
contains binary data and returns a vector of bytes
representing that data.

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

show more ...


# fbae7b6c 04-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add readString PMBus function

This function will return the data read as an
std::string.

Change-Id: Idd7afbd9b4c7e602fad3146d941f03366140948b
Signed-off-by: Matt Spinler <sp

Add readString PMBus function

This function will return the data read as an
std::string.

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

show more ...


# 4dc4678e 04-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add PMBus device hwmon debug access type

This can be used to find a file in:
/sys/kernel/debug/pmbus/hwmonX/<device type>

For example: /sys/kernel/debug/pmbus/hwmon3/cffps1

Add PMBus device hwmon debug access type

This can be used to find a file in:
/sys/kernel/debug/pmbus/hwmonX/<device type>

For example: /sys/kernel/debug/pmbus/hwmon3/cffps1

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

show more ...


# ba05348f 04-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add function to get PMBus device name

This will be used in the future to find a path
to certain sysfs files.

Change-Id: Ia919b2f954fddf7b97bd1c5025f7c54af942b318
Signed-off-

Add function to get PMBus device name

This will be used in the future to find a path
to certain sysfs files.

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

show more ...


# de16d053 13-Dec-2017 Matt Spinler <spinler@us.ibm.com>

Don't log errors for voltage warnings

Some of the bits in the STATUS_VOUT command response
are just warnings, as defined by the PMBUS spec.

Previously the code would create volt

Don't log errors for voltage warnings

Some of the bits in the STATUS_VOUT command response
are just warnings, as defined by the PMBUS spec.

Previously the code would create voltage fault errors
if any bits were on in that response, and this change
is to check for the actual fault (non-warning) bits only
before creating error logs.

Also, the code will throw the response value into the journal
now if any bits are on at all because warnings are still
useful when getting a full picture of fault conditions.

Resolves openbmc/openbmc#2714

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

show more ...


# 3b7b38ba 25-Sep-2017 Brandon Wyman <bjwyman@gmail.com>

Add helper function to see if PMBus file exists

Due to some odd power supply behavior on some systems, certain PMBus
files in sysfs end up missing. Adding in a helper function to avoid

Add helper function to see if PMBus file exists

Due to some odd power supply behavior on some systems, certain PMBus
files in sysfs end up missing. Adding in a helper function to avoid
spurious tracing if an application so chooses to check for existence
before trying to read one of those files. See openbmc/openbmc#2364 issue
opened for this problem with the missing files.

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

show more ...


# 875b363c 13-Sep-2017 Brandon Wyman <bjwyman@gmail.com>

Add in support for power supply over-temperature

If a power supply encounters an over-temperature condition, the FAN
FAULT OR WARNING bit of the STATUS_WORD (low byte) command response

Add in support for power supply over-temperature

If a power supply encounters an over-temperature condition, the FAN
FAULT OR WARNING bit of the STATUS_WORD (low byte) command response
should be turned on. Ideally, when this is encountered, both power
supplies would be called out, as one condition that could lead to this
is due to the other supply putting out less current. Since each
monitoring application of the power supplies only knows its own
information, just the power supply indicating the condition will be
called out along with metadata containing potentially relevant command
response data.

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

show more ...


# 12661f1e 31-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Add in support for power supply fan fault

If the FAN FAULT OR WARN bit in the STATUS_WORD turns on, log an error
calling out the power supply, include the contents from STATUS_WORD,

Add in support for power supply fan fault

If the FAN FAULT OR WARN bit in the STATUS_WORD turns on, log an error
calling out the power supply, include the contents from STATUS_WORD,
MFR_SPECIFIC, STATUS_TEMPERATURE, and STATUS_FANS_1_2 in the metadata.

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

show more ...


# ab05c079 30-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Add in detection of output overvoltage fault

If bit 5 of the lower byte to STATUS_WORD (STATUS_BYTE) is on when the
power is on, the power supply is indicating that it has detected an

Add in detection of output overvoltage fault

If bit 5 of the lower byte to STATUS_WORD (STATUS_BYTE) is on when the
power is on, the power supply is indicating that it has detected an
output overvoltage fault condition. Log an error pointing to the power
supply that is indicating this overvoltage condition.

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

show more ...


# b165c251 25-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Add in support for detecting an output overcurrent fault

When analyzing the STATUS_WORD bits, check if the IOUT_OC_FAULT bit is
on. That bit indicates that an output overcurrent fault co

Add in support for detecting an output overcurrent fault

When analyzing the STATUS_WORD bits, check if the IOUT_OC_FAULT bit is
on. That bit indicates that an output overcurrent fault condition has
occurred. Call out the power supply reporting that.

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

show more ...


# 764c797e 22-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Add support for power supply off when it should be on

If the power good bit indicates false, or the UNIT_IS_OFF bit is on,
create an error log and attach STATUS_WORD, STATUS_INPUT, STATU

Add support for power supply off when it should be on

If the power good bit indicates false, or the UNIT_IS_OFF bit is on,
create an error log and attach STATUS_WORD, STATUS_INPUT, STATUS_VOUT,
STATUS_IOUT, and MFR_SPECIFIC values to the metadata. The combination of
those PMBus command results should give an indication as to why the
power supply has turned off.

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

show more ...


# 253dc9b9 12-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Add in code to handle INPUT fault or warning

If the INPUT fault or warning bit in the STATUS_WORD turns on, report
a fault that includes STATUS_WORD and STATUS_INPUT values in the
me

Add in code to handle INPUT fault or warning

If the INPUT fault or warning bit in the STATUS_WORD turns on, report
a fault that includes STATUS_WORD and STATUS_INPUT values in the
metadata.

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

show more ...


# 10295547 09-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Add STATUS_WORD to metadata for VIN_UV_FAULT

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


# 442035f0 08-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Update analyze to check VIN_UV_FAULT

The function is a pure virtual function in DeviceMonitor, add in the
implementation of that for PowerSupply. Read the file that represents
that b

Update analyze to check VIN_UV_FAULT

The function is a pure virtual function in DeviceMonitor, add in the
implementation of that for PowerSupply. Read the file that represents
that bit from the STATUS_WORD. If fault is on, report a fault.

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

show more ...


# e7e432b4 21-Aug-2017 Matt Spinler <spinler@us.ibm.com>

Fill in voltage fault checking code

Fill in the code to check for a voltage fault. This is where
the power sequencer device detects that one of its child
devices has a bad voltage.

Fill in voltage fault checking code

Fill in the code to check for a voltage fault. This is where
the power sequencer device detects that one of its child
devices has a bad voltage. A separate error log will be created
for each voltage rail that has a fault. Each rail will only have
an error logged against it once for the lifetime of the object.

There will be support documentation that maps the failing rail
name to the hardware that the rail corresponds to.

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

show more ...


# 8f0d953f 21-Aug-2017 Matt Spinler <spinler@us.ibm.com>

Add device debug path to PMBus class

Some devices may also have files in
/sys/kernel/debug/<device driver name>.<instance>,
so adding a DeviceDebug path type to support that.

Add device debug path to PMBus class

Some devices may also have files in
/sys/kernel/debug/<device driver name>.<instance>,
so adding a DeviceDebug path type to support that.

The device driver name and chip instance number are then
required to be passed in to the constructor.

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

show more ...


# f855e82a 08-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Add read() function to PMBus

Adding a read() function to PMBus to read one or more bytes of data. A
number of errors will require data from the 2 byte STATUS_WORD command,
1 byte fro

Add read() function to PMBus

Adding a read() function to PMBus to read one or more bytes of data. A
number of errors will require data from the 2 byte STATUS_WORD command,
1 byte from STATUS_INPUT and various other commands, along with later
functions that will require even more bytes of data.

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

show more ...


# ff5f339c 11-Aug-2017 Brandon Wyman <bjwyman@gmail.com>

Add handling of /sys/kernel/debug/pmbus path

The STATUS_WORD, STATUS_INPUT, and other status command data will reside
under the /sys/kernel/debug/pmbus path. Update PMBus class to handle

Add handling of /sys/kernel/debug/pmbus path

The STATUS_WORD, STATUS_INPUT, and other status command data will reside
under the /sys/kernel/debug/pmbus path. Update PMBus class to handle
that path type.

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

show more ...


# 57868bc5 03-Aug-2017 Matt Spinler <spinler@us.ibm.com>

Add hwmon support to PMBus class

Add support to allow the class to handle accessing
hwmon files even though the device path passed to
the constructor wasn't a hwmon path.

Th

Add hwmon support to PMBus class

Add support to allow the class to handle accessing
hwmon files even though the device path passed to
the constructor wasn't a hwmon path.

This is useful because the users of this class have
to access files in both locations.

For example:
PMBus p(basePath);

p.write("myfile", 1, Type::Base)
-> writes to basePath/myfile

p.write("myfile", 1, Type::Hwmon)
-> writes to basePath/hwmon/hwmonN/myfile
where hwmonN is the hwmon dir for the device

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

show more ...


# 015e3ade 01-Aug-2017 Matt Spinler <spinler@us.ibm.com>

Add PMBus class

This class provides the interfaces to read PMBus devices
via sysfs files.

This commit provides 3 interfaces:
1) Write an integer (to provide: echo 1 > clear

Add PMBus class

This class provides the interfaces to read PMBus devices
via sysfs files.

This commit provides 3 interfaces:
1) Write an integer (to provide: echo 1 > clear_faults)
2) Read a file that represents a bit in a register.
3) Read a file that represents a bit in a register within
a PMBus page (or in something that acts like a page).

Additional ones may be added in the future.

ReadFailure/WriteFailure exceptions will be thrown on errors.

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

show more ...