Jim Wright | 7945dd2 | 2021-04-06 16:55:15 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Jim Wright | c48551a | 2022-12-22 15:43:14 -0600 | [diff] [blame] | 3 | #include "ucd90x_monitor.hpp" |
Jim Wright | 7945dd2 | 2021-04-06 16:55:15 -0500 | [diff] [blame] | 4 | |
| 5 | #include <sdbusplus/bus.hpp> |
| 6 | |
Jim Wright | c48551a | 2022-12-22 15:43:14 -0600 | [diff] [blame] | 7 | #include <cstdint> |
| 8 | #include <map> |
| 9 | #include <string> |
Jim Wright | d8a8617 | 2021-12-08 11:38:26 -0600 | [diff] [blame] | 10 | #include <vector> |
| 11 | |
Jim Wright | 7945dd2 | 2021-04-06 16:55:15 -0500 | [diff] [blame] | 12 | namespace phosphor::power::sequencer |
| 13 | { |
| 14 | |
| 15 | /** |
| 16 | * @class UCD90320Monitor |
| 17 | * This class implements fault analysis for the UCD90320 |
| 18 | * power sequencer device. |
| 19 | */ |
Jim Wright | c48551a | 2022-12-22 15:43:14 -0600 | [diff] [blame] | 20 | class UCD90320Monitor : public UCD90xMonitor |
Jim Wright | 7945dd2 | 2021-04-06 16:55:15 -0500 | [diff] [blame] | 21 | { |
| 22 | public: |
| 23 | UCD90320Monitor() = delete; |
| 24 | UCD90320Monitor(const UCD90320Monitor&) = delete; |
| 25 | UCD90320Monitor& operator=(const UCD90320Monitor&) = delete; |
| 26 | UCD90320Monitor(UCD90320Monitor&&) = delete; |
| 27 | UCD90320Monitor& operator=(UCD90320Monitor&&) = delete; |
| 28 | virtual ~UCD90320Monitor() = default; |
| 29 | |
| 30 | /** |
| 31 | * Create a device object for UCD90320 monitoring. |
Jim Wright | 3accffe | 2022-03-10 17:19:42 -0600 | [diff] [blame] | 32 | * @param bus D-Bus bus object |
| 33 | * @param i2cBus The bus number of the power sequencer device |
| 34 | * @param i2cAddress The I2C address of the power sequencer device |
Jim Wright | 7945dd2 | 2021-04-06 16:55:15 -0500 | [diff] [blame] | 35 | */ |
Patrick Williams | 7354ce6 | 2022-07-22 19:26:56 -0500 | [diff] [blame] | 36 | UCD90320Monitor(sdbusplus::bus_t& bus, std::uint8_t i2cBus, |
Jim Wright | d8fc068 | 2022-01-11 15:36:00 -0600 | [diff] [blame] | 37 | std::uint16_t i2cAddress); |
Jim Wright | 7945dd2 | 2021-04-06 16:55:15 -0500 | [diff] [blame] | 38 | |
Jim Wright | c48551a | 2022-12-22 15:43:14 -0600 | [diff] [blame] | 39 | protected: |
| 40 | /** @copydoc UCD90xMonitor::formatGpioValues() */ |
| 41 | void formatGpioValues( |
| 42 | const std::vector<int>& values, unsigned int numberLines, |
| 43 | std::map<std::string, std::string>& additionalData) const override; |
Jim Wright | 7945dd2 | 2021-04-06 16:55:15 -0500 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | } // namespace phosphor::power::sequencer |