convert sysfs gpio usage to libgpiod
Updated Fan presence sensor monitoring call back
to use pin name and gpiod APIs. Number based sysfs
framework is deprecated and replaced by descriptor
based gpiod framework. With named gpio pin,
code is more portable provided the device tree
defines GPIO pin name consistently.
This requires device tree change (225598) and
configuration file change (entity-manager/+/28119)
Tested By:
remove and insert fans and observe fan presence
status change on dbus fan sensor objects
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: Ice17a472285373ce866132ccc0da02cd1e70ddbe
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 83c9a76..a28c613 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -165,6 +165,7 @@
add_executable (fansensor src/FanMain.cpp ${FAN_SRC_FILES})
add_dependencies (fansensor sdbusplus-project)
target_link_libraries (fansensor ${SENSOR_LINK_LIBS})
+target_link_libraries (fansensor gpiodcxx)
add_executable (hwmontempsensor src/HwmonTempMain.cpp ${HWMON_TEMP_SRC_FILES})
add_dependencies (hwmontempsensor sdbusplus-project)