psu-ng: Add accessor to get GPIO line name
Update the utilities to give the line name for a GPIO.
Add accessor to power supply class to get the name of the presence GPIO
line.
Signed-off-by: B. J. Wyman <bjwyman@gmail.com>
Change-Id: Ic10fd81c6de024dbcb27088c5935ac9947af9465
diff --git a/phosphor-power-supply/util.hpp b/phosphor-power-supply/util.hpp
index 2203b92..da04020 100644
--- a/phosphor-power-supply/util.hpp
+++ b/phosphor-power-supply/util.hpp
@@ -121,6 +121,11 @@
*/
int read() override;
+ /**
+ * @brief Returns the name of the GPIO, if not empty.
+ */
+ std::string getName() const override;
+
private:
gpiod::line line;
};