presence: Clang format updates
Used `format-code.sh` build script to make changes to conform to clang
format.
Tested: Compiled
Change-Id: I2fc795938e85a752ee56b54212d389c2ff296828
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/presence/gpio.hpp b/presence/gpio.hpp
index 2829bea..5f9e28b 100644
--- a/presence/gpio.hpp
+++ b/presence/gpio.hpp
@@ -1,11 +1,13 @@
#pragma once
-#include <sdeventplus/source/io.hpp>
-#include <optional>
#include "evdevpp/evdev.hpp"
#include "psensor.hpp"
#include "utility.hpp"
+#include <sdeventplus/source/io.hpp>
+
+#include <optional>
+
namespace phosphor
{
namespace fan
@@ -22,87 +24,85 @@
*/
class Gpio : public PresenceSensor
{
- public:
- /**
- * @brief
- *
- * Cannot move or copy due to this ptr as context
- * for sdevent callbacks.
- */
- Gpio() = delete;
- Gpio(const Gpio&) = delete;
- Gpio& operator=(const Gpio&) = delete;
- Gpio(Gpio&&) = delete;
- Gpio& operator=(Gpio&&) = delete;
- ~Gpio() = default;
+ public:
+ /**
+ * @brief
+ *
+ * Cannot move or copy due to this ptr as context
+ * for sdevent callbacks.
+ */
+ Gpio() = delete;
+ Gpio(const Gpio&) = delete;
+ Gpio& operator=(const Gpio&) = delete;
+ Gpio(Gpio&&) = delete;
+ Gpio& operator=(Gpio&&) = delete;
+ ~Gpio() = default;
- /**
- * @brief Construct a gpio sensor.
- *
- * @param[in] physDevice - The physical gpio device path.
- * @param[in] device - The gpio-keys input device.
- * @param[in] physPin - The physical gpio pin number.
- */
- Gpio(
- const std::string& physDevice,
- const std::string& device,
- unsigned int physPin);
+ /**
+ * @brief Construct a gpio sensor.
+ *
+ * @param[in] physDevice - The physical gpio device path.
+ * @param[in] device - The gpio-keys input device.
+ * @param[in] physPin - The physical gpio pin number.
+ */
+ Gpio(const std::string& physDevice, const std::string& device,
+ unsigned int physPin);
- /**
- * @brief start
- *
- * Register for an sdevent io callback on the gpio.
- * Query the initial state of the gpio.
- *
- * @return The current sensor state.
- */
- bool start() override;
+ /**
+ * @brief start
+ *
+ * Register for an sdevent io callback on the gpio.
+ * Query the initial state of the gpio.
+ *
+ * @return The current sensor state.
+ */
+ bool start() override;
- /**
- * @brief stop
- *
- * De-register sdevent io callback.
- */
- void stop() override;
+ /**
+ * @brief stop
+ *
+ * De-register sdevent io callback.
+ */
+ void stop() override;
- /**
- * @brief fail
- *
- * Call the gpio out.
- */
- void fail() override;
+ /**
+ * @brief fail
+ *
+ * Call the gpio out.
+ */
+ void fail() override;
- /**
- * @brief Check the sensor.
- *
- * Query the gpio.
- */
- bool present() override;
+ /**
+ * @brief Check the sensor.
+ *
+ * Query the gpio.
+ */
+ bool present() override;
- private :
- /** @brief Get the policy associated with this sensor. */
- virtual RedundancyPolicy& getPolicy() = 0;
+ private:
+ /** @brief Get the policy associated with this sensor. */
+ virtual RedundancyPolicy& getPolicy() = 0;
- /** @brief sdevent io callback. */
- void ioCallback();
+ /** @brief sdevent io callback. */
+ void ioCallback();
- /** The current state of the sensor. */
- bool currentState;
+ /** The current state of the sensor. */
+ bool currentState;
- /** Gpio event device file descriptor. */
- util::FileDescriptor evdevfd;
+ /** Gpio event device file descriptor. */
+ util::FileDescriptor evdevfd;
- /** Gpio event device. */
- evdevpp::evdev::EvDev evdev;
+ /** Gpio event device. */
+ evdevpp::evdev::EvDev evdev;
- /** Physical gpio device. */
- std::string phys;
+ /** Physical gpio device. */
+ std::string phys;
- /** Gpio pin number. */
- unsigned int pin;
+ /** Gpio pin number. */
+ unsigned int pin;
- /** sdevent io handle. */
- std::optional<sdeventplus::source::IO> source;
+ /** sdevent io handle. */
+ std::optional<sdeventplus::source::IO> source;
};
} // namespace presence