blob: a40456ddf2aae12dd3f9e85ae58fd798fe46713c [file] [log] [blame]
Jim Wright7945dd22021-04-06 16:55:15 -05001#pragma once
2
Jim Wrightc48551a2022-12-22 15:43:14 -06003#include "ucd90x_monitor.hpp"
Jim Wright7945dd22021-04-06 16:55:15 -05004
5#include <sdbusplus/bus.hpp>
6
Jim Wrightc48551a2022-12-22 15:43:14 -06007#include <cstdint>
8#include <map>
9#include <string>
Jim Wrightd8a86172021-12-08 11:38:26 -060010#include <vector>
11
Jim Wright7945dd22021-04-06 16:55:15 -050012namespace phosphor::power::sequencer
13{
14
15/**
16 * @class UCD90320Monitor
17 * This class implements fault analysis for the UCD90320
18 * power sequencer device.
19 */
Jim Wrightc48551a2022-12-22 15:43:14 -060020class UCD90320Monitor : public UCD90xMonitor
Jim Wright7945dd22021-04-06 16:55:15 -050021{
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 Wright3accffe2022-03-10 17:19:42 -060032 * @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 Wright7945dd22021-04-06 16:55:15 -050035 */
Patrick Williams7354ce62022-07-22 19:26:56 -050036 UCD90320Monitor(sdbusplus::bus_t& bus, std::uint8_t i2cBus,
Jim Wrightd8fc0682022-01-11 15:36:00 -060037 std::uint16_t i2cAddress);
Jim Wright7945dd22021-04-06 16:55:15 -050038
Jim Wrightc48551a2022-12-22 15:43:14 -060039 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 Wright7945dd22021-04-06 16:55:15 -050044};
45
46} // namespace phosphor::power::sequencer